/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-display: swap; /* Optimize font loading for Core Web Vitals */
}

/* SEO and Performance optimizations */
html {
    scroll-behavior: smooth;
}

/* Reduce layout shift */
#container {
    min-height: 100vh;
    contain: layout style paint;
}

/* Optimize loading states */
.loading {
    contain: layout style paint;
    will-change: opacity;
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

:root {
    /* Color theme variables - easily customizable based on logo colors */
    --primary-color: #764ba2;
    --secondary-color: #667eea;
    --accent-color: #f093fb;
    --text-light: #ffffff;
    --text-dark: #2d3748;
    --bg-overlay: rgba(102, 126, 234, 0.1);
    --nav-bg: transparent;
    --nav-bg-mobile: rgba(255, 255, 255, 0.95);
    --gradient-primary: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    --gradient-accent: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
    --shadow-color: rgba(102, 126, 234, 0.3);
    --border-color: rgba(255, 255, 255, 0.2);
}

body {
    font-family: 'Arial', sans-serif;
    overflow: hidden;
    background: #87CEEB; /* Sky blue to match 3D scene background */
}

/* Header styles */
#header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: transparent;
    border-bottom: 1px solid transparent;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 30px 0 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

/* #header:hover {
    background: rgba(255, 255, 255, 0.15);
    border-bottom-color: var(--primary-color);
    box-shadow: 0 4px 20px rgba(255, 255, 255, 0.2);
} */

/* Content Overlays */
#content-overlays {
    position: fixed;
    top: 50px; /* Position below the header (80px height) */
    left: 0;
    right: 0;
    z-index: 500;
    pointer-events: none;
}

.content-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    /*padding: 40px 30px 40px 30px;*/ /* Reduced padding for top positioning */
    transition: opacity 0.3s ease, visibility 0.3s ease;
    
    /* Ensure overlay content is positioned correctly at top */
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.content-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.overlay-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    
    /* Enhanced background for better readability */
    /* background: rgba(0, 0, 0, 0.75); */
    /* backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px); */
    /* border-radius: 20px; */
    padding: 40px 30px;
    /* border: 1px solid rgba(255, 255, 255, 0.1); */
    /* box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1); */
    
    /* Subtle gradient overlay for depth */
    position: relative;
    
    /* Smooth entrance animation from top */
    transform: translateY(-30px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.content-overlay.active .overlay-content {
    transform: translateY(0) scale(1);
}

.overlay-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    /* background: linear-gradient(
        135deg,
        rgba(102, 126, 234, 0.1) 0%,
        rgba(118, 75, 162, 0.1) 50%,
        rgba(240, 147, 251, 0.1) 100%
    ); */
    /* border-radius: 20px; */
    pointer-events: none;
    z-index: -1;
}

