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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #0a0a0f;
    color: #ffffff;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Nebula background */
.nebula-background {
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at 20% 30%, rgba(255, 215, 0, 0.2) 0%, transparent 50%),
                radial-gradient(circle at 80% 70%, rgba(255, 165, 0, 0.15) 0%, transparent 50%),
                radial-gradient(circle at 50% 50%, rgba(255, 255, 0, 0.1) 0%, transparent 50%);
    animation: nebula-drift 20s ease-in-out infinite;
}

@keyframes nebula-drift {
    0%, 100% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.1) rotate(180deg); }
}

/* Animated glow overlays */
.glow-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
}

.glow-sphere {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    animation: pulse-glow 4s ease-in-out infinite;
}

.glow-sphere:nth-child(1) {
    top: 25%;
    left: 25%;
    width: 400px;
    height: 400px;
    background: rgba(255, 165, 0, 0.2);
}

.glow-sphere:nth-child(2) {
    bottom: 25%;
    right: 25%;
    width: 400px;
    height: 400px;
    background: rgba(255, 215, 0, 0.2);
    animation-delay: 1s;
}

.glow-sphere:nth-child(3) {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: rgba(255, 255, 0, 0.1);
    animation-delay: 2s;
}

@keyframes pulse-glow {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.1); }
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 1rem 2rem;
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header h1 {
    font-size: 2rem;
    font-weight: 900;
    font-family: 'Courier New', monospace;
    background: linear-gradient(to right, #FFA500, #FFD700, #FFFF00);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 2px 2px 0px rgba(0, 0, 0, 0.3);
    letter-spacing: 3px;
    transform: skew(-5deg);
    text-transform: uppercase;
}

/* Language selector */
.language-selector {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.language-flag {
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 40px;
    position: relative;
    text-decoration: none;
    color: inherit;
}

.language-flag:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px) scale(1.1);
}

.language-flag.active {
    background: linear-gradient(135deg, #00bfff, #8a2be2);
    border-color: transparent;
    box-shadow: 0 0 20px rgba(255, 165, 0, 0.3);
}

.language-flag.recording {
    animation: pulse 1s ease-in-out infinite;
    background: linear-gradient(135deg, #ff4444, #cc0000);
    box-shadow: 0 0 30px rgba(255, 68, 68, 0.5);
}

.language-more {
    padding: 0;
    background: transparent;
    border: 1px solid rgba(255, 220, 80, 0.45);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    color: rgba(255, 220, 80, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    box-shadow:
        0 0 6px rgba(255, 220, 80, 0.25),
        0 0 14px rgba(255, 200, 0, 0.1),
        inset 0 0 8px rgba(255, 220, 80, 0.05);
}

.language-more:hover {
    border-color: rgba(255, 220, 80, 0.8);
    color: rgba(255, 220, 80, 1);
    box-shadow:
        0 0 10px rgba(255, 220, 80, 0.5),
        0 0 24px rgba(255, 200, 0, 0.25),
        inset 0 0 12px rgba(255, 220, 80, 0.08);
    transform: rotate(45deg);
}

.language-more-wrapper {
    position: relative;
}

.language-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background: none;
    border: none;
    padding: 0;
    flex-direction: column;
    align-items: center;
    gap: 0;
    z-index: 200;
}

.language-dropdown.show {
    display: flex;
}

.language-option {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.3rem 0.5rem;
    text-decoration: none;
    font-size: 1.4rem;
    transition: transform 0.25s ease, filter 0.25s ease;
    filter: brightness(0.75) drop-shadow(0 2px 4px rgba(0,0,0,0.5));
    transform-origin: top center;
}

.language-option:hover {
    transform: scale(1.2) translateX(-2px);
    filter: brightness(1.1)
            drop-shadow(0 0 6px rgba(255, 220, 80, 0.7))
            drop-shadow(0 0 12px rgba(255, 200, 0, 0.4));
}

.language-option.active {
    filter: brightness(1.05)
            drop-shadow(0 0 8px rgba(255, 220, 80, 0.8))
            drop-shadow(0 0 18px rgba(255, 200, 0, 0.45));
}

.lang-divider {
    width: 1px;
    height: 1.4rem;
    background: linear-gradient(
        to bottom,
        rgba(255, 220, 80, 0.9),
        rgba(255, 200, 0, 0.9)
    );
    box-shadow:
        0 0 4px rgba(255, 220, 80, 0.7),
        0 0 10px rgba(255, 200, 0, 0.35);
    flex-shrink: 0;
}

.header-buttons {
    display: flex;
    gap: 0.5rem;
}

.header-button {
    padding: 0.5rem 1rem;
    background: none;
    border: none;
    box-shadow: none;
    font-family: 'Raleway', sans-serif;
    font-size: 0.96rem;
    font-weight: 300;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    background-image: linear-gradient(to right, #FFA500, #FFD700, #FFFF00);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header-button:hover {
    transform: translateY(-1px);
    filter: brightness(1.2);
}

.header-button.active {
    background-image: linear-gradient(to right, #FFA500, #FFD700, #FFFF00);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: brightness(1.15);
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

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

@keyframes fade-in {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Voice recorder */
.voice-recorder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.record-button {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff1493, #8a2be2);
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.record-button:hover {
    transform: scale(1.1);
    box-shadow: 0 0 30px rgba(255, 255, 0, 0.5);
}

.record-button.recording {
    animation: pulse 1s ease-in-out infinite;
    background: linear-gradient(135deg, #ff4444, #cc0000);
}

.status-text {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.875rem;
}

/* Responsive - Tablets */
@media (max-width: 768px) {
    .header {
        padding: 0.75rem 1rem;
    }

    .header h1 {
        font-size: 1.5rem;
        letter-spacing: 2px;
    }

    .language-flag {
        width: 40px;
        height: 34px;
        font-size: 1rem;
        padding: 0.3rem;
    }

    .language-more {
        width: 34px;
        height: 34px;
        font-size: 0.9rem;
    }

    .header-button {
        padding: 0.4rem 0.75rem;
        font-size: 0.8rem;
    }

    .main-content {
        padding: 1rem;
        padding-top: 5rem;
    }

    .title-section {
        margin-bottom: 2rem;
    }

    .voice-wall {
        height: 300px;
    }

    .glow-sphere:nth-child(1),
    .glow-sphere:nth-child(2) {
        width: 250px;
        height: 250px;
    }

    .glow-sphere:nth-child(3) {
        width: 350px;
        height: 350px;
    }
}

/* Responsive - Mobile */
@media (max-width: 480px) {
    .header {
        padding: 0.5rem 0.6rem;
        gap: 0.3rem;
    }

    .header h1 {
        font-size: 1.1rem;
        letter-spacing: 1px;
    }

    .language-selector {
        gap: 0.25rem;
    }

    .language-flag {
        width: 32px;
        height: 28px;
        font-size: 0.85rem;
        padding: 0.2rem;
        border-radius: 0.35rem;
    }

    .language-more {
        width: 28px;
        height: 28px;
        font-size: 0.8rem;
        border-radius: 0.35rem;
    }

    .header-buttons {
        gap: 0.25rem;
    }

    .header-button {
        padding: 0.3rem 0.5rem;
        font-size: 0.7rem;
        border-radius: 0.35rem;
    }

    .main-content {
        padding: 0.5rem;
        padding-top: 4rem;
    }

    .glow-sphere:nth-child(1),
    .glow-sphere:nth-child(2) {
        width: 150px;
        height: 150px;
    }

    .glow-sphere:nth-child(3) {
        width: 200px;
        height: 200px;
    }

    .record-button {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
}