/* ============================================
   ESTILOS CORPORATIVOS - COOMINOBRAS QUIZ
   Paleta: Azul institucional (#0A2B4E), 
           Dorado/Acento (#C9A94E), 
           Grises elegantes (#F4F6F9, #2C3E50)
   ============================================ */

/* --- Reset y Base --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', 'Segoe UI', Arial, sans-serif;
    background: #E8ECF1; /* Fondo gris suave */
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 30px;
    color: #2C3E50;
}

.container {
    width: 100%;
    max-width: 920px;
    margin: 0 auto;
}

/* --- Header Corporativo --- */
header {
    text-align: center;
    padding: 20px 0 30px;
    border-bottom: 3px solid #C9A94E;
    margin-bottom: 30px;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-icon {
    width: 60px;
    height: 60px;
    background: #0A2B4E;
    color: #C9A94E;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: 1px;
}

.header-text h1 {
    font-size: 1.8rem;
    font-weight: 300;
    color: #0A2B4E;
    letter-spacing: 2px;
    margin: 0;
}

.header-text h1 strong {
    font-weight: 700;
    color: #0A2B4E;
}

.header-text .subtitle {
    font-size: 0.85rem;
    color: #6B7A8F;
    letter-spacing: 3px;
    text-transform: uppercase;
    font-weight: 400;
}

.header-badge {
    background: #C9A94E;
    color: #0A2B4E;
    padding: 6px 20px;
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* --- Tarjetas (Cards) --- */
.card {
    background: #FFFFFF;
    border-radius: 12px;
    padding: 35px 40px;
    margin-bottom: 25px;
    box-shadow: 0 8px 30px rgba(10, 43, 78, 0.08);
    border: 1px solid rgba(10, 43, 78, 0.05);
    transition: box-shadow 0.3s ease;
}

.card:hover {
    box-shadow: 0 12px 40px rgba(10, 43, 78, 0.12);
}

.card-title {
    font-size: 1.1rem;
    font-weight: 500;
    color: #0A2B4E;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #F0F2F5;
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-title .icon {
    color: #C9A94E;
}

/* --- PIN Display --- */
.pin-display {
    background: #F8F9FB;
    border: 1px solid #E8ECF1;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    margin: 15px 0 20px;
}

.pin-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #6B7A8F;
    font-weight: 500;
}

.pin-code {
    font-size: 3rem;
    font-weight: 300;
    letter-spacing: 12px;
    color: #0A2B4E;
    font-family: 'Roboto Mono', monospace;
    background: white;
    padding: 10px 25px;
    border-radius: 6px;
    display: inline-block;
    border: 1px solid #E8ECF1;
    margin-top: 5px;
}

/* --- Botones Corporativos --- */
.btn {
    padding: 12px 32px;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s ease;
    margin: 4px;
    text-transform: none;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: #0A2B4E;
    color: white;
}

.btn-primary:hover {
    background: #143C6B;
    box-shadow: 0 4px 12px rgba(10, 43, 78, 0.25);
}

.btn-success {
    background: #1E7E34;
    color: white;
}

.btn-success:hover {
    background: #166B2A;
    box-shadow: 0 4px 12px rgba(30, 126, 52, 0.25);
}

.btn-warning {
    background: #C9A94E;
    color: #0A2B4E;
}

.btn-warning:hover {
    background: #B8983A;
    box-shadow: 0 4px 12px rgba(201, 169, 78, 0.3);
}

.btn-outline {
    background: transparent;
    color: #0A2B4E;
    border: 1px solid #D0D5DD;
}

.btn-outline:hover {
    background: #F8F9FB;
    border-color: #0A2B4E;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: none !important;
    transform: none !important;
}

.btn-sm {
    padding: 8px 20px;
    font-size: 0.8rem;
}

/* --- Formularios --- */
.form-group {
    margin-bottom: 22px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #2C3E50;
    font-size: 0.9rem;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #D0D5DD;
    border-radius: 6px;
    font-size: 1rem;
    transition: all 0.2s;
    background: #FAFBFC;
}

.form-group input:focus {
    outline: none;
    border-color: #0A2B4E;
    background: white;
    box-shadow: 0 0 0 3px rgba(10, 43, 78, 0.08);
}

.error-message {
    color: #D32F2F;
    font-size: 0.85rem;
    margin-top: 8px;
    padding: 8px 12px;
    background: #FFEBEE;
    border-radius: 4px;
    border-left: 3px solid #D32F2F;
}

/* --- Preguntas --- */
.question-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #E8ECF1;
}

.question-meta {
    display: flex;
    align-items: center;
    gap: 15px;
}

.question-number {
    font-weight: 500;
    color: #6B7A8F;
    font-size: 0.9rem;
}

.question-category {
    background: #F0F2F5;
    color: #2C3E50;
    padding: 3px 14px;
    border-radius: 30px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.timer {
    font-size: 1.4rem;
    font-weight: 300;
    color: #0A2B4E;
    background: #F8F9FB;
    padding: 4px 18px;
    border-radius: 30px;
    border: 1px solid #E8ECF1;
    min-width: 60px;
    text-align: center;
}

.timer.warning {
    color: #D32F2F;
    border-color: #FFCDD2;
    background: #FFEBEE;
}

.question-text {
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 30px;
    color: #1A2A3A;
    text-align: center;
    line-height: 1.6;
}

.options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.option-btn {
    padding: 16px 20px;
    border: 1px solid #D0D5DD;
    border-radius: 8px;
    background: white;
    font-size: 1rem;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    color: #2C3E50;
    display: flex;
    align-items: center;
    gap: 12px;
}

.option-btn .option-letter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #F0F2F5;
    color: #2C3E50;
    font-weight: 600;
    font-size: 0.8rem;
    flex-shrink: 0;
}

.option-btn:hover:not(.disabled) {
    background: #F8F9FB;
    border-color: #0A2B4E;
}

.option-btn.selected {
    border-color: #0A2B4E;
    background: #EDF2F7;
}

.option-btn.correct {
    border-color: #1E7E34;
    background: #E8F5E9;
    color: #1E7E34;
}

.option-btn.correct .option-letter {
    background: #1E7E34;
    color: white;
}

.option-btn.incorrect {
    border-color: #D32F2F;
    background: #FFEBEE;
    color: #D32F2F;
}

.option-btn.incorrect .option-letter {
    background: #D32F2F;
    color: white;
}

.option-btn.disabled {
    cursor: default;
    opacity: 0.7;
}

/* --- Feedback --- */
.feedback-container {
    text-align: center;
    padding: 20px 0;
}

.feedback-icon {
    font-size: 4rem;
    margin-bottom: 10px;
}

.feedback-title {
    font-size: 1.8rem;
    font-weight: 300;
    margin-bottom: 5px;
}

.feedback-title.correct {
    color: #1E7E34;
}

.feedback-title.incorrect {
    color: #D32F2F;
}

.feedback-detail {
    color: #6B7A8F;
    font-size: 0.95rem;
}

.feedback-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #E8ECF1;
}