/* Content elements start hidden and animate in */
.content-overlay .overlay-title,
.content-overlay .overlay-description,
.content-overlay .overlay-features {
    opacity: 0;
    transform: translateY(-30px) scale(0.9);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Staggered animation delays for quick sequential appearance */
.content-overlay.active .overlay-title {
    opacity: 1;
    transform: translateY(0) scale(1);
    transition-delay: 0.05s;
}

.content-overlay.active .overlay-description {
    opacity: 1;
    transform: translateY(0) scale(1);
    transition-delay: 0.1s;
}

.content-overlay.active .overlay-features {
    opacity: 1;
    transform: translateY(0) scale(1);
    transition-delay: 0.15s;
}

/* Individual feature tag animations */
.content-overlay .feature-tag {
    opacity: 0;
    transform: translateY(20px) scale(0.8);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.content-overlay.active .feature-tag:nth-child(1) {
    opacity: 1;
    transform: translateY(0) scale(1);
    transition-delay: 0.2s;
}

.content-overlay.active .feature-tag:nth-child(2) {
    opacity: 1;
    transform: translateY(0) scale(1);
    transition-delay: 0.25s;
}

.content-overlay.active .feature-tag:nth-child(3) {
    opacity: 1;
    transform: translateY(0) scale(1);
    transition-delay: 0.3s;
}

.overlay-title {
    font-size: 3rem;
    font-weight: 800;
    color: var(--text-light);
    margin-bottom: 20px;
    /* background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color:; */
    /* background-clip: text; */
    letter-spacing: -0.02em;
    
    /* Enhanced visibility with background */
    /* text-shadow: 0 2px 10px rgba(102, 126, 234, 0.3); */
    position: relative;
    z-index: 1;
}

/* Fallback for browsers that don't support background-clip */
@supports not (-webkit-background-clip: text) {
    .overlay-title {
        color: #ffffff;
        text-shadow: 
            0 2px 10px rgba(102, 126, 234, 0.6),
            0 0 20px rgba(102, 126, 234, 0.4);
    }
}

.overlay-description {
    font-size: 1.25rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 30px;
    max-width: 800px;
    font-weight: 400;
    
    /* Enhanced readability */
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    position: relative;
    z-index: 1;
}

.overlay-features {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

.overlay-features .feature-tag {
    padding: 12px 24px;
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 30px;
    color: var(--text-light);
    font-size: 0.9rem;
    font-weight: 700;
    backdrop-filter: blur(15px);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.overlay-features .feature-tag:hover {
    background: var(--gradient-primary);
    border-color: var(--primary-color);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.5);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
}

/* Mobile overlay styles */
@media (max-width: 768px) {
    .content-overlay {
        padding: 30px 20px 100px 20px; /* Extra bottom padding for mobile */
    }
    
    .overlay-content {
        padding: 30px 25px;
        border-radius: 16px;
    }
    
    .overlay-content::before {
        border-radius: 16px;
    }
    
    .overlay-title {
        font-size: 2.5rem;
        margin-bottom: 15px;
    }
    
    .overlay-description {
        font-size: 1.1rem;
        margin-bottom: 25px;
    }
    
    .overlay-features .feature-tag {
        font-size: 0.85rem;
        padding: 10px 20px;
    }
}

@media (max-width: 480px) {
    .content-overlay {
        padding: 25px 15px 100px 15px; /* Extra bottom padding for small mobile */
    }
    
    .overlay-content {
        padding: 25px 20px;
        border-radius: 12px;
        /*background: rgba(0, 0, 0, 0.8); */ /* Slightly more opaque on small screens */
    }
    
    .overlay-content::before {
        border-radius: 12px;
    }
    
    .overlay-title {
        font-size: 2rem;
        margin-bottom: 12px;
    }
    
    .overlay-description {
        font-size: 1rem;
        margin-bottom: 20px;
    }
    
    .overlay-features {
        gap: 10px;
    }
    
    .overlay-features .feature-tag {
        font-size: 0.8rem;
        padding: 8px 16px;
    }
}

/* Logo styles */
.logo {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    cursor: pointer;
    min-height: 60px;
}

.logo-image {
    max-width: 260px;
    max-height: 156px;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
}

/* Navigation styles */
#navigation {
    position: relative;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
    margin: 0;
    padding: 0;
}

.nav-menu li a {
    color: var(--text-light);
    text-decoration: none;
    font-size: 16px;
    font-weight: 700;
    padding: 12px 20px;
    border-radius: 12px;
    transition: all 0.3s ease;
    position: relative;
    background: transparent;
    border: none;
}

.nav-menu li a:hover {
    background: var(--primary-color);
    color: var(--text-light);
    font-weight: 800;
    transform: translateY(-2px);
}

.nav-menu li a.active {
    background: var(--primary-color);
    color: var(--text-light);
    border: none;
}

/* Hamburger menu */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
    padding: 12px;
    border-radius: 12px;
    transition: all 0.3s ease;
    background: var(--primary-color);
    border: none;
    z-index: 1001;
}

.hamburger:hover {
    background: var(--secondary-color);
    transform: scale(1.05);
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--text-light);
    transition: all 0.3s ease;
    transform-origin: center;
    border-radius: 2px;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

#container {
    position: relative;
    width: 100vw;
    height: 100vh;
}

#three-canvas {
    display: block;
    width: 100%;
    height: 100%;
}

