:root {
    --bg-color: #0f172a; /* Slate 900 */
    --text-color: #f8fafc; /* Slate 50 */
    --text-muted: #64748b; /* Slate 500 */
    --accent-color: #3b82f6; /* Blue 500 */
    --accent-glow: rgba(59, 130, 246, 0.5);
    --mic-active: #ef4444; /* Red 500 */
    --mic-active-glow: rgba(239, 68, 68, 0.5);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    height: 100vh;
    height: 100dvh; /* Mobile viewport height fix */
    overflow: hidden;
    display: flex;
    justify-content: center;
}

.app-container {
    width: 100%;
    max-width: 600px;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    background: radial-gradient(circle at top right, #1e293b 0%, var(--bg-color) 70%);
}

.header {
    padding: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 10;
}

.header h1 {
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 16px;
}

.lang-select {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-color);
    padding: 6px 12px;
    border-radius: 8px;
    font-family: 'Outfit', sans-serif;
    font-size: 0.9rem;
    outline: none;
    cursor: pointer;
    backdrop-filter: blur(5px);
}

.lang-select option {
    background: var(--bg-color);
    color: var(--text-color);
}

.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--text-muted);
    transition: all 0.3s ease;
}

.status-indicator.active {
    background-color: var(--mic-active);
    box-shadow: 0 0 10px var(--mic-active-glow);
    animation: pulse 1.5s infinite;
}

.text-container {
    flex: 1;
    padding: 0 24px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow-y: auto;
    /* Hide scrollbar for a cleaner look */
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

.text-container::-webkit-scrollbar {
    display: none;
}

.transcription-wrapper {
    display: flex;
    flex-direction: column-reverse; /* Newest text at the bottom or middle */
    gap: 16px;
    padding-bottom: 120px; /* Space for the floating button */
}

.final-text {
    font-size: 8vw; /* Very large text responsive to width */
    font-weight: 600;
    line-height: 1.2;
    color: var(--text-color);
    text-shadow: 0 4px 20px rgba(0,0,0,0.5);
    word-wrap: break-word;
    transition: opacity 0.3s ease;
}

@media (min-width: 600px) {
    .final-text {
        font-size: 3rem;
    }
}

.interim-text {
    font-size: 6vw;
    font-weight: 300;
    line-height: 1.2;
    color: var(--text-muted);
    word-wrap: break-word;
}

@media (min-width: 600px) {
    .interim-text {
        font-size: 2.2rem;
    }
}

.controls {
    position: absolute;
    bottom: 40px;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    z-index: 20;
}

.mic-btn {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: var(--text-color);
    font-size: 1.8rem;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.mic-btn:active {
    transform: scale(0.9);
}

.mic-btn.active {
    background: var(--mic-active);
    color: white;
    box-shadow: 0 0 30px var(--mic-active-glow);
    border-color: transparent;
}

.mic-btn.active i {
    animation: bounce 1s infinite alternate;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.5); opacity: 0.5; }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes bounce {
    0% { transform: translateY(0); }
    100% { transform: translateY(-3px); }
}