.feedback-stats .stat {
    text-align: center;
}

.feedback-stats .stat-value {
    font-size: 1.6rem;
    font-weight: 300;
    color: #0A2B4E;
}

.feedback-stats .stat-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: #6B7A8F;
    letter-spacing: 0.5px;
}

/* --- Ranking --- */
.ranking-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.ranking-title {
    font-size: 1rem;
    font-weight: 500;
    color: #0A2B4E;
}

.ranking-count {
    font-size: 0.8rem;
    color: #6B7A8F;
}

.ranking-list {
    max-height: 400px;
    overflow-y: auto;
}

.ranking-item {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    margin: 4px 0;
    background: #FAFBFC;
    border-radius: 6px;
    border-left: 3px solid transparent;
    transition: background 0.2s;
}

.ranking-item:hover {
    background: #F4F6F9;
}

.ranking-item.top1 {
    border-left-color: #C9A94E;
    background: #FDFBF5;
}

.ranking-item.top2 {
    border-left-color: #9CA3AF;
    background: #F8F9FB;
}

.ranking-item.top3 {
    border-left-color: #CD7F32;
    background: #FDF8F3;
}

.ranking-position {
    width: 40px;
    font-weight: 500;
    color: #6B7A8F;
    font-size: 0.9rem;
}

.ranking-name {
    flex: 1;
    font-weight: 400;
    color: #2C3E50;
}

.ranking-name .me {
    font-size: 0.7rem;
    color: #C9A94E;
    margin-left: 8px;
}

.ranking-score {
    font-weight: 500;
    color: #0A2B4E;
    background: #F0F2F5;
    padding: 2px 14px;
    border-radius: 30px;
    font-size: 0.85rem;
}

/* --- Progress Bar --- */
.progress-container {
    margin: 10px 0 15px;
}

.progress-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #6B7A8F;
    margin-bottom: 4px;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: #E8ECF1;
    border-radius: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: #0A2B4E;
    transition: width 0.6s ease;
    border-radius: 10px;
}

/* --- Winner --- */
.winner-container {
    text-align: center;
    padding: 20px 0;
}

.winner-icon {
    font-size: 4rem;
    margin-bottom: 5px;
}

.winner-name {
    font-size: 2rem;
    font-weight: 300;
    color: #0A2B4E;
}

.winner-score {
    font-size: 1rem;
    color: #6B7A8F;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .options-grid {
        grid-template-columns: 1fr;
    }
    
    .card {
        padding: 20px;
    }
    
    .pin-code {
        font-size: 2rem;
        letter-spacing: 8px;
    }
    
    .question-text {
        font-size: 1.2rem;
    }
    
    .header-text h1 {
        font-size: 1.4rem;
    }
    
    .feedback-stats {
        flex-direction: column;
        gap: 15px;
    }
    
    .header-content {
        flex-direction: column;
        gap: 10px;
    }
}

/* ============================================
   FOOTER CORPORATIVO
   ============================================ */

.footer {
    margin-top: 40px;
    background: #0A2B4E;
    color: rgba(255, 255, 255, 0.8);
    border-radius: 12px 12px 0 0;
    padding: 40px 40px 0;
    border-top: 4px solid #C9A94E;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 5px;
}

.footer-logo-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #C9A94E;
    color: #0A2B4E;
    border-radius: 6px;
    font-size: 1.2rem;
    font-weight: 700;
}

.footer-logo-text {
    font-size: 1.3rem;
    font-weight: 300;
    color: white;
    letter-spacing: 1px;
}

.footer-description {
    font-size: 0.85rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
}

.footer-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #C9A94E;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0 0 5px 0;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 6px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 0.60rem;
    transition: color 0.2s ease;
    display: inline-block;
}

.footer-links a:hover {
    color: #C9A94E;
}

.footer-bottom {
    padding: 20px 0;
}

.footer-bottom-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.4);
}

.footer-copyright {
    margin: 0;
}

.footer-copyright strong {
    color: rgba(255, 255, 255, 0.6);
}

.footer-version {
    margin: 0;
}

/* Responsive Footer */
@media (max-width: 768px) {
    .footer {
        padding: 30px 20px 0;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .footer-bottom-content {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-section {
        text-align: center;
        align-items: center;
    }
    
    .footer-links {
        text-align: center;
    }
}