:root {
    --primary: #00d2ff;
    --secondary: #3a7bd5;
    --bg-dark: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.7);
    --text-main: #f8fafc;
    --text-dim: #94a3b8;
    --accent: #38bdf8;
    --radius: 12px;
    --glass-border: rgba(255, 255, 255, 0.1);
}

/* Language Switcher - Extreme Visibility & Fixed Right */
.lang-switcher {
    position: fixed !important;
    top: 20px !important;
    right: 20px !important;
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    background: #1e293b !important;
    padding: 10px 15px !important;
    border-radius: 50px !important;
    border: 3px solid #00d2ff !important;
    box-shadow: 0 0 30px rgba(0, 210, 255, 0.8) !important;
    z-index: 99999 !important;
}

.lang-icon {
    font-size: 1.6rem !important;
    margin-right: 5px !important;
}

.lang-btn {
    background: #0f172a !important;
    border: 1px solid #334155 !important;
    color: #94a3b8 !important;
    padding: 8px 18px !important;
    border-radius: 30px !important;
    font-size: 1.1rem !important;
    font-weight: 900 !important;
    cursor: pointer !important;
    transition: all 0.3s !important;
}

.lang-btn.active {
    background: linear-gradient(135deg, #00d2ff, #3a7bd5) !important;
    color: white !important;
    border-color: #00d2ff !important;
    box-shadow: 0 0 15px rgba(0, 210, 255, 0.5) !important;
}

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

body {
    font-family: 'Inter', sans-serif;
    background: radial-gradient(circle at top left, #1e293b, #0f172a);
    color: var(--text-main);
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 20px;
}

header {
    text-align: center;
    margin-bottom: 40px;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 8px;
}

.logo h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -1px;
}

.logo h1 span {
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.sparkle {
    font-size: 2rem;
    animation: pulse 2s infinite;
}

.subtitle {
    color: var(--text-dim);
    font-size: 1.1rem;
}

.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.input-section {
    margin-bottom: 24px;
}

label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--accent);
}

textarea {
    width: 100%;
    height: 150px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    color: white;
    padding: 16px;
    font-family: inherit;
    font-size: 1rem;
    resize: none;
    transition: all 0.3s;
}

textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(0, 210, 255, 0.2);
}

.char-count {
    text-align: right;
    font-size: 0.8rem;
    color: var(--text-dim);
    margin-top: 4px;
}

.controls-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.control-group select {
    width: 100%;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: white;
    padding: 10px;
    cursor: pointer;
}

/* Segmented Control */
.segmented-control {
    display: flex;
    background: rgba(15, 23, 42, 0.6);
    border-radius: 8px;
    padding: 4px;
    border: 1px solid var(--glass-border);
}

.segmented-control input {
    display: none;
}

.segmented-control label {
    flex: 1;
    text-align: center;
    padding: 8px;
    margin-bottom: 0;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s;
    font-size: 0.9rem;
    color: var(--text-dim);
}

.segmented-control input:checked+label {
    background: var(--secondary);
    color: white;
}

/* Accordion */
.accordion-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    background: none;
    border: none;
    color: var(--accent);
    font-weight: 600;
    padding: 12px 0;
    cursor: pointer;
    border-top: 1px solid var(--glass-border);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.accordion-content.active {
    max-height: 300px;
    margin-bottom: 20px;
}

.upload-area {
    margin: 10px 0;
    border: 2px dashed var(--glass-border);
    border-radius: 8px;
    text-align: center;
    padding: 20px;
    transition: all 0.3s;
}

.upload-area:hover {
    border-color: var(--primary);
    background: rgba(0, 210, 255, 0.05);
}

#prompt-speech {
    display: none;
}

.upload-icon {
    font-size: 24px;
    margin-bottom: 8px;
}

.input-group input {
    width: 100%;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: white;
    padding: 10px;
}

.action-section {
    margin-top: 30px;
    text-align: center;
}

.primary-btn {
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border: none;
    border-radius: 30px;
    color: white;
    padding: 14px 40px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(0, 210, 255, 0.3);
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 210, 255, 0.4);
}

.primary-btn:active {
    transform: translateY(0);
}

.results-container {
    margin-top: 40px;
}

.audio-card {
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 20px;
    animation: slideUp 0.4s ease-out;
}

.audio-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
}

.audio-header h3 {
    font-size: 1rem;
    color: var(--accent);
}

.timestamp {
    font-size: 0.8rem;
    color: var(--text-dim);
}

audio {
    width: 100%;
    margin-bottom: 15px;
}

.audio-actions {
    display: flex;
    justify-content: flex-end;
}

.download-link {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Loader */
.loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.hidden {
    display: none;
}

.loader-content {
    text-align: center;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(0, 210, 255, 0.1);
    border-top: 3px solid var(--primary);
    border-radius: 50%;
    margin: 0 auto 20px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

footer {
    text-align: center;
    margin-top: 60px;
    color: var(--text-dim);
    font-size: 0.9rem;
}

@media (max-width: 600px) {
    .controls-grid {
        grid-template-columns: 1fr;
    }
}



header {
    position: relative;
}