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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #0f0f0f;
    color: #e5e5e5;
    min-height: 100vh;
    display: flex;
    justify-content: center;
}

.container {
    width: 100%;
    max-width: 640px;
    padding: 2rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

header {
    text-align: center;
}

h1 {
    font-size: 1.75rem;
    font-weight: 700;
    background: linear-gradient(135deg, #a78bfa, #60a5fa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    color: #888;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.card {
    background: #1a1a2e;
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #aaa;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.form-row {
    display: flex;
    gap: 1rem;
}

.form-row .form-group {
    flex: 1;
}

textarea {
    width: 100%;
    padding: 0.75rem;
    border-radius: 8px;
    border: 1px solid #333;
    background: #16213e;
    color: #e5e5e5;
    font-size: 1rem;
    resize: vertical;
    font-family: inherit;
}

textarea:focus {
    outline: none;
    border-color: #a78bfa;
}

select {
    padding: 0.6rem 0.75rem;
    border-radius: 8px;
    border: 1px solid #333;
    background: #16213e;
    color: #e5e5e5;
    font-size: 0.9rem;
    cursor: pointer;
}

select:focus {
    outline: none;
    border-color: #a78bfa;
}

button {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
}

#speak-btn {
    background: linear-gradient(135deg, #a78bfa, #60a5fa);
    color: #fff;
}

#speak-btn:hover {
    opacity: 0.9;
}

#speak-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-secondary {
    background: #333;
    color: #e5e5e5;
}

.btn-secondary:hover {
    background: #444;
}

.status {
    font-size: 0.85rem;
    color: #888;
    min-height: 1.2em;
}

.status.is-active {
    color: #60a5fa;
}

.status.is-error {
    color: #ef4444;
}

#player {
    width: 100%;
}

#player-card {
    align-items: center;
}

footer {
    text-align: center;
    font-size: 0.75rem;
    color: #555;
}

footer a {
    color: #777;
}

@media (max-width: 480px) {
    .container {
        padding: 1rem 0.75rem;
    }
    .card {
        padding: 1rem;
    }
}
