/* Old Maid — kid-friendly table layout */

.setup-box {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    max-width: 420px;
    margin: 20px auto;
    padding: 20px;
}

.setup-box h2 { margin: 0 0 14px; color: #333; }

.choice-row {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.choice-btn {
    flex: 1;
    min-width: 90px;
    padding: 12px 8px;
    border: 3px solid #ddd;
    border-radius: 10px;
    background: #fafafa;
    font-size: 15px;
    font-weight: bold;
    color: #444;
    cursor: pointer;
}

.choice-btn.selected {
    border-color: #6a1b9a;
    background: #f3e5f5;
    color: #6a1b9a;
}

.big-start-btn {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 10px;
    background: #6a1b9a;
    color: white;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
}

.big-start-btn:active { background: #4a148c; }

/* Table */
.bots-row {
    display: flex;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
    margin: 10px auto;
    max-width: 700px;
}

.player-box {
    background: white;
    border: 3px solid transparent;
    border-radius: 12px;
    padding: 10px 12px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
    min-width: 130px;
}

.player-box.active-turn { border-color: #f9a825; background: #fffde7; }

.player-box.draw-target { border-color: #6a1b9a; background: #f3e5f5; }

.player-box.safe { opacity: 0.75; }

.player-name { font-weight: bold; color: #333; font-size: 16px; margin-bottom: 6px; }

.safe-badge { color: #2e7d32; font-weight: bold; font-size: 13px; }

.fan {
    display: flex;
    justify-content: center;
    min-height: 64px;
    align-items: center;
}

.fan .card-back {
    width: 42px;
    height: 60px;
    margin-left: -22px;
    border-radius: 5px;
    background: linear-gradient(135deg, #6a1b9a, #ab47bc);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3), inset 0 0 0 2px rgba(255, 255, 255, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.fan .card-back img { width: 60%; opacity: 0.9; }

.fan .card-back:first-child { margin-left: 0; }

.draw-target .fan .card-back { cursor: pointer; }

.draw-target .fan .card-back:hover,
.draw-target .fan .card-back:active { transform: translateY(-8px); transition: transform 0.15s; }

/* Center message + pair discards */
.center-zone {
    max-width: 700px;
    margin: 8px auto;
    min-height: 88px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.pair-flash {
    display: flex;
    gap: 2px;
    animation: pair-in 0.4s ease;
}

.pair-flash img { width: 48px; border-radius: 5px; box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3); }

@keyframes pair-in {
    from { transform: scale(0.3); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.pairs-count {
    background: white;
    border-radius: 999px;
    padding: 6px 14px;
    font-weight: bold;
    color: #555;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}

/* Your hand */
.my-area { max-width: 760px; margin: 6px auto 24px; }

.my-hand {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 4px;
    padding: 0 6px;
}

.my-hand img {
    width: clamp(44px, 9vw, 72px);
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

.my-hand img.oldmaid-card { outline: 3px solid #d32f2f; outline-offset: -3px; }

.drawn-flash { animation: drawn-pop 0.6s ease; }

@keyframes drawn-pop {
    0% { transform: translateY(-30px) scale(1.3); }
    100% { transform: translateY(0) scale(1); }
}

.end-emoji { font-size: 56px; margin: 6px 0; }
.end-detail { color: #555; font-size: 16px; margin: 8px 0 14px; }

@media (max-width: 700px) {
    .player-box { min-width: 104px; padding: 8px; }
    .fan .card-back { width: 34px; height: 48px; margin-left: -20px; }
}