/* Loading screen */
.loading {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #87CEEB; /* Sky blue to match document background */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    transition: opacity 0.5s ease-out;
}

.loading-content {
    text-align: center;
    max-width: 400px;
    width: 90%;
}

.loading-text {
    color: white;
    font-size: 24px;
    font-weight: bold;
    text-shadow: 0 2px 8px rgba(0,0,0,0.7);
    margin-bottom: 10px;
}

.loading-stage {
    color: rgba(255, 255, 255, 0.9);
    font-size: 16px;
    margin-bottom: 30px;
    min-height: 20px;
    transition: all 0.3s ease;
    text-shadow: 0 1px 4px rgba(0,0,0,0.6);
}

.loading-bar-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.loading-bar {
    flex: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.loading-bar-fill {
    height: 100%;
    background: var(--gradient-accent);
    border-radius: 3px;
    width: 0%;
    transition: width 0.3s ease;
    box-shadow: 0 0 20px var(--accent-color);
}

.loading-percentage {
    color: white;
    font-size: 14px;
    font-weight: bold;
    min-width: 35px;
    text-align: right;
    text-shadow: 0 1px 4px rgba(0,0,0,0.6);
}

@keyframes pulse {
    0%, 100% { opacity: 0.8; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.05); }
}

/* Drag Indicator Styles */
.drag-indicator {
    position: fixed;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s ease;
    pointer-events: none;
}

.drag-indicator.visible {
    opacity: 1;
    visibility: visible;
}

