/* Video Landing Page Styles - Mobile First */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Default button behavior - no outline or transform on click */
button {
    outline: none;
    transform: none;
}

button:focus {
    outline: none;
    transform: none;
}

button:active {
    outline: none;
    transform: none;
}

body {
    overflow: hidden;
    width: 100vw;
    height: 100vh;
    font-family: 'Inter', sans-serif;
}

.video-landing-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Background Video - Full Screen */
.background-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    transition: filter 0.3s ease;
}

.background-video.paused-blur {
    filter: blur(3px);
}

/* Blur Overlay */
.blur-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    background: rgba(0, 0, 0, 0.3);
    z-index: 2;
    transition: opacity 0.5s ease, backdrop-filter 0.5s ease;
}

.blur-overlay.hidden {
    opacity: 0;
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
    pointer-events: none;
}

/* Start Button */
.start-button {
    position: relative;
    z-index: 3;
    padding: 20px 60px;
    font-size: 28px;
    font-weight: 700;
    color: #ffffff;
    background: linear-gradient(135deg, #003d82 0%, #0056b3 100%);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(0, 61, 130, 0.4);
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.5s ease;
    font-family: 'Inter', sans-serif;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.start-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(0, 61, 130, 0.5);
}

.start-button:active {
    transform: translateY(0);
    box-shadow: 0 6px 15px rgba(0, 61, 130, 0.4);
}

.start-button.hidden {
    opacity: 0;
    pointer-events: none;
}

.button-text {
    display: inline-block;
}

/* Fade transition for page change */
body.fade-out {
    animation: fadeOut 0.5s ease forwards;
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

/* Top Navigation Bar */
.top-nav-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.3) 60%, transparent 100%);
    padding: 15px 20px;
    display: flex;
    justify-content: flex-end; /* Default to right alignment when no hamburger */
    align-items: center;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* When hamburger button is visible, use space-between */
.top-nav-bar.show-hamburger {
    justify-content: space-between;
}

.top-nav-bar.hidden {
    opacity: 0;
    transform: translateY(-100%);
    pointer-events: none;
}

/* Hamburger Button */
.hamburger-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.6);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    color: #ffffff;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.hamburger-btn:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.hamburger-btn:active {
    transform: scale(0.95);
}

.hamburger-btn .material-icons {
    font-size: 24px;
}

/* Caption Button in Nav Bar */
.caption-btn-nav {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.6);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    color: #ffffff;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.caption-btn-nav:hover {
    background: rgba(0, 0, 0, 0.8);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.caption-btn-nav.caption-active {
    background: rgba(255, 165, 0, 0.9);
    color: #ffffff;
}

.caption-btn-nav .material-icons {
    font-size: 24px;
}

/* Chatbot Button - Fixed to bottom right */
.chatbot-btn-nav {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 123, 255, 0.9);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 123, 255, 0.4);
    color: #ffffff;
    padding: 0;
    z-index: 200;
    -webkit-tap-highlight-color: transparent;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.chatbot-btn-nav:hover {
    background: rgba(0, 123, 255, 1);
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(0, 123, 255, 0.6);
}

.chatbot-btn-nav:active {
    transform: scale(0.95);
}

.chatbot-btn-nav .material-icons {
    font-size: 28px;
}

.chatbot-btn-nav .chatbot-question-icon {
    position: absolute;
    bottom: -2px;
    right: -2px;
    font-size: 16px;
    background: rgba(255, 193, 7, 0.95);
    border-radius: 50%;
    padding: 3px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Hide chatbot button when modal is open on desktop */
.chatbot-btn-nav.hidden {
    opacity: 0;
    pointer-events: none;
    transform: scale(0.8);
}

/* Settings Button in Nav Bar */
.settings-btn-nav {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.6);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    color: #ffffff;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.settings-btn-nav:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.settings-btn-nav:active {
    transform: scale(0.95);
}

.settings-btn-nav .material-icons {
    font-size: 24px;
}

/* Right side navigation buttons wrapper */
.nav-right-buttons {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Logout Button */
.logout-btn-nav {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.6);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    color: #ffffff;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.logout-btn-nav:hover {
    background: rgba(220, 53, 69, 0.9);
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(220, 53, 69, 0.4);
}

.logout-btn-nav:active {
    transform: scale(0.95);
}

.logout-btn-nav .material-icons {
    font-size: 24px;
}

