/* ── Craps 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 ──────────────────────────────────────── */
.craps-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 24px;
    background: rgba(0,0,0,0.15);
    color: #fff;
}
.craps-header h1 {
    font-size: 22px;
    font-weight: 700;
    text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
.craps-bankroll {
    font-size: 18px;
    font-weight: 600;
}
.craps-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 ──────────────────────────────────────── */
.craps-table {
    display: flex;
    flex-direction: column;
    padding: 6px 16px 4px;
    height: calc(100% - 44px);
    gap: 4px;
}

/* ── Point Numbers Row ──────────────────────────── */
.point-row {
    display: flex;
    gap: 4px;
    justify-content: center;
    align-items: center;
}
.point-cell {
    width: 80px;
    height: 56px;
    background: rgba(0,0,0,0.12);
    border: 2px solid rgba(255,255,255,0.25);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: border-color 0.2s, background 0.2s;
}
.point-cell.clickable { cursor: pointer; }
.point-cell.clickable:hover { border-color: #f1c40f; background: rgba(241,196,15,0.15); }
.point-number {
    font-size: 22px;
    font-weight: 800;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0,0,0,0.3);
    line-height: 1;
}
.place-label {
    font-size: 8px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.6);
    letter-spacing: 1px;
}
.puck-home {
    width: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 8px;
}

/* ── Puck ────────────────────────────────────────── */
.puck {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    border: 3px solid rgba(255,255,255,0.5);
    z-index: 5;
    transition: all 0.4s ease;
}
.puck-off {
    background: #2c3e50;
    color: #fff;
}
.puck-on {
    background: #f1c40f;
    color: #2c3e50;
    box-shadow: 0 0 12px rgba(241,196,15,0.6);
}

/* ── Bet Zones ──────────────────────────────────── */
.bet-zone {
    border: 2px solid rgba(255,255,255,0.25);
    border-radius: 8px;
    padding: 6px 12px;
    text-align: center;
    position: relative;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
    background: rgba(0,0,0,0.08);
}
.bet-zone.clickable { cursor: pointer; }
.bet-zone.clickable:hover {
    border-color: #f1c40f;
    background: rgba(241,196,15,0.12);
}
.bet-zone.zone-active {
    border-color: rgba(241,196,15,0.6);
    box-shadow: 0 0 8px rgba(241,196,15,0.2);
}
.zone-label {
    font-size: 14px;
    font-weight: 800;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
.zone-numbers {
    font-size: 12px;
    color: rgba(255,255,255,0.8);
    margin-top: 1px;
}
.zone-detail {
    font-size: 9px;
    color: rgba(255,255,255,0.55);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ── Specific Zones ─────────────────────────────── */
.pass-zone {
    background: rgba(39,174,96,0.25);
    border-color: rgba(46,204,113,0.5);
}
.pass-zone:hover {
    background: rgba(39,174,96,0.4) !important;
    border-color: #2ecc71 !important;
}
.dontpass-zone {
    background: rgba(231,76,60,0.15);
    border-color: rgba(231,76,60,0.4);
}
.dontpass-zone:hover {
    background: rgba(231,76,60,0.3) !important;
    border-color: #e74c3c !important;
}
.field-zone {
    background: rgba(52,152,219,0.15);
    border-color: rgba(52,152,219,0.4);
}
.field-zone:hover {
    background: rgba(52,152,219,0.3) !important;
    border-color: #3498db !important;
}
.odds-zone {
    background: rgba(241,196,15,0.15);
    border-color: rgba(241,196,15,0.4);
}
.odds-zone:hover {
    background: rgba(241,196,15,0.3) !important;
    border-color: #f1c40f !important;
}

/* ── Bet Chip Display ───────────────────────────── */
.bet-chip-display {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: #f1c40f;
    color: #2c3e50;
    font-size: 11px;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 12px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    z-index: 3;
}

/* ── Dice Area ──────────────────────────────────── */
.dice-area {
    display: flex;
    gap: 24px;
    justify-content: center;
    align-items: center;
    min-height: 80px;
    padding: 4px 0;
}
.die {
    width: 64px;
    height: 64px;
    background: #fff;
    border-radius: 10px;
    position: relative;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25), inset 0 1px 0 rgba(255,255,255,0.5);
    transition: transform 0.1s;
}
.die.rolling {
    animation: diceRoll 0.15s ease-in-out infinite;
}
.die.landed {
    animation: diceLand 0.3s ease-out;
}
.die-dot {
    position: absolute;
    width: 10px;
    height: 10px;
    background: #2c3e50;
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

@keyframes diceRoll {
    0% { transform: rotate(0deg) scale(1); }
    25% { transform: rotate(15deg) scale(1.05); }
    50% { transform: rotate(0deg) scale(0.95); }
    75% { transform: rotate(-15deg) scale(1.05); }
    100% { transform: rotate(0deg) scale(1); }
}
@keyframes diceLand {
    0% { transform: scale(1.2); }
    50% { transform: scale(0.9); }
    100% { transform: scale(1); }
}

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

/* ── Result Banner ──────────────────────────────── */
.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: 460px;
    margin: 2px 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: 14px;
    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: 12px;
    color: #555;
    line-height: 1.3;
}
.hint-detail-toggle {
    font-size: 11px;
    color: #3498db;
    cursor: pointer;
    margin-top: 2px;
    user-select: none;
    font-weight: 600;
}
.hint-detail-toggle:hover { text-decoration: underline; }
.hint-detail {
    display: none;
    font-size: 11px;
    color: #444;
    line-height: 1.4;
    margin-top: 3px;
    padding: 5px 8px;
    background: rgba(52,152,219,0.08);
    border-radius: 4px;
}
.hint-detail.visible { display: block; }

/* ── Controls Bar ───────────────────────────────── */
.controls-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 4px 0;
}
.chip-rack {
    display: flex;
    gap: 8px;
    justify-content: center;
}
.chip {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 3px dashed rgba(255,255,255,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
    box-shadow: 0 3px 6px rgba(0,0,0,0.25);
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}
.chip:hover { transform: scale(1.12); box-shadow: 0 5px 12px rgba(0,0,0,0.35); }
.chip.chip-selected {
    border-style: solid;
    border-color: #f1c40f;
    transform: scale(1.15);
    box-shadow: 0 0 12px rgba(241,196,15,0.5);
}

.controls-right {
    display: flex;
    align-items: center;
    gap: 10px;
}
.selected-label {
    color: #fff;
    font-size: 13px;
    font-weight: 600;
}
.selected-label span {
    color: #f1c40f;
    font-weight: 800;
}

.btn-roll {
    padding: 8px 28px;
    border: none;
    border-radius: 20px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    text-transform: uppercase;
    transition: transform 0.15s;
    background: linear-gradient(135deg, #f1c40f, #f39c12);
    color: #2c3e50;
    box-shadow: 0 3px 8px rgba(0,0,0,0.2);
}
.btn-roll:hover { transform: translateY(-2px); box-shadow: 0 5px 12px rgba(0,0,0,0.3); }
.btn-roll:disabled { opacity: 0.4; cursor: default; transform: none; box-shadow: none; }

.btn-clear-bets {
    padding: 6px 16px;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 16px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    text-transform: uppercase;
    background: rgba(255,255,255,0.2);
    color: #fff;
    transition: background 0.2s;
}
.btn-clear-bets:hover { background: rgba(255,255,255,0.35); }

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