/**
 * Fourfall Game Styles
 */

.fourfall-board {
    display: inline-block;
    background: #1565c0;
    border-radius: 8px;
    padding: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.fourfall-drop-row {
    display: flex;
    margin-bottom: 4px;
}

.fourfall-drop-zone {
    width: 60px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 2px;
}

.fourfall-drop-zone.fourfall-droppable {
    cursor: pointer;
}

.fourfall-preview-disc {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    opacity: 0.4;
    transition: opacity 0.15s, transform 0.15s;
}

.fourfall-drop-zone.fourfall-droppable:hover .fourfall-preview-disc {
    opacity: 0.8;
    transform: scale(1.1);
}

.fourfall-row {
    display: flex;
}

.fourfall-cell {
    width: 60px;
    height: 60px;
    margin: 2px;
    cursor: pointer;
}

.fourfall-slot {
    width: 100%;
    height: 100%;
    background: #0d47a1;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.fourfall-disc {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    transition: transform 0.15s;
}

.fourfall-disc-red {
    background: radial-gradient(circle at 30% 30%, #ff5252, #d32f2f);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3), inset 0 -2px 4px rgba(0, 0, 0, 0.2);
}

.fourfall-disc-yellow {
    background: radial-gradient(circle at 30% 30%, #ffeb3b, #fbc02d);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3), inset 0 -2px 4px rgba(0, 0, 0, 0.2);
}

.fourfall-winning {
    animation: fourfall-pulse 0.6s ease-in-out infinite alternate;
}

@keyframes fourfall-pulse {
    from {
        transform: scale(1);
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3), inset 0 -2px 4px rgba(0, 0, 0, 0.2);
    }
    to {
        transform: scale(1.08);
        box-shadow: 0 0 12px 4px rgba(255, 255, 255, 0.6), inset 0 -2px 4px rgba(0, 0, 0, 0.2);
    }
}

.fourfall-info {
    margin-top: 20px;
    padding: 15px;
    background: #f5f5f5;
    border-radius: 8px;
    text-align: center;
}

.fourfall-status {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
}

.fourfall-match {
    margin: 12px 0 8px;
    display: grid;
    gap: 6px;
    font-size: 14px;
    color: #333;
}

.fourfall-round-indicator {
    font-weight: 600;
    color: #0d47a1;
}

.fourfall-match-score {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    font-weight: 600;
}

.fourfall-player-score {
    padding: 4px 10px;
    border-radius: 999px;
    background: #e3f2fd;
}

.fourfall-player-red {
    color: #c62828;
}

.fourfall-player-yellow {
    color: #f57f17;
}

.fourfall-match-target {
    color: #555;
}

.fourfall-your-turn {
    color: #2e7d32;
}

.fourfall-waiting {
    color: #666;
}

.fourfall-winner {
    color: #1565c0;
    font-size: 18px;
}

.fourfall-draw {
    color: #f57c00;
}

.fourfall-move-count {
    font-size: 14px;
    color: #666;
}

/* Responsive */
@media (max-width: 600px) {
    .fourfall-cell {
        width: 44px;
        height: 44px;
    }

    .fourfall-drop-zone {
        width: 44px;
        height: 32px;
    }

    .fourfall-preview-disc {
        width: 28px;
        height: 28px;
    }

    .fourfall-disc {
        width: 36px;
        height: 36px;
    }

    .fourfall-slot {
        border-radius: 50%;
    }
}

/* ============================================================
   MIDNIGHT ARCADE — Fourfall modern layer (v1.2.3)
   Additive overrides per docs/design-spec.md. Original rules
   above are preserved; these win by cascade order.
   ============================================================ */

.fourfall-board {
    background:
        linear-gradient(145deg, #1e40af 0%, #1e3a8a 55%, #172e6e 100%);
    border-radius: 16px;
    box-shadow:
        0 24px 50px -18px rgba(0, 0, 0, 0.75),
        inset 0 2px 4px rgba(255, 255, 255, 0.18),
        inset 0 -4px 8px rgba(0, 0, 0, 0.45);
}

/* Recessed holes */
.fourfall-slot {
    box-shadow:
        inset 0 3px 8px rgba(0, 0, 0, 0.55),
        inset 0 -1px 2px rgba(255, 255, 255, 0.12);
}

/* Glossy discs */
.fourfall-disc {
    box-shadow:
        inset 0 4px 6px rgba(255, 255, 255, 0.4),
        inset 0 -5px 8px rgba(0, 0, 0, 0.35),
        0 3px 6px rgba(0, 0, 0, 0.4);
}

.fourfall-disc-red {
    background: radial-gradient(circle at 32% 28%, #fb7185 0%, #ef4444 45%, #b91c1c 100%);
}

.fourfall-disc-yellow {
    background: radial-gradient(circle at 32% 28%, #fde68a 0%, #fbbf24 45%, #d97706 100%);
}

.fourfall-winning .fourfall-disc,
.fourfall-disc.fourfall-winning {
    animation: fourfall-win-glow 1s ease-in-out infinite;
}

@keyframes fourfall-win-glow {
    0%, 100% { box-shadow: 0 0 8px rgba(251, 191, 36, 0.5), inset 0 4px 6px rgba(255, 255, 255, 0.4); }
    50% { box-shadow: 0 0 24px rgba(251, 191, 36, 0.95), inset 0 4px 6px rgba(255, 255, 255, 0.4); }
}

.fourfall-info {
    background: linear-gradient(180deg, #131a30 0%, #0b1020 100%);
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 14px;
    color: #e7ecf7;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.fourfall-status,
.fourfall-move-count,
.fourfall-match-score {
    color: #e7ecf7;
}

.fourfall-waiting {
    color: #9aa7c7;
}

.fourfall-your-turn {
    color: #4ade80;
    text-shadow: 0 0 12px rgba(74, 222, 128, 0.45);
}

.fourfall-winner {
    color: #fbbf24;
    text-shadow: 0 0 16px rgba(251, 191, 36, 0.5);
}
