/* ═══════════════════════════════════════════
   La Posta — Game Styles
   ═══════════════════════════════════════════ */

:root {
    --posta-pizarron: #2d5a3d;
    --posta-pizarron-dark: #1e3d2a;
    --posta-tiza: #f5f0e8;
    --posta-tiza-yellow: #fde68a;
    --posta-correct: #4ade80;
    --posta-wrong: #f87171;
    --posta-accent: #0d9488;
    --posta-gradient: linear-gradient(135deg, #1e3d2a 0%, #2d5a3d 50%, #0d9488 100%);
}

/* Wrapper */
.posta-wrap {
    min-height: 70vh;
    padding: calc(var(--sp-6) + 70px) 0 var(--sp-8);
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.posta-container {
    max-width: 680px;
    width: 100%;
    margin: 0 auto;
    padding: 0 var(--sp-4);
}

/* ─── Pizarrón ─── */
.posta-board {
    background: var(--posta-pizarron);
    border-radius: var(--radius-xl);
    padding: var(--sp-6);
    box-shadow: inset 0 2px 8px rgba(0,0,0,0.3), var(--shadow-lg);
    border: 6px solid #8B6914;
    position: relative;
    color: var(--posta-tiza);
    font-family: 'Patrick Hand', cursive;
    font-size: 1.15rem;
    line-height: 1.7;
    margin-bottom: var(--sp-5);
}
.posta-board::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-xl);
    background:
        repeating-linear-gradient(0deg, transparent, transparent 28px, rgba(255,255,255,0.02) 28px, rgba(255,255,255,0.02) 29px);
    pointer-events: none;
}
.posta-board h3 {
    font-family: 'Fredericka the Great', cursive;
    color: var(--posta-tiza-yellow);
    font-size: 1.3rem;
    margin: 0 0 var(--sp-3);
}
.posta-board p {
    margin: 0;
    position: relative;
    z-index: 1;
}

/* ─── Progress ─── */
.posta-progress {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-3);
    margin-bottom: var(--sp-3);
    font-family: var(--font-ui);
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

/* Progress dots */
.posta-progress-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-bottom: var(--sp-5);
    flex-wrap: wrap;
}
.posta-pdot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    font-family: var(--font-ui);
    transition: all 0.3s ease;
}
.posta-pdot--ok {
    background: var(--posta-correct);
    color: #fff;
    font-size: 0.65rem;
}
.posta-pdot--fail {
    background: var(--posta-wrong);
    color: #fff;
    font-size: 0.65rem;
}
.posta-pdot--current {
    background: var(--posta-accent);
    color: #fff;
    box-shadow: 0 0 0 3px rgba(13,148,136,0.3);
    transform: scale(1.15);
}
.posta-pdot--pending {
    background: var(--color-border);
    color: var(--color-text-muted);
}

.posta-progress__bar {
    flex: 1;
    height: 8px;
    background: var(--color-border);
    border-radius: 4px;
    overflow: hidden;
}
.posta-progress__fill {
    height: 100%;
    background: var(--posta-gradient);
    border-radius: 4px;
    transition: width 0.5s ease;
}
.posta-progress__pts {
    font-weight: 600;
    color: var(--posta-accent);
    white-space: nowrap;
}

/* ─── Question card ─── */
.posta-question {
    background: var(--color-card-bg);
    border-radius: var(--radius-lg);
    padding: var(--sp-5);
    border: 1px solid var(--color-border);
    margin-bottom: var(--sp-4);
    box-shadow: var(--shadow-md);
}
.posta-question__text {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--color-primary);
    font-size: 1.1rem;
    line-height: 1.5;
    margin: 0;
}

/* ─── Options ─── */
.posta-options {
    display: flex;
    flex-direction: column;
    gap: var(--sp-3);
    margin-bottom: var(--sp-4);
}
.posta-option {
    background: var(--color-card-bg);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--sp-4);
    cursor: pointer;
    transition: all 0.25s ease;
    font-family: var(--font-ui);
    font-size: 1rem;
    color: var(--color-text);
    display: flex;
    align-items: flex-start;
    gap: var(--sp-3);
    position: relative;
}
.posta-option:hover:not(.posta-option--disabled) {
    border-color: var(--posta-accent);
    transform: translateX(4px);
    box-shadow: var(--shadow-md);
}
.posta-option__letter {
    width: 32px;
    height: 32px;
    min-width: 32px;
    border-radius: 50%;
    background: var(--color-bg);
    border: 2px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--color-text-muted);
    transition: all 0.25s ease;
}
.posta-option:hover:not(.posta-option--disabled) .posta-option__letter {
    background: var(--posta-accent);
    border-color: var(--posta-accent);
    color: #fff;
}
.posta-option--correct {
    border-color: var(--posta-correct) !important;
    background: rgba(74, 222, 128, 0.08);
    cursor: default;
}
.posta-option--correct .posta-option__letter {
    background: var(--posta-correct);
    border-color: var(--posta-correct);
    color: #fff;
}
.posta-option--wrong {
    border-color: var(--posta-wrong) !important;
    background: rgba(248, 113, 113, 0.08);
    cursor: default;
}
.posta-option--wrong .posta-option__letter {
    background: var(--posta-wrong);
    border-color: var(--posta-wrong);
    color: #fff;
}
.posta-option--disabled {
    cursor: default;
    opacity: 0.5;
}