/* Sidebar Menu */
.sidebar-menu {
    position: fixed;
    top: 0;
    left: -320px;
    width: 320px;
    height: 100vh;
    background: #ffffff;
    z-index: 10000; /* Higher than chatbot modal (1000) */
    transition: left 0.3s ease;
    box-shadow: 2px 0 15px rgba(0, 0, 0, 0.3);
    overflow-y: auto;
}

.sidebar-menu.open {
    left: 0;
}

.sidebar-header {
    padding: 20px;
    background: #003d82;
    color: #ffffff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 10;
}

.sidebar-header h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
}

.close-sidebar-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    color: #ffffff;
    padding: 0;
}

.close-sidebar-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.close-sidebar-btn .material-icons {
    font-size: 20px;
}

.sidebar-content {
    padding: 0;
}

.modules-list {
    padding: 0;
}

.module-item {
    border-bottom: 1px solid #e0e0e0;
}

.module-header {
    width: 100%;
    padding: 16px 20px;
    background: #f5f5f5;
    border: none;
    cursor: pointer;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 8px;
    transition: background 0.2s ease;
    text-align: left;
}

.module-header:hover {
    background: #e8e8e8;
}

.module-title {
    font-size: 16px;
    font-weight: 600;
    color: #003d82;
}

.module-header .chevron {
    width: 20px;
    height: 20px;
    color: #003d82;
    transition: transform 0.3s ease;
}

.module-item.expanded .chevron {
    transform: rotate(90deg);
}

.submodules-list {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: #ffffff;
}

.module-item.expanded .submodules-list {
    max-height: 500px;
}

.submodule-item {
    display: block;
    padding: 12px 20px 12px 40px;
    color: #333333;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease;
    font-size: 14px;
    border-left: 3px solid transparent;
}

.submodule-item:hover {
    background: #f0f8ff;
    color: #003d82;
    border-left-color: #003d82;
}

.submodule-item.active {
    background: #003d82;
    color: #ffffff;
    border-left-color: #0056b3;
    font-weight: 600;
}

.submodule-item.active:hover {
    background: #002a5c;
    color: #ffffff;
}

/* Completion Icons */
.completion-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: bold;
    margin-left: 8px;
    opacity: 0.9;
}

.completion-icon.completed {
    color: #4caf50; /* Green checkmark */
}

/* Module header completion icon positioning */
.module-header .module-title {
    flex: 1;
}

.module-header .completion-icon {
    margin-left: auto;
    margin-right: 4px;
    font-size: 18px;
}

/* Module Progress Circle */
.module-progress-circle {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    margin-right: 4px;
    width: 32px;
    height: 32px;
}

.module-progress-circle .progress-ring {
    position: absolute;
    top: 0;
    left: 0;
    transform: rotate(0deg);
}

.module-progress-circle .progress-ring-bg {
    opacity: 0.3;
}

.module-progress-circle .progress-ring-fill {
    transition: stroke-dashoffset 0.3s ease, stroke 0.3s ease;
}

.module-progress-circle .progress-text {
    position: absolute;
    font-size: 8px;
    font-weight: 600;
    color: #333;
    pointer-events: none;
    line-height: 1;
    padding: 0 2px;
}

/* Submodule item with completion icon */
.submodule-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.submodule-title {
    flex: 1;
}

.submodule-item .completion-icon {
    flex-shrink: 0;
    font-size: 16px;
}

/* Active submodule - white checkmark on blue background */
.submodule-item.active .completion-icon.completed {
    color: #ffffff;
}

/* Sidebar Overlay */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000; /* Below sidebar menu, above chatbot modal */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.sidebar-overlay.visible {
    opacity: 1;
    visibility: visible;
}

.error-message {
    padding: 20px;
    color: #d32f2f;
    text-align: center;
}

/* Video Control Bar - Centered with auto-hide */
.video-controls {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 4;
    background: rgba(0, 0, 0, 0.6);
    padding: 20px 30px;
    border-radius: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    transition: opacity 0.3s ease;
    opacity: 0;
    pointer-events: none;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.video-controls.visible {
    opacity: 1;
    pointer-events: auto;
}

.video-controls.hidden {
    opacity: 0;
    pointer-events: none;
}

/* Caption Button (Top Right) */
/* Old caption-btn-top styles removed - now using caption-btn-nav in top navigation bar */

/* Control Buttons */
.control-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.95);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    color: #003d82;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
    position: relative;
    overflow: visible;
}

