:root {
    /* Paleta Corporativa Limpia */
    --primary: #0f172a;        /* Azul muy oscuro (casi negro) para botones y títulos */
    --primary-hover: #1e293b;
    --accent: #2563eb;         /* Azul vibrante que transmite confianza */
    --bg-light: #f8fafc;       /* Fondo general gris muy claro */
    --surface: #ffffff;        /* Fondo blanco puro para las tarjetas */
    --text-main: #334155;      /* Texto principal */
    --text-muted: #64748b;     /* Texto secundario/descripciones */
    --border: #e2e8f0;         /* Bordes sutiles */
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

body {
    background-color: var(--bg-light);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem 1rem;
}

/* Container & Clean UI Panel */
.container {
    width: 100%;
    max-width: 550px;
    padding: 2.5rem;
}

.clean-panel {
    background: var(--surface);
    border-radius: 16px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
}

header {
    text-align: center;
    margin-bottom: 2.5rem;
}

header h1 {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.025em;
}

header h1 .accent-text {
    color: var(--accent);
}

header p {
    color: var(--text-muted);
    margin-top: 0.5rem;
    font-size: 1rem;
    font-weight: 400;
}

/* Form Styles */
.input-group {
    margin-bottom: 1.5rem;
}

.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary);
}

.input-group input,
.input-group select,
.input-group textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    border-radius: 8px;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-main);
    font-size: 1rem;
    outline: none;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}

.input-group input::placeholder,
.input-group textarea::placeholder {
    color: #94a3b8;
}

.input-group input:focus,
.input-group select:focus,
.input-group textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

/* Buttons */
.btn-primary, .btn-secondary {
    width: 100%;
    padding: 0.875rem 1rem;
    border-radius: 8px;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    justify-content: center;
    align-items: center;
}

.btn-primary {
    background: var(--primary);
    color: white;
    margin-top: 1rem;
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--surface);
    color: var(--primary);
    border: 1px solid var(--border);
    margin-top: 1.25rem;
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
    background: var(--bg-light);
}

/* Result Section */
.result-section {
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    animation: fadeIn 0.4s ease-out forwards;
}

.result-section h2 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1rem;
}

.result-card {
    background: var(--bg-light);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--border);
}

#generatedText {
    white-space: pre-wrap;
    line-height: 1.6;
    color: var(--text-main);
    font-size: 0.95rem;
}

/* Utilities */
.hidden {
    display: none !important;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Loader */
.loader {
    border: 3px solid rgba(255,255,255,0.2);
    border-top: 3px solid white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* AUTH OVERLAY STYLES */
.auth-overlay { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: rgba(15, 23, 42, 0.85); backdrop-filter: blur(8px); display: flex; justify-content: center; align-items: center; z-index: 9999; }
.auth-modal { width: 90%; max-width: 400px; padding: 2rem; }
.auth-modal h2 { margin-bottom: 1.5rem; text-align: center; }
.auth-modal .input-group { margin-bottom: 1.2rem; }
.hidden { display: none !important; }

/* LOGO STYLES */
.app-logo { max-width: 250px; height: auto; margin-bottom: 0.5rem; display: block; margin-left: auto; margin-right: auto; }
.auth-logo { max-width: 180px; height: auto; display: inline-block; }
