* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(5deg, hsl(0 0% 100% / 1), #006cff);
    background-position: center;
    min-height: 100vh;
    background-attachment: fixed;
    background-size: contain;
    padding: 20px;
    position: relative;
    overflow-x: hidden;
}

/* Parallax Cloud Layers */
.parallax-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: calc(100% + 100vh);
    pointer-events: none;
    z-index: 1;
}

#cloudsLayer1 {
    z-index: 1;
}

#cloudsLayer2 {
    z-index: 2;
}

#cloudsLayer3 {
    z-index: 3;
}

#cloudsLayer4 {
    z-index: 4;
}

.cloud {
    position: absolute;
    animation: float 20s ease-in-out infinite;
    pointer-events: none;
}

.layer-fill {
    position: fixed;
    /* top: 0; */
    /* left: 0; */
    width: 100%;
    height: 100%;
    pointer-events: none;
    fill-opacity: 1;
}
.layer-fill-overlay{
    background: linear-gradient(0deg, #a2ecff, #0098ff0f);
    opacity: 1;
}
.layer-fill-far {
    background-color: #5995c900;
}

.layer-fill-medium {
    background-color: #5995c93b;
}

.layer-fill-close {
    background-color: #5995c92b;
}

.cloud-far {
    width: 75px;
    height: auto;
    animation-duration: 30s;
}

.cloud-medium {
    width: 250px;
    height: auto;
    animation-duration: 25s;
}

.cloud-close {
    width: 400px;
    height: auto;
    animation-duration: 20s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) translateX(0px);
    }
    25% {
        transform: translateY(-10px) translateX(5px);
    }
    50% {
        transform: translateY(0px) translateX(10px);
    }
    75% {
        transform: translateY(10px) translateX(5px);
    }
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    /* overflow: hidden; */
    position: relative;
    z-index: 10;
}

h1 {
    color: #275985;
    margin: 0;
    font-size: 2rem;
}

.header-image {
    width: 100%;
    height: auto;
    max-width: 100%;
    object-fit: contain;
    border-radius: 7px 7px 0px 0px;
}

.header {
    margin-bottom: 0;
    text-align: center;
}

/* Filter Bar */
.filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.filter-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-bar label {
    font-weight: 600;
    color: #555;
}

.category-select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
    min-width: 150px;
}

.category-input-group {
    display: flex;
    gap: 10px;
    align-items: center;
}

.category-text-input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
    min-width: 150px;
}

.category-text-input::placeholder {
    color: #999;
    font-style: italic;
}

.btn-add {
    background: #5995c9;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 10px 20px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-add:hover {
    filter: brightness(1.1);
}

.btn-add:active {
    transform: translateY(0);
}

/* Floating Action Button */
.fab {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #5995c9;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 10px 20px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 60px;
    height: 40px;
}

.fab:hover {
    filter: brightness(1.1);
}

.fab:active {
    transform: translateY(0);
}

/* Cloud Control Slider */
.cloud-control {
    position: fixed;
    bottom: 30px;
    right: 110px;
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 6px;
    padding: 8px 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 999;
}

.cloud-label {
    font-size: 16px;
    margin: 0;
    opacity: 0.8;
}

.cloud-slider {
    width: 100px;
    height: 4px;
    background: #ddd;
    border-radius: 2px;
    outline: none;
    cursor: pointer;
}

.cloud-slider::-webkit-slider-thumb {
    appearance: none;
    width: 16px;
    height: 16px;
    background: #5995c9;
    border-radius: 50%;
    cursor: pointer;
}

.cloud-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: #5995c9;
    border-radius: 50%;
    border: none;
    cursor: pointer;
}

.cloud-randomize-btn {
    background: #5995c9;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 6px 8px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.cloud-randomize-btn:hover {
    background: #4a7ba7;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: #cccccc;
    margin: 5% auto;
    padding: 16px;
    border-radius: 7PX;
    max-width: 500px;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.close {
    position: absolute;
    right: 15px;
    top: 10px;
    font-size: 28px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
    line-height: 1;
}

.close:hover {
    color: #333;
}

h2 {
    color: #555;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.form-group {
    /* margin-bottom: 25px; */
}

label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 600;
    font-size: 0.7rem;
}