.drag-content {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 12px 20px;
    border-radius: 25px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.hand-icon {
    font-size: 20px;
    animation: handWave 2s ease-in-out infinite;
    display: flex;
    align-items: center;
    justify-content: center;
}

.drag-text {
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

/* Hand wave animation - left to right */
@keyframes handWave {
    0%, 100% {
        transform: translateX(0) rotate(0deg);
    }
    25% {
        transform: translateX(8px) rotate(15deg);
    }
    50% {
        transform: translateX(16px) rotate(0deg);
    }
    75% {
        transform: translateX(8px) rotate(-15deg);
    }
}

/* Responsive adjustments for drag indicator */
@media (max-width: 768px) {
    .drag-indicator {
        top: 20px;
    }
    
    .drag-content {
        padding: 10px 16px;
        gap: 10px;
    }
    
    .hand-icon {
        font-size: 18px;
    }
    
    .drag-text {
        font-size: 13px;
    }
}

/* Auto-hide animation after showing */
.drag-indicator.auto-hide {
    animation: fadeOutAfterDelay 2s ease-in-out forwards;
}

@keyframes fadeOutAfterDelay {
    0%, 83.33% { /* Show for 5 seconds (5/6 = 83.33%) */
        opacity: 1;
        visibility: visible;
    }
    100% {
        opacity: 0;
        visibility: hidden;
    }
}

/* Help icon */
.help-icon {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 56px;
    height: 56px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1000;
    transition: all 0.3s ease;
    border: 2px solid var(--border-color);
    box-shadow: 0 4px 20px var(--shadow-color);
}

.help-icon:hover {
    background: var(--gradient-accent);
    box-shadow: 0 6px 30px var(--shadow-color);
    transform: scale(1.1);
}

.help-icon::before {
    content: "?";
    color: white;
    font-size: 24px;
    font-weight: bold;
}

/* Controls info panel */
.controls-info {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: rgba(0, 0, 0, 0.85);
    color: var(--text-light);
    padding: 24px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.6;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    z-index: 1001;
    max-width: 320px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    transform: translateY(100%);
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
}

.controls-info.visible {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.controls-info-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.controls-info-title {
    font-size: 16px;
    font-weight: bold;
    color: var(--text-light);
}

.close-button {
    width: 24px;
    height: 24px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.close-button:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.close-button::before {
    content: "×";
    color: white;
    font-size: 16px;
    font-weight: bold;
    line-height: 1;
}

.controls-info:hover {
    opacity: 0.9;
}

.controls-info div {
    margin-bottom: 5px;
}

.controls-info div:last-child {
    margin-bottom: 0;
}

/* Mobile Navigation */
@media (max-width: 950px) {
    #header {
        padding: 0 20px 0 0;
        height: 70px;
    }
    
    .logo {
        padding: 0;
        min-height: 50px;
    }
    
    .logo-image {
        max-width: 208px;
        max-height: 130px;
        width: auto;
        height: auto;
    }
    
    .hamburger {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: 70px;
        right: -100%;
        width: 300px;
        height: calc(100vh - 70px);
        background: var(--nav-bg-mobile);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        padding-top: 50px;
        gap: 0;
        transition: right 0.3s ease;
        border-left: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .nav-menu.active {
        right: 0;
    }
    
    .nav-menu li {
        width: 100%;
        text-align: center;
        margin-bottom: 20px;
    }
    
    .nav-menu li a {
        display: block;
        width: 80%;
        margin: 0 auto;
        padding: 20px;
        font-size: 18px;
        border: 1px solid var(--border-color);
        margin-bottom: 15px;
        color: var(--text-dark);
        font-weight: 600;
    }
    
    .nav-menu li a:hover {
        color: var(--text-light);
    }
    
    .help-icon {
        bottom: 15px;
        left: 15px;
        width: 45px;
        height: 45px;
    }
    
    .help-icon::before {
        font-size: 20px;
    }
    
    .controls-info {
        bottom: 15px;
        left: 15px;
        padding: 15px;
        font-size: 12px;
        max-width: 280px;
    }
    
    .controls-info-title {
        font-size: 14px;
    }
    
    .loading-text {
        font-size: 18px;
    }
    
    .loading-stage {
        font-size: 14px;
        margin-bottom: 20px;
    }
    
    .loading-bar-container {
        gap: 10px;
    }
    
    .loading-percentage {
        font-size: 12px;
        min-width: 30px;
    }
}

@media (max-width: 480px) {
    #header {
        padding: 0 15px 0 0;
        height: 60px;
    }
    
    .logo {
        padding: 0;
        min-height: 40px;
    }
    
    .logo-image {
        max-width: 156px;
        max-height: 104px;
        width: auto;
        height: auto;
    }
    
    .nav-menu {
        top: 60px;
        width: 280px;
        height: calc(100vh - 60px);
    }
    
    .nav-menu li a {
        font-size: 16px;
        padding: 15px;
    }
    
    .help-icon {
        bottom: 10px;
        left: 10px;
        width: 40px;
        height: 40px;
    }
    
    .help-icon::before {
        font-size: 18px;
    }
    
    .controls-info {
        bottom: 10px;
        left: 10px;
        font-size: 11px;
        padding: 12px;
        max-width: 250px;
    }
    
    .controls-info-title {
        font-size: 13px;
    }
    
    .close-button {
        width: 20px;
        height: 20px;
    }
    
    .close-button::before {
        font-size: 14px;
    }
}

/* Custom scrollbar for webkit browsers */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* Performance optimization */
#three-canvas {
    image-rendering: optimizeSpeed;
    image-rendering: -moz-crisp-edges;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: optimize-contrast;
    -ms-interpolation-mode: nearest-neighbor;
}

/* Chat Button Styling */
#chatButton {
    background: var(--primary-color);
    border: none;
    color: white;
    padding: 16px 32px;
    font-size: 16px;
    font-weight: 700;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    min-width: 180px;
    text-align: center;
    letter-spacing: 0.5px;
    text-transform: none;
    margin-top: 20px;
}

#chatButton:hover {
    background: var(--secondary-color);
    transform: translateY(-3px) scale(1.05);
}

#chatButton:active {
    transform: translateY(-1px) scale(1.02);
    transition: all 0.1s;
}

#chatButton:focus {
    outline: none;
    background: var(--secondary-color);
}

/* Pulsing animation for chat button when auto-rotation is active */
#chatButton.auto-rotating {
    animation: chatPulse 3s ease-in-out infinite;
}

@keyframes chatPulse {
    0%, 100% {
        background: var(--primary-color);
    }
    50% {
        background: var(--secondary-color);
    }
}

