:root {
    --primary: #f43f5e;
    --secondary: #fbbf24;
    --bg: #09090b;
    --card: rgba(255, 255, 255, 0.03);
    --border: rgba(255, 255, 255, 0.08);
    --text: #fafafa;
}

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: 'Inter', sans-serif;
    margin: 0;
    line-height: 1.6;
    background: radial-gradient(circle at bottom left, #18181b 0%, #09090b 100%);
}

#app {
    max-width: 600px;
    margin: 0 auto;
    padding: 2rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

header { text-align: center; margin-bottom: 2rem; }
h1 { font-size: 2.2rem; margin: 0; color: var(--primary); text-shadow: 0 0 15px rgba(244, 63, 94, 0.3); }
header p { opacity: 0.6; font-size: 0.9rem; margin-top: 0.5rem; }

.video-preview-box {
    width: 100%;
    aspect-ratio: 16/9;
    background: #000;
    border: 2px dashed var(--border);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}
.preview-overlay { text-align: center; opacity: 0.4; }
.preview-overlay i { font-size: 3rem; margin-bottom: 1rem; }

.dubbing-controls {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 1.5rem;
    backdrop-filter: blur(10px);
}

.lang-selector label, .voice-option label {
    display: block; font-size: 0.8rem; margin-bottom: 0.8rem; opacity: 0.5;
}

.flag-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 1.5rem;
}
.flag-btn {
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border);
    padding: 0.8rem;
    border-radius: 12px;
    font-size: 0.8rem;
    cursor: pointer;
    text-align: center;
    transition: 0.3s;
}
.flag-btn.active { border-color: var(--primary); background: rgba(244, 63, 94, 0.1); color: var(--primary); font-weight: bold; }

.voice-option select {
    width: 100%;
    background: rgba(0,0,0,0.3);
    border: 1px solid var(--border);
    color: white;
    padding: 0.8rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    outline: none;
}

#dubNowBtn {
    width: 100%;
    padding: 1.2rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 16px;
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
    transition: 0.3s;
}
#dubNowBtn:hover { transform: translateY(-2px); box-shadow: 0 5px 20px rgba(244, 63, 94, 0.4); }

.hidden { display: none !important; }

/* Wave Animation */
.wave-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    height: 60px;
    margin-bottom: 1rem;
}
.wave {
    width: 4px;
    height: 20px;
    background: var(--primary);
    border-radius: 2px;
    animation: wave 1s infinite ease-in-out;
}
.wave:nth-child(2) { animation-delay: 0.2s; }
.wave:nth-child(3) { animation-delay: 0.4s; }

@keyframes wave {
    0%, 100% { height: 10px; }
    50% { height: 40px; }
}

#processStatusText { text-align: center; color: var(--primary); font-weight: bold; font-size: 0.9rem; }

.app-switcher {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: auto;
    padding-top: 3rem;
}
.app-switcher a { text-decoration: none; color: white; font-size: 0.75rem; opacity: 0.4; }
.app-switcher a.active { opacity: 1; color: var(--primary); font-weight: bold; }
footer p { text-align: center; font-size: 0.7rem; opacity: 0.3; margin-top: 2rem; }