.control-btn::before {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border-radius: 50%;
    border: 3px solid #003d82;
    opacity: 0;
    transform: scale(0.8);
}

.control-btn.animate::before {
    animation: buttonPulse 0.6s ease-out;
}

.play-pause-btn::before {
    border-color: #FF4500;
}

@keyframes buttonPulse {
    0% {
        opacity: 0.8;
        transform: scale(0.8);
    }
    100% {
        opacity: 0;
        transform: scale(1.3);
    }
}

.control-btn:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.control-btn:active {
    transform: scale(0.95) !important;
}

.control-btn:focus {
    outline: none;
    transform: none !important;
}

.control-btn:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 3px;
}

/* Disable hover effects on touch devices */
@media (hover: none) and (pointer: coarse) {
    .control-btn:hover {
        transform: none;
        background: rgba(255, 255, 255, 0.95);
    }
    
    .play-pause-btn:hover {
        background: linear-gradient(135deg, #FF4500 0%, #FF6B35 100%);
    }
}

/* Play/Pause button - larger */
.play-pause-btn {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #FF4500 0%, #FF6B35 100%);
    color: white;
}

.play-pause-btn:hover {
    background: linear-gradient(135deg, #FF6B35 0%, #FF8C00 100%);
}

/* Material Icons */
.control-btn .material-icons {
    font-size: 36px;
}

.play-pause-btn .material-icons {
    font-size: 40px;
}

.control-btn .material-icons.hidden {
    display: none;
}

/* Responsive adjustments for very small screens */
@media screen and (max-width: 768px) {
    /* Old caption-btn-top mobile styles removed */
    
    .control-btn {
        width: 50px;
        height: 50px;
    }

    .play-pause-btn {
        width: 60px;
        height: 60px;
    }

    .control-btn .material-icons {
        font-size: 32px;
    }

    .play-pause-btn .material-icons {
        font-size: 36px;
    }

    .video-controls {
        gap: 20px;
        padding: 15px 25px;
    }
}

@media screen and (max-width: 360px) {
    .start-button {
        padding: 18px 50px;
        font-size: 24px;
    }

    .control-btn {
        width: 45px;
        height: 45px;
    }

    .play-pause-btn {
        width: 55px;
        height: 55px;
    }

    .control-btn .material-icons {
        font-size: 28px;
    }

    .play-pause-btn .material-icons {
        font-size: 32px;
    }

    .video-controls {
        gap: 15px;
        padding: 12px 20px;
    }
}

/* Landscape mode adjustments for mobile */
@media screen and (max-height: 500px) and (orientation: landscape) {
    .start-button {
        padding: 15px 50px;
        font-size: 24px;
    }
}

/* Tablet and larger - still mobile-focused but refined */
@media screen and (min-width: 768px) {
    .start-button {
        padding: 22px 70px;
        font-size: 32px;
    }
}

/* Caption Container */
.caption-container {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    max-width: 100%;
    text-align: center;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.caption-container.hidden {
    opacity: 0;
}

.caption-text {
    display: inline-block;
    padding: 6px 12px;
    background: rgba(0, 0, 0, 0.75);
    color: #ffffff;
    font-size: 18px;
    font-weight: 500;
    line-height: 1.4;
    border-radius: 4px;
    font-family: 'Inter', sans-serif;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Caption button active state */
.control-btn.caption-active {
    background: rgba(255, 165, 0, 0.95);
    color: #ffffff;
}

/* Mobile caption positioning - centered vertically in visible video area */
/* Adjust bottom value to position captions within visible 16:9 crop */
.caption-container {
    bottom: 180px; /* Above controls, within visible area */
    padding: 0;
    width: 80vw;
    max-width: 80vw;
}

.caption-text {
    max-width: 100%;
    box-sizing: border-box;
}

/* Desktop caption positioning */
@media screen and (min-width: 768px) {
    .caption-container {
        bottom: 80px; /* Adjusted for desktop controls */
        padding: 0;
        width: 80vw;
        max-width: 80vw;
    }
    
    .caption-text {
        font-size: 24px;
        padding: 8px 16px;
    }
}

/* Smaller screens - tighter caption positioning */
@media screen and (max-width: 360px) {
    .caption-container {
        bottom: 100px;
        padding: 0;
        width: 85vw;
        max-width: 85vw;
    }
    
    .caption-text {
        font-size: 16px;
        padding: 5px 10px;
    }
}

/* Settings Modal */
.settings-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    transition: opacity 0.3s ease;
}

.settings-modal.hidden {
    display: none;
}

.settings-modal-content {
    position: relative;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.3);
    max-width: 650px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    animation: slideDown 0.3s ease-out;
    display: flex;
    flex-direction: column;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.settings-modal-header {
    position: sticky;
    top: 0;
    background: white;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px 30px 15px 30px;
    border-bottom: 2px solid rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.settings-modal-header h2 {
    font-size: 28px;
    font-weight: 700;
    color: #333;
    margin: 0;
}

.close-settings-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.1);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    color: #333;
    padding: 0;
}

.close-settings-btn:hover {
    background: rgba(220, 53, 69, 0.9);
    color: #ffffff;
    transform: scale(1.1);
}

.close-settings-btn:active {
    transform: scale(0.95);
}

.close-settings-btn .material-icons {
    font-size: 24px;
}

.settings-modal-body {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 0;
}

.settings-modal-body::-webkit-scrollbar {
    width: 8px;
}

.settings-modal-body::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 10px;
}

.settings-modal-body::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

.settings-modal-body::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}