/* ─── Feedback ─── */
.posta-feedback {
    background: var(--color-card-bg);
    border-radius: var(--radius-lg);
    padding: var(--sp-5);
    border: 1px solid var(--color-border);
    border-left: 4px solid var(--posta-correct);
    margin-bottom: var(--sp-4);
    box-shadow: var(--shadow-md);
    animation: postaSlideIn 0.4s ease;
}
.posta-feedback--wrong {
    border-left-color: var(--posta-wrong);
}
.posta-feedback__header {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    margin-bottom: var(--sp-3);
}
.posta-feedback__icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1rem;
    flex-shrink: 0;
}
.posta-feedback__title {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.1rem;
}
.posta-feedback__body {
    font-family: var(--font-body);
    color: var(--color-text);
    line-height: 1.7;
    margin-bottom: var(--sp-3);
}
.posta-feedback__source {
    font-family: var(--font-ui);
    font-size: 0.85rem;
    color: var(--color-text-muted);
}
.posta-feedback__stat {
    font-family: var(--font-ui);
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin-top: var(--sp-3);
    padding-top: var(--sp-3);
    border-top: 1px solid var(--color-border);
}

/* ─── Buttons ─── */
.posta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--sp-2);
    padding: var(--sp-3) var(--sp-6);
    border-radius: var(--radius-lg);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    transition: all 0.25s ease;
    text-decoration: none;
}
.posta-btn--primary {
    background: var(--posta-gradient);
    color: #fff;
}
.posta-btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}
.posta-btn--outline {
    background: transparent;
    color: var(--posta-accent);
    border: 2px solid var(--posta-accent);
}
.posta-btn--outline:hover {
    background: var(--posta-accent);
    color: #fff;
}

/* ─── Form fields ─── */
.posta-field {
    margin-bottom: var(--sp-4);
}
.posta-field label {
    display: block;
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: var(--sp-2);
    font-size: 0.95rem;
}
.posta-field input,
.posta-field select {
    width: 100%;
    padding: var(--sp-3);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-md);
    font-family: var(--font-ui);
    font-size: 1rem;
    color: var(--color-text);
    background: var(--color-bg);
    transition: border-color 0.2s;
}
.posta-field input:focus,
.posta-field select:focus {
    outline: none;
    border-color: var(--posta-accent);
    box-shadow: 0 0 0 3px rgba(13,148,136,0.15);
}
.posta-field small {
    display: block;
    margin-top: var(--sp-1);
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

/* ─── Result screen ─── */
.posta-result {
    text-align: center;
}
.posta-result__score {
    font-family: 'Fredericka the Great', cursive;
    font-size: 3rem;
    color: var(--posta-accent);
    margin: var(--sp-2) 0;
}
.posta-result__level {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.3rem;
    color: var(--color-primary);
    margin-bottom: var(--sp-4);
}
.posta-result__dots {
    display: flex;
    justify-content: center;
    gap: var(--sp-2);
    margin-bottom: var(--sp-5);
    flex-wrap: wrap;
}
.posta-result__dot {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
}
.posta-result__dot--ok { background: var(--posta-correct); }
.posta-result__dot--fail { background: var(--posta-wrong); }

/* Badges */
.posta-badges {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sp-3);
    justify-content: center;
    margin: var(--sp-5) 0;
}
.posta-badge {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--sp-3) var(--sp-4);
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    font-family: var(--font-ui);
    font-size: 0.9rem;
}
.posta-badge__icon {
    font-size: 1.4rem;
}
.posta-badge__name {
    font-weight: 600;
    color: var(--color-primary);
}

/* ─── Animations ─── */
@keyframes postaSlideIn {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes postaFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
.posta-animate-in {
    animation: postaSlideIn 0.4s ease;
}

/* ─── Responsive ─── */
@media (max-width: 768px) {
    .posta-wrap {
        padding: calc(var(--sp-4) + 70px) 0 var(--sp-4);
    }
    .posta-board {
        padding: var(--sp-4);
        font-size: 1.05rem;
        border-width: 4px;
    }
    .posta-board h3 {
        font-size: 1.15rem;
    }
    .posta-question {
        padding: var(--sp-4);
    }
    .posta-option {
        padding: var(--sp-3);
    }
    .posta-result__score {
        font-size: 2.5rem;
    }
}
