/* ====================================================================
   Translator - Estilos base de la app
   Variables CSS para tema, controles de formulario, layout móvil
==================================================================== */

:root {
    --primary:      #1d9e75;
    --primary-dark: #157a5a;
    --bg:           #ffffff;
    --surface:      #f7f7f8;
    --text:         #1a1a1a;
    --text-soft:    #6b6b6b;
    --border:       #e0e0e0;
    --error:        #d34;
    --radius:       12px;
    --max-w:        640px;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg:           #131314;
        --surface:      #1e1f20;
        --text:         #e9e9ea;
        --text-soft:    #a8a8a9;
        --border:       #303133;
    }
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
                 "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5;
}

#app {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 20px 16px 80px;
    min-height: 100vh;
}

.view {
    animation: fade-in 0.2s ease-out;
}

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

header {
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

header h1 {
    font-size: 24px;
    margin: 0;
    flex: 1;
}

.subtitle {
    width: 100%;
    color: var(--text-soft);
    font-size: 14px;
    margin: 4px 0 0;
}

label {
    display: block;
    margin-bottom: 16px;
    font-size: 14px;
    color: var(--text-soft);
}

input, select, textarea {
    display: block;
    width: 100%;
    margin-top: 6px;
    padding: 12px 14px;
    background: var(--surface);
    color: var(--text);
    border: 0.5px solid var(--border);
    border-radius: var(--radius);
    font: inherit;
    font-size: 16px;
    -webkit-appearance: none;
    appearance: none;
}

input:focus, select:focus, textarea:focus {
    outline: 2px solid var(--primary);
    outline-offset: 1px;
}

button {
    font: inherit;
    cursor: pointer;
}

button.primary {
    width: 100%;
    padding: 14px 20px;
    margin-top: 8px;
    background: var(--primary);
    color: white;
    border: 0;
    border-radius: var(--radius);
    font-size: 16px;
    font-weight: 500;
}

button.primary:hover { background: var(--primary-dark); }

button.primary:disabled {
    background: var(--border);
    color: var(--text-soft);
    cursor: not-allowed;
}

button.link, .link {
    background: transparent;
    border: 0;
    color: var(--primary);
    text-decoration: none;
    padding: 4px 8px;
    font-size: 14px;
    cursor: pointer;
}

a { color: var(--primary); }

.card {
    background: var(--surface);
    border: 0.5px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 16px;
}

.card h2 {
    font-size: 18px;
    margin: 0 0 8px;
}

.card p {
    margin: 0 0 14px;
    color: var(--text-soft);
    font-size: 14px;
}

.error {
    color: var(--error);
    font-size: 14px;
    margin: 12px 0 0;
}

.hint {
    color: var(--text-soft);
    font-size: 14px;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-soft);
}