.settings-scroll-container {
    padding: 25px 30px;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.settings-modal-footer {
    background: white;
    padding: 20px 30px 30px 30px;
    border-top: 2px solid rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.settings-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.settings-section:last-of-type {
    border-bottom: none;
    padding-bottom: 0;
}

.settings-label {
    font-size: 20px;
    font-weight: 700;
    color: #333;
}

.settings-select {
    padding: 12px 15px;
    font-size: 16px;
    border: 2px solid rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    background: white;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
}

.settings-select:hover {
    border-color: rgba(0, 0, 0, 0.4);
}

.settings-select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.save-settings-btn {
    width: 100%;
    padding: 15px 30px;
    font-size: 18px;
    font-weight: 700;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
}

.save-settings-btn:hover {
    background: linear-gradient(135deg, #0056b3, #003d82);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4);
}

.save-settings-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(0, 123, 255, 0.3);
}

/* Settings Modal - Character Info */
.settings-character-info {
    text-align: center;
    margin: 15px 0 10px 0;
}

.settings-character-name {
    font-size: 24px;
    font-weight: 700;
    color: #FF4500;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Settings Modal - Carousel Container */
.settings-carousel-container {
    position: relative;
    width: 100%;
    max-width: 550px;
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    perspective: 1000px;
    margin: 20px auto;
    overflow: hidden;
}

.settings-carousel-track-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

/* Settings Modal Carousel - Use same slide styles but smaller */
.settings-modal .carousel-track {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    transform-style: preserve-3d;
}

.settings-modal .carousel-slide {
    position: absolute;
    width: 180px;
    height: 240px;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
    cursor: pointer;
}

.settings-modal .carousel-slide.active {
    transform: translateX(0) translateZ(0) scale(1);
    z-index: 10;
    opacity: 1;
}

.settings-modal .carousel-slide.prev {
    transform: translateX(-210px) translateZ(-120px) scale(0.8);
    z-index: 5;
    opacity: 0.6;
}

.settings-modal .carousel-slide.next {
    transform: translateX(210px) translateZ(-120px) scale(0.8);
    z-index: 5;
    opacity: 0.6;
}

.settings-modal .carousel-slide.hidden {
    transform: translateX(0) translateZ(-240px) scale(0.5);
    z-index: 1;
    opacity: 0;
    pointer-events: none;
}

/* Settings Modal - Indicators */
.settings-modal .carousel-indicators {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
}

.settings-modal .indicator {
    width: 60px;
    height: 60px;
    border-radius: 12px;
}

.settings-modal .indicator.active {
    width: 70px;
    height: 70px;
}

/* Settings Modal - Navigation Buttons */
.settings-modal .carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    z-index: 20;
}

.settings-modal .carousel-nav.prev {
    left: 10px;
}

.settings-modal .carousel-nav.next {
    right: 10px;
}

.settings-modal .carousel-nav .material-icons {
    font-size: 28px;
}

/* Mobile adjustments for settings modal */
@media screen and (max-width: 768px) {
    .settings-modal-content {
        width: calc(100% - 40px);
        max-height: 85vh; /* Reduced from 90vh for better mobile compatibility */
        margin: 0 20px;
    }
}

@media screen and (max-width: 480px) {
    .settings-modal-content {
        width: calc(100% - 30px);
        max-height: 80vh; /* Even more conservative for small screens */
        margin: 0 15px;
    }

    .settings-modal-header {
        padding: 20px 15px 15px 15px;
    }

    .settings-modal-header h2 {
        font-size: 24px;
    }

    .settings-scroll-container {
        padding: 20px 15px;
    }

    .settings-modal-footer {
        padding: 15px;
    }

    .settings-label {
        font-size: 18px;
    }

    .settings-select {
        font-size: 14px;
        padding: 10px 12px;
    }

    .save-settings-btn {
        font-size: 16px;
        padding: 12px 24px;
    }
}

/* ============================================
   CHATBOT MODAL STYLES
   ============================================ */

/* Chatbot Panel - Slides up from bottom on mobile, from right on desktop */
.chatbot-modal {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 100;
    pointer-events: none;
}

/* Removed backdrop blur - pausing video already provides blur effect */
/* .chatbot-modal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    background: rgba(0, 0, 0, 0.3);
    transition: opacity 0.4s ease;
    opacity: 0;
    pointer-events: none;
}

.chatbot-modal.expanded::before {
    opacity: 1;
    pointer-events: auto;
}

.chatbot-modal.hidden::before {
    opacity: 0;
    pointer-events: none;
} */

/* Mobile: Bottom collapsed/expandable panel (always visible) */
.chatbot-modal-content {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -5px 30px rgba(0, 0, 0, 0.2);
    max-width: 600px;
    width: 100%;
    height: 200px; /* Collapsed height */
    margin: 0 auto;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: auto;
}

/* Mobile collapsed state - show only header and input */
.chatbot-modal-content {
    height: 200px; /* Just enough for input area */
}

.chatbot-modal.expanded .chatbot-modal-content {
    height: 60vh;
}

.chatbot-modal.hidden .chatbot-modal-content {
    height: 0;
    opacity: 0;
    pointer-events: none;
}

/* Desktop: Right side panel */
@media screen and (min-width: 769px) {
    .chatbot-modal-content {
        top: auto;
        right: 20px;
        bottom: 20px;
        left: auto;
        transform: translateX(calc(100% + 20px));
        border-radius: 20px;
        box-shadow: -5px 5px 30px rgba(0, 0, 0, 0.2);
        width: 450px;
        max-width: 450px;
        height: 60vh;
        max-height: 60vh;
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                    opacity 0.3s ease,
                    box-shadow 0.3s ease;
    }

    .chatbot-modal:not(.hidden) .chatbot-modal-content {
        transform: translateX(0);
        opacity: 1;
    }

    .chatbot-modal.hidden .chatbot-modal-content {
        transform: translateX(calc(100% + 20px));
        opacity: 0;
    }
}

.chatbot-modal-header {
    position: sticky;
    top: 0;
    background: white;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
    border-radius: 20px 20px 0 0;
    cursor: pointer;
    user-select: none;
}

.chatbot-modal-header:hover {
    background: rgba(0, 0, 0, 0.02);
}

.expand-icon {
    transition: transform 0.3s ease;
}

.close-icon {
    display: none;
}

.chatbot-modal.expanded .expand-icon {
    transform: rotate(180deg);
}

/* Mobile: show expand icon, hide close icon, hide chatbot button */
@media screen and (max-width: 768px) {
    .expand-icon {
        display: inline-block !important;
    }
    
    .close-icon {
        display: none !important;
    }
    
    /* Hide chatbot button on mobile - modal is always visible */
    .chatbot-btn-nav {
        display: none !important;
    }
    
    /* Hide chat-box when collapsed */
    .chatbot-modal:not(.expanded) .chat-box {
        display: none;
        opacity: 0;
    }
    
    .chatbot-modal.expanded .chat-box {
        opacity: 1;
        transition: opacity 0.3s ease 0.1s; /* Slight delay for smooth appearance */
    }
    
    /* Change button color on mobile */
    .close-chatbot-btn:hover {
        background: rgba(0, 123, 255, 0.9);
        color: #ffffff;
        transform: scale(1.1);
    }
}

/* Desktop: show close icon, hide expand icon, show chatbot button */
@media screen and (min-width: 769px) {
    .chatbot-modal-header {
        cursor: default;
    }
    
    .chatbot-modal-header:hover {
        background: white;
    }
    
    .expand-icon {
        display: none !important;
    }
    
    .close-icon {
        display: inline-block !important;
    }
    
    .close-chatbot-btn:hover {
        background: rgba(220, 53, 69, 0.9);
        color: #ffffff;
        transform: scale(1.1);
    }
}

.chatbot-modal-header h2 {
    font-size: 22px;
    font-weight: 700;
    color: #333;
    margin: 0;
}

.close-chatbot-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.1);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    color: #333;
    padding: 0;
}

