/* ============================================
   24 GAME - Stylesheet (Speelbord Stijl)
   ============================================ */

.game24-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 10px 0;
}

/* ---------- Empty State ---------- */
.game24-empty {
    text-align: center;
    padding: 40px 20px;
}

.game24-empty .empty-icon {
    font-size: 56px;
    display: block;
    margin-bottom: 12px;
    opacity: 0.5;
}

.game24-empty p {
    color: var(--text-medium);
    font-size: 16px;
    margin-bottom: 16px;
    line-height: 1.6;
}

/* ---------- Difficulty Filter ---------- */
.game24-diff-filter {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.game24-diff-filter-btn {
    padding: 8px 18px;
    border: 2px solid #E8E8F0;
    border-radius: var(--radius-md);
    background: var(--bg-white);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-medium);
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.game24-diff-filter-btn:hover {
    border-color: #D4A017;
    color: #B8860B;
}

.game24-diff-filter-btn.active {
    background: #D4A017;
    border-color: #D4A017;
    color: white;
}

/* ---------- Target ---------- */
.game24-target {
    text-align: center;
}

.game24-target-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-medium);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 4px;
}

.game24-target-number {
    font-size: 56px;
    font-weight: 900;
    background: linear-gradient(135deg, #D4A017, #FFD700);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

/* ---------- Two Column Layout ---------- */
.game24-layout {
    display: flex;
    gap: 48px;
    align-items: flex-start;
    width: 100%;
    max-width: 940px;
}

.game24-col-board {
    flex-shrink: 0;
}

.game24-col-panel {
    flex: 1;
    min-width: 240px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding-top: 8px;
}

/* ---------- Compass Board ---------- */
.game24-board-wrapper {
    position: relative;
    width: 400px;
    height: 400px;
}

/* Gele cirkel achtergrond */
.game24-board-circle {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: radial-gradient(circle at center, #FFD700 0%, #DAA520 80%, #B8860B 100%);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.2),
        inset 0 2px 4px rgba(255, 255, 255, 0.3);
    border: 4px solid #B8860B;
}

/* Rood kruis */
.game24-board-cross {
    position: absolute;
    inset: 0;
    overflow: hidden;
    border-radius: 50%;
}

.game24-board-cross::before,
.game24-board-cross::after {
    content: '';
    position: absolute;
    background: linear-gradient(180deg, #CC0000 0%, #990000 100%);
    border: 2px solid #800000;
}

/* Verticale balk */
.game24-board-cross::before {
    width: 92px;
    top: 0;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
}

/* Horizontale balk */
.game24-board-cross::after {
    height: 92px;
    left: 0;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
}

/* Difficulty indicator - below + button in rode balk */
.game24-diff-indicator {
    position: absolute;
    top: 68px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 2px;
    font-size: 12px;
    letter-spacing: 2px;
    line-height: 1;
    opacity: 0.85;
    pointer-events: none;
}

.game24-diff-indicator.diff-makkelijk { color: #69F0AE; }
.game24-diff-indicator.diff-gemiddeld { color: #FFD740; }
.game24-diff-indicator.diff-moeilijk { color: #FF5252; }

/* Grid over de cirkel */
.game24-compass {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: 44px 1fr 92px 1fr 44px;
    grid-template-rows: 44px 1fr 92px 1fr 44px;
    align-items: center;
    justify-items: center;
    z-index: 2;
    padding: 16px;
}

/* Grid positions */
.game24-pos-n  { grid-row: 1; grid-column: 3; align-self: center; }
.game24-pos-nw { grid-row: 2; grid-column: 2; }
.game24-pos-no { grid-row: 2; grid-column: 4; }
.game24-pos-w  { grid-row: 3; grid-column: 1; justify-self: center; }
.game24-pos-center { grid-row: 3; grid-column: 3; }
.game24-pos-o  { grid-row: 3; grid-column: 5; justify-self: center; }
.game24-pos-zw { grid-row: 4; grid-column: 2; }
.game24-pos-zo { grid-row: 4; grid-column: 4; }
.game24-pos-z  { grid-row: 5; grid-column: 3; align-self: center; }

/* ---------- Center (Score) - Rode ruit ---------- */
.game24-center {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    transform: rotate(45deg);
    background: linear-gradient(135deg, #CC0000 0%, #990000 100%);
    border: 3px solid #800000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.game24-center-value {
    transform: rotate(-45deg);
    font-size: 30px;
    font-weight: 900;
    color: #00FF00;
    line-height: 1;
    text-shadow: 0 0 8px rgba(0, 255, 0, 0.5);
}

/* ---------- Number Cards ---------- */
.game24-card {
    width: 86px;
    height: 86px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, #1A237E 0%, #0D1442 100%);
    border: 3px solid #3949AB;
    border-radius: 12px;
    font-size: 34px;
    font-weight: 900;
    color: #FFD700;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    position: relative;
    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.3),
        inset 0 1px 2px rgba(255, 255, 255, 0.1);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.game24-card:hover:not(.used):not(.disabled) {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    border-color: #FFD700;
}

.game24-card.selected {
    border-color: #FFD700;
    background: linear-gradient(180deg, #283593 0%, #1A237E 100%);
    box-shadow:
        0 0 0 4px rgba(255, 215, 0, 0.4),
        0 8px 24px rgba(0, 0, 0, 0.4);
    transform: translateY(-4px) scale(1.05);
}

.game24-card.used {
    opacity: 0.2 !important;
    cursor: not-allowed;
    pointer-events: none;
    transform: scale(0.85) !important;
}

.game24-card.disabled {
    cursor: default;
}

/* ---------- Operation Buttons ---------- */
.game24-op-btn {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid #5C2D91;
    border-radius: 8px;
    background: linear-gradient(180deg, #7B1FA2 0%, #4A148C 100%);
    font-size: 22px;
    font-weight: 700;
    color: #FFD700;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    box-shadow:
        0 4px 8px rgba(0, 0, 0, 0.3),
        inset 0 1px 2px rgba(255, 255, 255, 0.15);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.game24-op-btn:hover:not(:disabled) {
    background: linear-gradient(180deg, #9C27B0 0%, #7B1FA2 100%);
    transform: scale(1.15);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.game24-op-btn.selected {
    background: linear-gradient(180deg, #FF8F00 0%, #E65100 100%);
    border-color: #FF8F00;
    color: white;
    box-shadow:
        0 0 0 4px rgba(255, 143, 0, 0.3),
        0 6px 16px rgba(0, 0, 0, 0.4);
    transform: scale(1.15);
}

.game24-op-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

/* ---------- Panel: Instruction ---------- */
.game24-instruction {
    text-align: center;
    font-size: 15px;
    font-weight: 700;
    color: var(--text-medium);
    padding: 10px 16px;
    background: #1A237E10;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.game24-instruction.highlight {
    color: #1A237E;
    background: #FFD70030;
}

/* ---------- Panel: Results Row ---------- */
.game24-results-area {
    width: 100%;
}

.game24-results-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 6px;
}

.game24-results-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    min-height: 60px;
    padding: 10px;
    background: linear-gradient(135deg, #1A237E10 0%, #0D144210 100%);
    border: 2px dashed #3949AB60;
    border-radius: 12px;
    align-items: center;
}

.game24-results-empty {
    color: var(--text-light);
    font-size: 13px;
    font-weight: 500;
}

.game24-result-card {
    width: 64px;
    height: 72px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, #2E7D32 0%, #1B5E20 100%);
    border: 3px solid #4CAF50;
    border-radius: 10px;
    font-size: 20px;
    font-weight: 900;
    color: #FFFFFF;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    animation: cardPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.game24-result-card:hover:not(.used):not(.disabled) {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
    border-color: #FFD700;
}

.game24-result-card.selected {
    border-color: #FFD700;
    box-shadow:
        0 0 0 4px rgba(255, 215, 0, 0.4),
        0 8px 20px rgba(0, 0, 0, 0.35);
    transform: translateY(-3px) scale(1.05);
}

.game24-result-card.used {
    opacity: 0.2 !important;
    cursor: not-allowed;
    pointer-events: none;
    transform: scale(0.85) !important;
    animation: none !important;
}

.game24-result-card.disabled {
    cursor: default;
}

.game24-result-card .game24-result-step {
    font-size: 8px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
}

@keyframes cardPop {
    0% { transform: scale(0.6); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

/* ---------- Panel: Steps History ---------- */
.game24-steps {
    width: 100%;
}

.game24-steps-title {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 6px;
}

.game24-step {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: #1A237E10;
    border-radius: 8px;
    margin-bottom: 4px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    animation: stepSlide 0.3s ease;
}

@keyframes stepSlide {
    0% { opacity: 0; transform: translateX(-12px); }
    100% { opacity: 1; transform: translateX(0); }
}

.game24-step .step-num {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-light);
    min-width: 18px;
}

.game24-step .step-calc {
    flex: 1;
}

/* ---------- Panel: Game Over Result ---------- */
.game24-gameover {
    text-align: center;
    padding: 16px;
    border-radius: 14px;
    width: 100%;
}

.game24-gameover.win {
    background: linear-gradient(135deg, #1B5E20 0%, #2E7D32 100%);
    border: 3px solid #4CAF50;
}

.game24-gameover.lose {
    background: linear-gradient(135deg, #B71C1C 0%, #C62828 100%);
    border: 3px solid #EF5350;
}

.game24-gameover-icon {
    font-size: 40px;
    display: block;
    margin-bottom: 4px;
}

.game24-gameover-text {
    font-size: 20px;
    font-weight: 800;
    color: #FFFFFF;
    margin-bottom: 2px;
}

.game24-gameover-sub {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
}

.game24-gameover.animate {
    animation: winBounce 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes winBounce {
    0% { transform: scale(0.5); opacity: 0; }
    60% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}

/* ---------- Panel: Action Buttons ---------- */
.game24-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.game24-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s ease;
}

.game24-btn-new {
    background: linear-gradient(180deg, #1E88E5 0%, #1565C0 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(21, 101, 192, 0.3);
}

.game24-btn-new:hover {
    background: linear-gradient(180deg, #42A5F5 0%, #1E88E5 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(21, 101, 192, 0.4);
}

.game24-btn-undo {
    background: linear-gradient(180deg, #F5F5F5 0%, #E0E0E0 100%);
    color: var(--text-medium);
}

.game24-btn-undo:hover {
    background: linear-gradient(180deg, #EEEEEE 0%, #D0D0D0 100%);
    transform: translateY(-2px);
}

.game24-btn-reset {
    background: linear-gradient(180deg, #EF5350 0%, #C62828 100%);
    color: white;
}

.game24-btn-reset:hover {
    background: linear-gradient(180deg, #FF5252 0%, #D32F2F 100%);
    transform: translateY(-2px);
}

.game24-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none !important;
}

/* ---------- Responsive: stack on small screens ---------- */
@media (max-width: 900px) {
    .game24-layout {
        flex-direction: column;
        align-items: center;
    }

    .game24-col-panel {
        align-items: center;
        text-align: center;
    }

    .game24-actions {
        justify-content: center;
    }

    .game24-results-row {
        justify-content: center;
    }

    .game24-step {
        justify-content: center;
    }
}

@media (max-width: 600px) {
    .game24-target-number {
        font-size: 42px;
    }

    .game24-board-wrapper {
        width: 320px;
        height: 320px;
    }

    .game24-compass {
        grid-template-columns: 36px 1fr 74px 1fr 36px;
        grid-template-rows: 36px 1fr 74px 1fr 36px;
        padding: 12px;
    }

    .game24-card {
        width: 68px;
        height: 68px;
        font-size: 26px;
        border-radius: 10px;
    }

    .game24-op-btn {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }

    .game24-center {
        width: 58px;
        height: 58px;
    }

    .game24-center-value {
        font-size: 22px;
    }

    .game24-board-cross::before {
        width: 74px;
    }

    .game24-board-cross::after {
        height: 74px;
    }

    .game24-diff-indicator {
        top: 52px;
        font-size: 9px;
    }

    .game24-result-card {
        width: 56px;
        height: 64px;
        font-size: 16px;
    }

    .game24-btn {
        padding: 8px 16px;
        font-size: 13px;
    }

    .game24-container {
        gap: 12px;
    }

    .game24-diff-filter-btn {
        padding: 6px 14px;
        font-size: 12px;
    }
}
