/* ── Video Poker Game Styles ────────────────────────── */

* { box-sizing: border-box; margin: 0; padding: 0; }

.container {
    max-width: 1000px !important;
    overflow: visible !important;
}

#game-wrapper {
    width: 960px;
    height: 640px;
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    border-radius: 20px;
    position: relative;
    overflow: hidden;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

/* ── Header ──────────────────────────────────────── */
.vp-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 24px;
    background: rgba(0,0,0,0.15);
    color: #fff;
}
.vp-header h1 {
    font-size: 22px;
    font-weight: 700;
    text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
.vp-bankroll {
    font-size: 18px;
    font-weight: 600;
}
.vp-bankroll span { color: #f1c40f; }

.btn-hints {
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.4);
    color: #fff;
    padding: 5px 14px;
    border-radius: 16px;
    cursor: pointer;
    font-size: 13px;
    transition: background 0.2s;
}
.btn-hints:hover { background: rgba(255,255,255,0.35); }
.btn-hints.active { background: #3498db; border-color: #3498db; }

/* ── Table Area ──────────────────────────────────── */
.vp-table {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 6px 24px 8px;
    height: calc(100% - 48px);
    justify-content: space-between;
}

/* ── Paytable ────────────────────────────────────── */
.paytable {
    width: 100%;
    background: rgba(0,0,0,0.25);
    border-radius: 10px;
    padding: 6px 12px;
    font-size: 12px;
    color: rgba(255,255,255,0.85);
}
.paytable-row {
    display: flex;
    align-items: center;
    padding: 1px 4px;
    border-radius: 4px;
    transition: background 0.3s, color 0.3s;
}
.paytable-row.highlight {
    background: rgba(241,196,15,0.35);
    color: #fff;
    font-weight: 700;
}
.paytable-hand {
    flex: 1;
    text-align: left;
    font-weight: 600;
    white-space: nowrap;
}
.paytable-pay {
    width: 52px;
    text-align: center;
    font-weight: 600;
}
.paytable-pay.active-coin {
    color: #f1c40f;
    font-weight: 700;
}
.paytable-bonus {
    color: #ff6b6b;
}
.paytable-row.highlight .paytable-bonus {
    color: #fff;
}

/* ── Cards Area ──────────────────────────────────── */
.cards-area {
    text-align: center;
    width: 100%;
    position: relative;
}
.hold-badges {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 4px;
    height: 24px;
}
.hold-badge {
    width: 68px;
    text-align: center;
    font-size: 13px;
    font-weight: 800;
    color: #f1c40f;
    text-shadow: 0 1px 3px rgba(0,0,0,0.4);
    letter-spacing: 1px;
    visibility: hidden;
    text-transform: uppercase;
}
.hold-badge.visible {
    visibility: visible;
    animation: holdPulse 0.3s ease;
}
@keyframes holdPulse {
    0% { transform: scale(1.4); }
    100% { transform: scale(1); }
}

.cards-row {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: nowrap;
    min-height: 96px;
    align-items: flex-end;
}

.card-slot {
    width: 68px;
    height: 96px;
    border-radius: 8px;
    background: rgba(0,0,0,0.15);
    border: 2px dashed rgba(255,255,255,0.2);
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
}
.card-slot.has-card {
    background: none;
    border: none;
}
.card-slot.held {
    box-shadow: 0 0 12px rgba(241,196,15,0.6);
    transform: translateY(-6px);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

/* ── Cards ────────────────────────────────────────── */
.card {
    width: 68px;
    height: 96px;
    border-radius: 8px;
    position: absolute;
    top: 0;
    left: 0;
    perspective: 600px;
    flex-shrink: 0;
}
.card-inner {
    width: 100%;
    height: 100%;
    border-radius: 8px;
    transform-style: preserve-3d;
    position: relative;
}
.card-face, .card-back {
    width: 100%;
    height: 100%;
    border-radius: 8px;
    position: absolute;
    top: 0; left: 0;
    backface-visibility: hidden;
}
.card-face {
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}
.card-rank {
    font-size: 22px;
    line-height: 1;
}
.card-suit {
    font-size: 24px;
    line-height: 1;
}
.card-corner {
    position: absolute;
    font-size: 10px;
    line-height: 1.1;
    text-align: center;
}
.card-corner.top { top: 4px; left: 5px; }
.card-corner.bottom { bottom: 4px; right: 5px; transform: rotate(180deg); }

.card-face.red { color: #e74c3c; }
.card-face.black { color: #2c3e50; }

.card-back {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}
.card-back::after {
    content: '\2660';
    font-size: 28px;
    color: rgba(255,255,255,0.3);
}

.card.winning {
    animation: winGlow 0.5s ease infinite alternate;
}
@keyframes winGlow {
    0% { filter: brightness(1); }
    100% { filter: brightness(1.3) drop-shadow(0 0 8px rgba(241,196,15,0.8)); }
}

/* ── Message area ────────────────────────────────── */
.message-area {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    text-align: center;
    min-height: 24px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

/* ── Result Overlay ──────────────────────────────── */
.result-banner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    font-size: 32px;
    font-weight: 800;
    color: #fff;
    text-shadow: 0 2px 8px rgba(0,0,0,0.4);
    pointer-events: none;
    z-index: 10;
    text-transform: uppercase;
    white-space: nowrap;
}
.result-banner.show {
    animation: resultPop 1.2s ease forwards;
}
@keyframes resultPop {
    0% { transform: translate(-50%, -50%) scale(0); opacity: 0; }
    20% { transform: translate(-50%, -50%) scale(1.2); opacity: 1; }
    40% { transform: translate(-50%, -50%) scale(1); }
    80% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(0.8); opacity: 0; }
}

/* ── Hint Panel ──────────────────────────────────── */
.hint-panel {
    background: #ebf5fb;
    border-left: 4px solid #3498db;
    border-radius: 6px;
    padding: 5px 12px 6px;
    max-width: 520px;
    margin: 0 auto;
    display: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    text-align: left;
}
.hint-panel.visible { display: block; }
.hint-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 2px;
}
.hint-action {
    font-weight: 700;
    font-size: 15px;
    color: #2c3e50;
}
.hint-risk {
    font-size: 11px;
    font-weight: 700;
    padding: 1px 8px;
    border-radius: 10px;
    color: #fff;
    white-space: nowrap;
}
.hint-risk.risk-good { background: #27ae60; }
.hint-risk.risk-ok   { background: #f39c12; }
.hint-risk.risk-bad  { background: #e74c3c; }
.hint-explanation {
    font-size: 13px;
    color: #555;
    line-height: 1.4;
}
.hint-detail-toggle {
    font-size: 12px;
    color: #3498db;
    cursor: pointer;
    margin-top: 3px;
    user-select: none;
    font-weight: 600;
}
.hint-detail-toggle:hover { text-decoration: underline; }
.hint-detail {
    display: none;
    font-size: 12px;
    color: #444;
    line-height: 1.5;
    margin-top: 4px;
    padding: 6px 8px;
    background: rgba(52,152,219,0.08);
    border-radius: 4px;
}
.hint-detail.visible { display: block; }

/* ── Controls Area ───────────────────────────────── */
.controls-area {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    width: 100%;
}
.coin-selector {
    display: flex;
    align-items: center;
    gap: 6px;
}
.coin-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px dashed rgba(255,255,255,0.4);
    background: rgba(255,255,255,0.15);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.15s, background 0.15s, box-shadow 0.15s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
.coin-btn:hover { transform: scale(1.1); background: rgba(255,255,255,0.25); }
.coin-btn.active {
    background: #f1c40f;
    border-color: #e67e22;
    color: #2c3e50;
    box-shadow: 0 0 10px rgba(241,196,15,0.5);
}
.coin-label {
    color: rgba(255,255,255,0.7);
    font-size: 13px;
    font-weight: 600;
    margin-left: 4px;
}

.action-buttons {
    display: flex;
    gap: 10px;
}
.btn-action {
    padding: 10px 28px;
    border: none;
    border-radius: 20px;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: transform 0.15s, box-shadow 0.15s;
    box-shadow: 0 3px 8px rgba(0,0,0,0.2);
}
.btn-action:hover { transform: translateY(-2px); box-shadow: 0 5px 12px rgba(0,0,0,0.3); }
.btn-action:active { transform: translateY(0); }
.btn-action:disabled { opacity: 0.4; cursor: default; transform: none; box-shadow: none; }

.btn-deal { background: linear-gradient(135deg, #f1c40f, #f39c12); color: #2c3e50; }
.btn-draw { background: linear-gradient(135deg, #3498db, #2980b9); }
.btn-bet-max { background: linear-gradient(135deg, #e74c3c, #c0392b); }

/* ── Stats Bar ───────────────────────────────────── */
.stats-bar {
    display: flex;
    gap: 16px;
    justify-content: center;
    font-size: 12px;
    color: rgba(255,255,255,0.7);
    padding: 4px 0;
}
.stats-bar span { white-space: nowrap; }