.close-chatbot-btn:hover {
    background: rgba(220, 53, 69, 0.9);
    color: #ffffff;
    transform: scale(1.1);
}

.close-chatbot-btn:active {
    transform: scale(0.95);
}

.close-chatbot-btn .material-icons {
    font-size: 24px;
}

/* Styles moved to .chatbot-modal-content .chat-section */
.chatbot-modal-content .chat-section {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 90px; /* Ensure enough space for textarea and buttons */
    padding: 20px 25px 25px 25px;
}

.chatbot-modal-content .chat-section::-webkit-scrollbar {
    width: 8px;
}

.chatbot-modal-content .chat-section::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 10px;
}

.chatbot-modal-content .chat-section::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

.chatbot-modal-content .chat-section::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}

/* Chatbot Video Container */
.chatbot-video-container {
    width: 100%;
    aspect-ratio: 16/9;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

.chatbot-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Chat Section */
.chat-section {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 400px;
}

.chat-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    /* background: #f8f9fa; */
    border-radius: 12px;
    /* padding: 15px; */
}

.chat-box {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
    background: white;
    border-radius: 8px;
    margin-bottom: 15px;
    min-height: 200px;
    max-height: -webkit-fill-available;
}

.chat-box::-webkit-scrollbar {
    width: 6px;
}

