/* Glassmorphism Design System - Huapango 2026 */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;700&display=swap');

:root {
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    --input-bg: rgba(255, 255, 255, 0.9);
    --primary-color: #900C3F;
    /* Deep Burgundy */
    --primary-hover: #6e0830;
    --text-color: #333;
    --text-light: #fff;
}

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

body {
    font-family: 'Outfit', sans-serif;
    /* High quality cultural background */
    background: url('https://images.unsplash.com/photo-1516450360452-9312f5e86fc7?q=80&w=1920&auto=format&fit=crop') no-repeat center center fixed;
    background-size: cover;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

/* Dark Overlay */
.app-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: -1;
}

h1,
h2,
h3,
.header-title {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.9);
}

label,
.form-label {
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

/* Main Glass Container */
.glass-container {
    width: 100%;
    max-width: 800px;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: var(--glass-shadow);
    padding: 2rem;
    color: var(--text-light);
    animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 2rem;
}

.header-logo-container {
    display: flex;
    justify-content: center;
    margin-bottom: 1rem;
}

.header-logo {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    object-fit: contain;
    background: rgba(255, 255, 255, 0.9);
    padding: 10px;
    border: 4px solid var(--glass-border);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.header-title {
    font-weight: 700;
    font-size: 2.2rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    margin-bottom: 5px;
}

.header-subtitle {
    font-weight: 300;
    font-size: 1.1rem;
    opacity: 0.9;
    letter-spacing: 1px;
}

/* Progress Bar */
.progress-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
    padding: 0 1rem;
}

.progress-line {
    flex: 1;
    height: 2px;
    background: rgba(255, 255, 255, 0.3);
    margin: 0 10px;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
}

.progress-circle {
    width: 35px;
    height: 35px;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 600;
    transition: all 0.3s ease;
}

.progress-step.active .progress-circle {
    background: var(--primary-color);
    border-color: var(--primary-color);
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(144, 12, 63, 0.6);
}

.progress-label {
    margin-top: 8px;
    font-size: 0.8rem;
    font-weight: 300;
    opacity: 0.8;
}

.progress-step.active .progress-label {
    font-weight: 600;
    opacity: 1;
}

/* Method Cards */
.input-method-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.method-card {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 1.5rem 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.method-card:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-3px);
}

.special-card {
    background: rgba(144, 12, 63, 0.3);
    border-color: rgba(144, 12, 63, 0.4);
}

.special-card:hover {
    background: rgba(144, 12, 63, 0.5);
}

.method-icon {
    font-size: 2rem;
    margin-bottom: 10px;
}

/* Forms */
.input-section {
    display: none;
    animation: fadeIn 0.4s ease;
}

.input-section.active {
    display: block !important;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    margin-left: 5px;
}

.glass-input {
    width: 100%;
    padding: 1rem;
    border: none;
    border-radius: 12px;
    background: var(--input-bg);
    color: #333;
    font-size: 1.1rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.glass-input:focus {
    outline: none;
    transform: scale(1.01);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

/* Buttons */
.step-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 2rem;
    gap: 1rem;
}

.btn {
    padding: 0.8rem 2rem;
    border-radius: 30px;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 4px 15px rgba(144, 12, 63, 0.4);
}

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

.btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Loading & Success */
.loading-overlay {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 15px;
    margin-bottom: 1rem;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

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

    100% {
        transform: rotate(360deg);
    }
}

.success-container {
    text-align: center;
    padding: 2rem 0;
}

.success-icon {
    font-size: 4rem;
    color: #4CAF50;
    margin-bottom: 1rem;
}

.folio-card {
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    padding: 1.5rem;
    border-radius: 15px;
    margin: 2rem 0;
}

.folio-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: 2px;
}

/* Mobile */
@media (max-width: 600px) {
    .input-method-grid {
        grid-template-columns: 1fr;
    }

    .header-title {
        font-size: 1.6rem;
    }
}

/* ESTILOS DE HUAPANGO (Glass Chips) */
.styles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
    margin-top: 5px;
}

.style-checkbox {
    display: none;
    /* Hide default checkbox */
}

.style-label {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    font-size: 0.9rem;
    color: white;
    font-weight: 500;
    user-select: none;
}

.style-label:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* Estado Seleccionado */
.style-checkbox:checked+.style-label {
    background: #900C3F;
    /* Burgundy */
    border-color: #900C3F;
    box-shadow: 0 0 15px rgba(144, 12, 63, 0.5);
    font-weight: 700;
}

/* Countdown Timer Styles */
.countdown-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 20px 0;
    gap: 10px;
    background: rgba(0, 0, 0, 0.3);
    padding: 15px;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
}

.time-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 50px;
}

.time-number {
    font-size: 1.8rem;
    font-weight: 700;
    color: #FFC107;
    /* Use gold/yellow for high visibility */
    line-height: 1;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.time-label {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 5px;
    font-weight: 500;
    letter-spacing: 1px;
}

.time-separator {
    font-size: 1.5rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.3);
    margin-bottom: 15px;
    /* Align with numbers */
}

@media (max-width: 600px) {
    .time-number {
        font-size: 1.4rem;
    }

    .time-separator {
        font-size: 1.2rem;
    }

    .countdown-wrapper {
        gap: 5px;
        padding: 10px;
    }
}

/* FASE 2.3: OCR-Locked Fields Styling */
.ocr-locked-field[readonly] {
    background: rgba(255, 255, 255, 0.1) !important;
    cursor: not-allowed !important;
    color: rgba(255, 255, 255, 0.6) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
}

.ocr-locked-field[readonly]::placeholder {
    color: rgba(255, 255, 255, 0.5) !important;
    font-style: italic;
}

/* Override focus state for readonly fields */
.ocr-locked-field[readonly]:focus {
    transform: none !important;
    box-shadow: 0 0 0 2px rgba(255, 193, 7, 0.3) !important;
}