input[type="text"],
textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s;
}

input[type="text"]:focus,
textarea:focus {
    outline: none;
    border-color: #4a90e2;
}

textarea {
    min-height: 120px;
    resize: vertical;
}

.btn-submit {
    width: 100%;
    padding: 14px;
    background: #5995c9;
    color: white;
    border: none;
    border-radius: 5PX;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-submit:hover {
    background: #8abeeb;
}

.btn-submit:active {
    transform: translateY(0);
}

.btn-submit:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.modal-buttons {
    display: flex;
    gap: 10px;
    justify-content: space-between;
    margin-top: 15px;
}

.btn-delete {
    padding: 14px;
    background: #f44336;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-delete:hover {
    background: #da190b;
}

.btn-delete:active {
    transform: translateY(1px);
}

.auth-error {
    margin-top: 15px;
    padding: 10px;
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    font-size: 0.9rem;
    text-align: center;
}

.message {
    margin: 20px 40px 0 40px;
    padding: 12px 16px;
    border-radius: 8px;
    font-weight: 500;
    text-align: center;
    display: none;
}

.message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
}

.message.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
    display: block;
}

#entriesList {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 0 40px 40px 40px;
}

.scenario-group {
    background: #5995c9;
    padding: 4px;
    border-radius: 5px;
}

.scenario-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.scenario-title-section {
    display: flex;
    flex-direction: column;
}

.scenario-title {
    font-weight: 600;
    color: #ffffff;
    margin: 0;
    font-size: 1rem;
    margin-left: 6px;
}

.scenario-buttons {
    display: flex;
    gap: 8px;
    align-items: center;
}

.scenario-buttons .scenario-category {
    font-size: 0.6rem;
    font-weight: 500;
    opacity: 0.9;
    margin-right: 4px;
}

/* Hamburger Menu Styles */
.hamburger-menu {
    position: relative;
    display: inline-block;
}

.hamburger-btn {
    border: none;
    border-radius: 4px;
    padding: 0;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    line-height: 1;
    font-family: monospace;
}

.hamburger-btn:hover {
    filter: brightness(1.2);
}

.dropdown-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 5px);
    background: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    min-width: 160px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
}

.dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    cursor: pointer;
    transition: background-color 0.2s;
    border-bottom: 1px solid #f0f0f0;
}

.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-item:hover {
    background-color: #f8f9fa;
}

.dropdown-item:first-child {
    border-radius: 6px 6px 0 0;
}

.dropdown-item:last-child {
    border-radius: 0 0 6px 6px;
}

.dropdown-icon {
    font-size: 0.9rem;
    width: 16px;
    text-align: center;
}

.dropdown-text {
    font-size: 0.85rem;
    color: #333;
    font-weight: 500;
}

.btn-add-response {
    background: #93caff;
    color: #185183;
    border: none;
    border-radius: 4px;
    padding: 6px 12px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-add-response:hover {
    background: #357abd;
    transform: scale(1.05);
}

.btn-add-response:active {
    transform: scale(0.95);
}

.responses-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.single-response-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    /* margin-bottom: 5px; */
}

.speaking-head {
    flex-shrink: 0;
    margin-top: -4px;
    margin-left: 5px;
}