.chat-box::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 10px;
}

.chat-box::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

.input-area {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.user-input {
    width: 100%;
    min-height: 60px;
    max-height: 120px;
    padding: 12px 15px;
    font-size: 16px;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    background: white;
    color: #333;
    resize: vertical;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
    overflow-y: auto;
}

/* Hide scrollbar for Chrome, Safari and Opera */
.user-input::-webkit-scrollbar {
    width: 8px;
}

.user-input::-webkit-scrollbar-track {
    background: transparent;
}

.user-input::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    border: 2px solid white;
}

.user-input::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}

/* For Firefox */
.user-input {
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
}

.user-input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.input-controls {
    display: flex;
    flex-direction: row;
    margin-left: auto;
    gap: 16px;
    flex-wrap: wrap;
}

.mic-toggle-btn,
.send-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
}

.mic-toggle-btn {
    background: linear-gradient(135deg, #6c757d, #495057);
    color: #9a2727;
    transition: all 0.3s ease;
}

.mic-toggle-btn:hover {
    background: linear-gradient(135deg, #5a6268, #3d4248);
}

.mic-toggle-btn.recording {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: #ff6b6b;
    box-shadow: 0 0 20px rgba(220, 53, 69, 0.5);
}

.mic-toggle-btn.recording:hover {
    background: linear-gradient(135deg, #c82333, #bd2130);
}

.mic-toggle-btn.active {
    background: #dc3545;
    color: white;
}

.send-btn {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
}

.send-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #0056b3, #003d82);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4);
}

.send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.send-btn svg {
    width: 20px;
    height: 20px;
}

/* Mobile adjustments for chatbot modal */
@media screen and (max-width: 768px) {
    .chatbot-modal-content {
        width: 100%;
        max-width: 100%;
        height: max-content;
        max-height: 60vh;
        border-radius: 20px 20px 0 0;
    }

    .chatbot-modal-header {
        padding: 15px 20px;
    }

    .chatbot-modal-header h2 {
        font-size: 20px;
    }

    .chatbot-modal-content .chat-section {
        padding: 15px 20px;
    }

    .input-controls {
        flex-direction: column;
        width: 100%;
    }

    .mic-toggle-btn,
    .send-btn {
        width: 36px;
        height: 36px;
        padding: 0;
        border-radius: 50%;
        gap: 0;
    }

    .button-text {
        display: inline;
    }
}

@media screen and (max-width: 480px) {
    .chatbot-video-container {
        aspect-ratio: 4/3;
    }

    .chat-box {
        min-height: 150px;
        max-height: -webkit-fill-available;
    }
}
