/**
 * EduQuest 5º Ano - Interactive Educational Games Styles
 *
 * @package EduQuest
 */

/* ==========================================================================
   1. SHARED GAME CONTAINER & HEADER
   ========================================================================== */
.game-stage-container {
    background: #182234;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    user-select: none;
}

.game-stage-header {
    text-align: center;
    margin-bottom: 24px;
    width: 100%;
}

.game-instruction-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(99, 102, 241, 0.18);
    border: 1px solid rgba(99, 102, 241, 0.4);
    color: #c7d2fe;
    font-size: 14px;
    font-weight: 700;
    padding: 6px 16px;
    border-radius: var(--radius-full);
    margin-bottom: 8px;
}

.game-title-lg {
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 700;
    color: #fff;
}

/* ==========================================================================
   2. GAME: SUBTRAÇÃO COM EMPRÉSTIMO INTERATIVA
   ========================================================================== */
.borrow-math-machine {
    width: 100%;
    max-width: 520px;
    background: #1e293b;
    border: 2px solid var(--subj-math);
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: 0 8px 24px rgba(2, 132, 199, 0.2);
}

.math-columns-header {
    display: grid;
    grid-template-columns: 60px 100px 100px 100px;
    gap: 12px;
    text-align: center;
    font-weight: 800;
    font-size: 13px;
    color: var(--text-secondary);
    border-bottom: 2px dashed rgba(255, 255, 255, 0.15);
    padding-bottom: 8px;
    margin-bottom: 12px;
}

.math-borrow-row {
    display: grid;
    grid-template-columns: 60px 100px 100px 100px;
    gap: 12px;
    align-items: center;
    min-height: 48px;
    margin-bottom: 8px;
}

.borrow-indicator-slot {
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 800;
    color: var(--color-gold);
    animation: bounceIn 0.3s;
}

.math-digit-slot {
    position: relative;
    height: 64px;
    background: rgba(15, 23, 42, 0.7);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 800;
    font-family: var(--font-heading);
    color: #fff;
    cursor: default;
    transition: all 0.2s;
}

.math-digit-slot.can-borrow {
    cursor: pointer;
    border-color: var(--color-gold);
    background: rgba(251, 191, 36, 0.12);
    animation: pulseBorrow 1.5s infinite;
}

@keyframes pulseBorrow {
    0%, 100% { transform: scale(1); border-color: var(--color-gold); }
    50% { transform: scale(1.04); border-color: #f59e0b; }
}

.math-digit-slot.struck-through::after {
    content: '';
    position: absolute;
    width: 80%;
    height: 4px;
    background: #ef4444;
    transform: rotate(-35deg);
    border-radius: 2px;
}

.math-digit-slot.received-borrow {
    background: rgba(16, 185, 129, 0.15);
    border-color: var(--color-emerald);
}

.math-operator-col {
    font-size: 32px;
    font-weight: 800;
    color: var(--color-gold);
    text-align: center;
}

.math-result-divider {
    grid-column: 1 / -1;
    height: 4px;
    background: #fff;
    border-radius: 2px;
    margin: 8px 0 16px;
}

.math-input-slot {
    height: 64px;
}

.math-input-digit {
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.9);
    border: 2px solid var(--color-primary);
    border-radius: var(--radius-sm);
    text-align: center;
    font-size: 30px;
    font-weight: 800;
    color: #fff;
    outline: none;
    transition: border-color 0.2s;
}

.math-input-digit:focus {
    border-color: var(--color-gold);
    box-shadow: 0 0 12px rgba(251, 191, 36, 0.35);
}

.math-borrow-help-box {
    margin-top: 16px;
    background: rgba(15, 23, 42, 0.6);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    font-size: 14px;
    color: #e2e8f0;
    line-height: 1.5;
    text-align: center;
}

.btn-check-math {
    width: 100%;
    margin-top: 18px;
    padding: 14px;
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    border-bottom: 4px solid #075985;
    border-radius: var(--radius-md);
    color: #fff;
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 800;
    transition: transform 0.15s;
}

.btn-check-math:hover {
    transform: translateY(-2px);
}

.btn-check-math:active {
    transform: translateY(2px);
    border-bottom-width: 2px;
}

/* ==========================================================================
   3. GAME: MULTIPLICAÇÃO ARMADA & MATRIZ
   ========================================================================== */
.mult-game-box {
    width: 100%;
    max-width: 480px;
    background: #1e293b;
    border: 2px solid #8b5cf6;
    border-radius: var(--radius-md);
    padding: 24px;
}

.mult-carry-row {
    display: flex;
    justify-content: flex-end;
    gap: 16px;
    height: 36px;
    margin-bottom: 8px;
}

.carry-bubble {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--color-gold);
    color: #1e1b4b;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.mult-equation-display {
    text-align: right;
    font-family: var(--font-heading);
    font-size: 42px;
    font-weight: 800;
    color: #fff;
    letter-spacing: 12px;
    padding-right: 16px;
}

/* ==========================================================================
   4. GAME: DIVISÃO COM ALGORITMO DA CHAVE
   ========================================================================== */
.division-bracket-box {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 20px;
    padding: 20px;
    font-family: var(--font-heading);
    font-size: 36px;
    font-weight: 800;
    color: #fff;
}

.div-dividend {
    padding: 8px 16px;
}

.div-bracket-right {
    border-left: 4px solid var(--color-gold);
    border-bottom: 4px solid var(--color-gold);
    padding: 8px 24px;
    min-width: 120px;
    text-align: center;
}