.head-image {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.response-item {
    background: white;
    padding: 2px 6px;
    border-radius: 3px;
    /* border-left: 3px solid #ddd; */
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding-right: 3px;
    transition: all 0.3s ease;
}

.response-item.speech-bubble {
    position: relative;
    border-radius: 8px;
    padding: 4px 12px;
}

.response-item.speech-bubble::before {
    content: '';
    position: absolute;
    left: -8px;
    top: 9px;
    width: 0;
    height: 0;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    border-right: 8px solid white;
    z-index: 1;
}

.response-item.highlight {
    background: #fffacd;
    transform: scale(1.02);
}

.scenario-group.highlight {
    background: #fffacd;
    transform: scale(1.01);
    transition: all 0.4s ease;
}

.response-text {
    color: #555;
    line-height: 1.5;
    flex: 1;
    font-weight: bold;
    font-size: 0.8rem;
}

.rating-section {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.score {
    font-weight: 700;
    font-size: 1.1rem;
    min-width: 30px;
    text-align: center;
    transition: all 0.3s ease;
}

.score.positive {
    color: #28a745;
}

.score.negative {
    color: #dc3545;
}

.score.neutral {
    color: #666;
}

.rating-buttons {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

.rating-btn {
    background: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 1px 2px;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    transition: all 0.2s;
}

.rating-btn:hover {
    background: #e0e0e0;
    transform: scale(1.05);
}

.edit-btn {
    background: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 1px 2px;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s, all 0.2s;
}

.response-item:hover .edit-btn,
.conversation-item:hover .edit-btn,
.single-response-wrapper:hover .edit-btn {
    opacity: 1;
}

.edit-btn:hover {
    background: #e0e0e0;
    transform: scale(1.05);
}

.rating-btn:active {
    transform: scale(0.95);
}

.rating-btn span {
    font-weight: 600;
    color: #666;
}

.no-entries {
    text-align: center;
    color: #999;
    padding: 40px;
    font-style: italic;
}

.no-responses {
    text-align: center;
    color: #ffffff;
    padding: 20px;
    font-style: italic;
    font-size: 0.9rem;
}

@media (max-width: 600px) {
    .container {
        padding: 25px;
    }

    h1 {
        font-size: 1.5rem;
    }
}

/* Conversation Display Styles */
.conversation-item {
    border-radius: 5px;
    padding: 2px;
    margin: 0px 0;
    /* border: 2px solid #e9ecef; */
    display: flex;
    align-items: flex-start;
    /* gap: 15px; */
    margin-bottom: 10px;
}

.conversation-content {
    flex: 1;
    max-height: 300px;
    overflow-y: auto;
    font-size: 0.8em;
    font-weight: bold;
    padding: 5px;
}

.conversation-item .conversation-messages {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.message-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    max-width: 80%;
}

.message-wrapper-left {
    align-self: flex-start;
    flex-direction: row;
}

.message-wrapper-right {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.message-head {
    flex-shrink: 0;
    margin-top: 2px;
}

.head-image-conversation {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.conversation-item .rating-section {
    align-items: flex-start;
    gap: 10px;
    padding-right: 0;
    transition: all 0.3s ease;
    min-width: 80px;
}

.message-bubble {
    max-width: none;
    flex: 1;
    padding: 6px 10px;
    border-radius: 8px;
    word-wrap: break-word;
    position: relative;
}

.message-left {
    background: #ffffff;
    color: #333;
    border-bottom-left-radius: 4px;
}

.message-left::before {
    content: '';
    position: absolute;
    left: -6px;
    top: 8px;
    width: 0;
    height: 0;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    border-right: 6px solid #ffffff;
}

.message-right {
    background: #ffffff;
    color: #272727;
    border-bottom-right-radius: 4px;
}

.message-right::before {
    content: '';
    position: absolute;
    right: -6px;
    top: 8px;
    width: 0;
    height: 0;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    border-left: 6px solid #ffffff;
}



/* Conversation Builder Styles */
.response-fields {
    margin-top: 15px;
}

.conversation-message {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 4px;
    margin-bottom: 10px;
    background: #dfdfdf;
}

.conversation-message:last-child {
    margin-bottom: 15px;
}

.message-side {
    width: 100%;
    padding: 2px 4px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 14px;
    background: white;
    margin-bottom: 10px;
}

.message-text {
    width: 100%;
    min-height: 80px;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    resize: vertical;
    font-size: 14px;
    font-family: inherit;
}

.add-message-btn {
    background: #4CAF50;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    margin-bottom: 15px;
    transition: background-color 0.3s;
}

.add-message-btn:hover {
    background: #45a049;
}

.remove-message-btn {
    background: #f44336;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
    float: right;
    margin-top: -10px;
    margin-right: -10px;
}

.remove-message-btn:hover {
    background: #da190b;
}

#responseType {
    width: 100%;
    padding: 3px 4px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 14px;
    background: white;
}