/* Chat button responsive styling */
@media (max-width: 768px) {
    #chatButton {
        padding: 14px 28px;
        font-size: 15px;
        min-width: 160px;
        margin-top: 15px;
    }
}

@media (max-width: 480px) {
    #chatButton {
        padding: 12px 24px;
        font-size: 14px;
        min-width: 140px;
        margin-top: 12px;
    }
}

/* Focus styles for accessibility */
.controls-info:focus {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}

/* Sound Toggle Button Styles (Bottom Left) */
.sound-toggle-container-bottom {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 1000;
    display: flex;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s ease;
}

.sound-toggle-container-bottom.model-loaded {
    opacity: 1;
    visibility: visible;
}

.sound-toggle-btn {
    background: var(--primary-color);
    border: none;
    color: var(--text-light);
    padding: 15px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
}

.sound-toggle-btn .sound-icon {
    width: 24px;
    height: 24px;
    filter: brightness(0) invert(1); /* Make icon white */
    transition: all 0.3s ease;
}

.sound-toggle-btn:hover {
    background: var(--secondary-color);
    transform: scale(1.1);
}

.sound-toggle-btn.muted {
    opacity: 0.7;
}

.sound-toggle-btn.muted .sound-icon {
    opacity: 0.7;
}

/* Responsive design for sound toggle */
@media (max-width: 768px) {
    .sound-toggle-container-bottom {
        bottom: 20px;
        left: 20px;
    }
    
    .sound-toggle-btn {
        width: 64px;
        height: 64px;
        padding: 12px;
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .sound-toggle-container-bottom {
        bottom: 20px;
        left: 20px;
    }
    
    .sound-toggle-btn {
        width: 64px;
        height: 64px;
        padding: 10px;
        font-size: 16px;
    }
}

/* Sound Confirmation Popup Styles */
.sound-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.sound-popup.show {
    opacity: 1;
    visibility: visible;
}

.sound-popup-content {
    background: var(--bg-overlay);
    border: none;
    border-radius: 20px;
    padding: 0;
    max-width: 450px;
    width: 90%;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.sound-popup.show .sound-popup-content {
    transform: scale(1);
}

.sound-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 30px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

.sound-popup-header h3 {
    margin: 0;
    color: var(--text-light);
    font-size: 20px;
    font-weight: 700;
}

.close-popup-btn {
    background: var(--primary-color);
    border: none;
    color: var(--text-light);
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.close-popup-btn:hover {
    background: var(--secondary-color);
    transform: scale(1.1);
}

.sound-popup-body {
    padding: 25px 30px 30px;
}

.sound-popup-body p {
    margin: 0 0 25px 0;
    color: var(--text-light);
    font-size: 16px;
    line-height: 1.6;
    opacity: 0.9;
}

.sound-popup-options {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.sound-option-btn {
    flex: 1;
    min-width: 150px;
    padding: 15px 20px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.enable-btn {
    background: var(--primary-color);
    color: var(--text-light);
    border: none;
}

.enable-btn:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
}

.disable-btn {
    background: #666666;
    color: var(--text-light);
    border: none;
}

.disable-btn:hover {
    background: #888888;
    transform: translateY(-2px);
}

/* Responsive design for sound popup */
@media (max-width: 768px) {
    .sound-popup-content {
        width: 95%;
        max-width: 400px;
    }
    
    .sound-popup-header {
        padding: 20px 25px 15px;
    }
    
    .sound-popup-header h3 {
        font-size: 18px;
    }
    
    .sound-popup-body {
        padding: 20px 25px 25px;
    }
    
    .sound-popup-options {
        flex-direction: column;
    }
    
    .sound-option-btn {
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .sound-popup-content {
        width: 98%;
        max-width: 350px;
    }
    
    .sound-popup-header {
        padding: 18px 20px 12px;
    }
    
    .sound-popup-header h3 {
        font-size: 16px;
    }
    
    .sound-popup-body {
        padding: 18px 20px 20px;
    }
    
    .sound-popup-body p {
        font-size: 14px;
    }
    
    .sound-option-btn {
        padding: 12px 16px;
        font-size: 14px;
    }
}