.div-quotient-input {
    width: 100px;
    height: 50px;
    background: rgba(15, 23, 42, 0.8);
    border: 2px solid var(--color-primary);
    border-radius: var(--radius-sm);
    color: #fff;
    text-align: center;
    font-size: 28px;
    font-weight: 800;
}

/* ==========================================================================
   5. GAME: PORTUGUÊS - CAÇA À SÍLABA TÔNICA
   ========================================================================== */
.phonetics-game-wrapper {
    width: 100%;
    max-width: 600px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.syllables-track {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
    margin: 16px 0;
}

.syllable-bubble-btn {
    padding: 20px 32px;
    background: linear-gradient(135deg, #312e81 0%, #4338ca 100%);
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-lg);
    font-family: var(--font-heading);
    font-size: 32px;
    font-weight: 800;
    color: #fff;
    box-shadow: 0 6px 16px rgba(49, 46, 129, 0.4);
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.syllable-bubble-btn:hover {
    transform: translateY(-4px) scale(1.05);
    border-color: var(--color-gold);
}

.syllable-bubble-btn.is-correct {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    border-color: #34d399;
    box-shadow: 0 0 25px rgba(16, 185, 129, 0.6);
    animation: correctPop 0.4s ease;
}

@keyframes correctPop {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1.05); }
}

.tonic-classification-pills {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.tonic-type-btn {
    padding: 12px 20px;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    transition: all 0.2s;
}

.tonic-type-btn:hover {
    border-color: var(--color-primary);
    background: var(--bg-card-hover);
}

.tonic-type-btn.selected-correct {
    background: rgba(16, 185, 129, 0.2);
    border-color: var(--color-emerald);
    color: #6ee7b7;
}

/* ==========================================================================
   6. GAME: PORTUGUÊS - ORGANIZADOR DE CLASSES DE PALAVRAS
   ========================================================================== */
.word-classes-game {
    width: 100%;
    max-width: 720px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.words-source-pool {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
    padding: 18px;
    background: rgba(15, 23, 42, 0.7);
    border-radius: var(--radius-md);
    min-height: 80px;
}

.draggable-word-card {
    padding: 10px 18px;
    background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
    border-radius: var(--radius-sm);
    color: #fff;
    font-weight: 700;
    font-size: 15px;
    cursor: grab;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: transform 0.15s;
}

.draggable-word-card:active {
    cursor: grabbing;
    transform: scale(1.05);
}

.class-drop-baskets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.drop-basket {
    background: var(--bg-card);
    border: 2px dashed rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-md);
    padding: 16px;
    min-height: 160px;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: border-color 0.2s, background 0.2s;
}

.drop-basket.drag-hover {
    border-color: var(--color-gold);
    background: rgba(251, 191, 36, 0.08);
}

.basket-title {
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 700;
    color: var(--color-gold);
    margin-bottom: 12px;
}

.basket-slots {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

/* ==========================================================================
   7. GAME: CIÊNCIAS - SISTEMA SOLAR INTERATIVO
   ========================================================================== */
.solar-system-game {
    width: 100%;
    max-width: 780px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.solar-canvas-wrapper {
    position: relative;
    width: 100%;
    height: 380px;
    background: radial-gradient(circle at center, #1e1b4b 0%, #030712 100%);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.planet-card-info {
    width: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 18px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.planet-name-badge {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 700;
    color: var(--color-gold);
}

.planet-fun-fact {
    font-size: 14px;
    color: #e2e8f0;
}

/* ==========================================================================
   8. GAME: GEOGRAFIA - MAPA INTERATIVO DAS 5 REGIÕES DO BRASIL
   ========================================================================== */
.brazil-map-game {
    width: 100%;
    max-width: 760px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.brazil-svg-container {
    width: 100%;
    max-width: 500px;
    height: 380px;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.region-shape {
    cursor: pointer;
    transition: all 0.25s ease;
    stroke: #fff;
    stroke-width: 1.5;
    stroke-linejoin: round;
}

.region-shape:hover {
    filter: brightness(1.25) drop-shadow(0 0 8px rgba(255, 255, 255, 0.5));
    transform: scale(1.02);
}

.region-shape.active {
    stroke: var(--color-gold);
    stroke-width: 3;
    filter: brightness(1.3) drop-shadow(0 0 12px var(--color-gold));
}

.region-norte { fill: #10b981; }
.region-nordeste { fill: #f59e0b; }
.region-centro-oeste { fill: #8b5cf6; }
.region-sudeste { fill: #3b82f6; }
.region-sul { fill: #06b6d4; }

.region-info-card {
    width: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 20px 24px;
    animation: fadeIn 0.3s ease;
}

.region-info-title {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.region-info-desc {
    font-size: 14px;
    color: #e2e8f0;
    line-height: 1.5;
}

/* ==========================================================================
   9. GAME: HISTÓRIA - LINHA DO TEMPO BRASIL & GUERRAS
   ========================================================================== */
.history-timeline-game {
    width: 100%;
    max-width: 760px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.timeline-scroll-track {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding: 16px 8px 24px;
}

.timeline-event-card {
    min-width: 220px;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 18px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.timeline-event-card:hover {
    border-color: var(--color-gold);
    transform: translateY(-4px);
}

.timeline-year-badge {
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 800;
    color: var(--color-gold);
    margin-bottom: 8px;
}

.timeline-event-name {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    line-height: 1.4;
}

@keyframes bounceIn {
    0% { transform: scale(0.3); opacity: 0; }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}
