:root {
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --bg: #f8fafc;
    --card-bg: #ffffff;
    --text-main: #0f172a;
    --text-muted: #475569;
    --error: #ef4444;
    --success: #10b981;
    --warning: #f59e0b;
    --radius: 16px;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

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

body {
    font-family: var(--font);
    background: radial-gradient(circle at top right, #eff6ff 0%, #f8fafc 100%);
    color: var(--text-main);
    line-height: 1.6;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.container {
    width: 100%;
    max-width: 440px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

header {
    padding: 32px 0;
    display: flex;
    justify-content: center;
    animation: fadeInDown 0.6s ease-out;
}

main {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.card {
    background: var(--card-bg);
    padding: 48px 32px;
    border-radius: var(--radius);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 10px 10px -5px rgba(0, 0, 0, 0.02);
    text-align: center;
    border: 1px solid rgba(226, 232, 240, 0.8);
    animation: scaleIn 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

h1 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-main);
}

.message {
    color: var(--text-muted);
    font-size: 1rem;
    margin-bottom: 24px;
}

.info-box {
    background-color: #eff6ff;
    border-left: 4px solid var(--primary);
    padding: 16px;
    margin-bottom: 30px;
    border-radius: 4px;
    text-align: left;
}

.info-box p {
    font-size: 0.875rem;
    color: #1e40af;
}

.primary-btn {
    width: 100%;
    background-color: var(--primary);
    color: white;
    border: none;
    padding: 18px 24px;
    font-size: 1.05rem;
    font-weight: 600;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.2);
}

.primary-btn:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.3);
}

.primary-btn:active {
    transform: translateY(0);
}

.primary-btn:disabled {
    background-color: #cbd5e1;
    cursor: not-allowed;
    opacity: 0.7;
    transform: none;
    box-shadow: none;
}

.status-icon {
    margin-bottom: 24px;
    display: flex;
    justify-content: center;
}

.status-icon.info { color: var(--primary); }
.status-icon.success { color: var(--success); }
.status-icon.warning { color: var(--warning); }

.error-msg {
    margin-top: 24px;
    color: var(--error);
    font-size: 0.875rem;
    padding: 12px 16px;
    background: #fef2f2;
    border: 1px solid #fee2e2;
    border-radius: 8px;
    animation: shake 0.4s cubic-bezier(.36,.07,.19,.97) both;
}

.hidden {
    display: none;
}

footer {
    padding: 40px 0 24px;
    text-align: center;
}

footer p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes shake {
    10%, 90% { transform: translate3d(-1px, 0, 0); }
    20%, 80% { transform: translate3d(2px, 0, 0); }
    30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
    40%, 60% { transform: translate3d(4px, 0, 0); }
}

.loading-status {
    display: none; /* Forzado al inicio */
    flex-direction: column;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Cuando se remueve .hidden, usamos flex */
.loading-status:not(.hidden) {
    display: flex;
}

.accuracy-box {
    background: #f1f5f9;
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 24px;
    border: 1px dashed #cbd5e1;
}

#accuracy-text {
    font-weight: 600;
    color: var(--primary);
    font-size: 1.1rem;
}

.warning-text {
    color: var(--warning);
    font-size: 0.85rem;
    margin-top: 8px;
    font-weight: 500;
}

.loading-spinner-blue {
    width: 32px;
    height: 32px;
    border: 3px solid rgba(37, 99, 235, 0.1);
    border-radius: 50%;
    border-top-color: var(--primary);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
