/* Poker Trainer - Custom Styles */
/* Integrated with ryderkatz-site design system */

#poker-app {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 0;
    display: flex;
    flex-direction: column;
    min-height: 80vh;
}

/* Stats Bar */
.stats-bar {
    display: flex;
    justify-content: center;
    gap: 30px;
    padding: 20px;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: 20px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-sm);
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-label {
    font-size: 0.7rem;
    font-family: var(--mono);
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--fg-mute);
    margin-bottom: 4px;
}

.stat-value {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--fg);
}

/* Game Area */
.game-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 24px;
    padding: 2rem 0;
}

.scenario-header {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.position-badge {
    background: var(--accent-soft);
    border: 1px solid var(--accent);
    color: var(--accent);
    padding: 10px 32px;
    border-radius: 100px;
    font-weight: 900;
    font-size: 1.6rem;
    box-shadow: 0 0 20px var(--accent-glow);
}

.scenario-text {
    color: var(--fg-dim);
    font-size: 1.1rem;
    font-weight: 500;
}

/* Cards */
.cards-container {
    display: flex;
    gap: 24px;
    perspective: 1000px;
    margin: 20px 0;
}

.card {
    width: 130px;
    height: 185px;
    background: #f8f7f2; /* Keep card white for classic feel */
    border-radius: 14px;
    position: relative;
    color: #1a1a1a;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
    padding: 12px;
    font-family: "Georgia", serif;
    transition: transform 0.3s var(--ease-out);
    border: 1px solid rgba(0,0,0,0.05);
}

.card:hover {
    transform: translateY(-8px) rotateX(8deg);
}

.card .rank {
    font-size: 2.2rem;
    font-weight: bold;
    line-height: 0.9;
    letter-spacing: -2px;
}

.card .suit-symbol {
    font-size: 4.5rem;
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    filter: drop-shadow(0 2px 2px rgba(0,0,0,0.1));
}

.card.red { color: #cf1b1e; }
.card.black { color: #1a1e23; }

.hand-notation {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--fg-dim);
    background: var(--bg-soft);
    border: 1px solid var(--border);
    padding: 6px 20px;
    border-radius: 12px;
    margin-bottom: 10px;
    font-family: var(--mono);
}

/* Actions */
.action-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 16px;
    width: 100%;
    max-width: 600px;
    margin-top: 10px;
}

.action-btn {
    padding: 20px;
    border: none;
    border-radius: 18px;
    color: white;
    font-weight: 800;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s var(--ease-spring);
    box-shadow: 0 6px 0 rgba(0,0,0,0.3), var(--shadow-md);
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.action-btn:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
}

.action-btn:active {
    transform: translateY(4px);
    box-shadow: 0 2px 0 rgba(0,0,0,0.3);
}

.btn-fold { background: linear-gradient(135deg, #e53935, #b71c1c); }
.btn-call { background: linear-gradient(135deg, #43a047, #1b5e20); }
.btn-raise { background: linear-gradient(135deg, #1e88e5, #0d47a1); }
.btn-3bet { background: linear-gradient(135deg, #8e24aa, #4a148c); }
.btn-4bet { background: linear-gradient(135deg, #fb8c00, #e65100); }

/* Result Banner */
.result-banner {
    width: 100%;
    max-width: 500px;
    padding: 24px;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    animation: slideUp 0.4s var(--ease-spring);
    box-shadow: var(--shadow-lg);
}

@keyframes slideUp {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.result-banner.correct {
    background: rgba(46, 125, 50, 0.15);
    border: 1px solid rgba(76, 175, 80, 0.4);
    backdrop-filter: blur(10px);
}

.result-banner.incorrect {
    background: rgba(183, 28, 28, 0.15);
    border: 1px solid rgba(244, 67, 54, 0.4);
    backdrop-filter: blur(10px);
}

.result-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.result-banner.correct h2 { color: #81c784; font-weight: 900; }
.result-banner.incorrect h2 { color: #e57373; font-weight: 900; }

.next-btn {
    margin-top: 10px;
    padding: 16px;
    border-radius: 14px;
    border: none;
    background: var(--fg);
    color: var(--bg);
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s var(--ease);
}

.next-btn:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-md);
}

.hidden { display: none !important; }

/* Footer */
.poker-footer {
    text-align: center;
    padding: 2rem;
    color: var(--fg-mute);
    font-size: 0.85rem;
    font-family: var(--mono);
}

/* Range Viewer Tool */
.range-toggle-btn {
    position: fixed;
    bottom: 80px; /* Elevated to avoid clash with site footer */
    right: 30px;
    background: var(--bg-elev);
    color: var(--fg);
    border: 1px solid var(--border);
    padding: 14px 24px;
    border-radius: 100px;
    cursor: pointer;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: var(--shadow-lg);
    transition: all 0.2s var(--ease);
    z-index: 100;
    backdrop-filter: blur(10px);
}

.range-toggle-btn:hover {
    background: var(--bg-soft);
    border-color: var(--accent);
    transform: translateY(-4px);
}

.range-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(12px);
}

.range-modal-content {
    background: var(--bg-elev);
    width: 95%;
    max-width: 650px;
    padding: 2rem;
    border-radius: 32px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-hi);
}

.range-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.range-modal-header h2 {
    font-weight: 900;
    letter-spacing: -0.04em;
}

.close-btn {
    background: none;
    border: none;
    color: var(--fg-mute);
    font-size: 2.5rem;
    line-height: 1;
    cursor: pointer;
}

.range-dropdown {
    width: 100%;
    padding: 14px;
    background: var(--bg-soft);
    color: var(--fg);
    border: 1px solid var(--border);
    border-radius: 14px;
    margin-bottom: 24px;
    font-size: 1rem;
    font-weight: 600;
    outline: none;
    cursor: pointer;
}

.range-grid {
    display: grid;
    grid-template-columns: repeat(13, 1fr);
    gap: 3px;
    margin-bottom: 24px;
    background: var(--border);
    padding: 3px;
    border-radius: 8px;
}

.grid-cell {
    aspect-ratio: 1;
    background: var(--bg-elev);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.65rem;
    font-weight: 800;
    color: var(--fg-mute);
    border-radius: 4px;
    user-select: none;
    font-family: var(--mono);
}

.grid-cell.highlight {
    background: var(--accent);
    color: var(--accent-fg);
    box-shadow: inset 0 0 10px rgba(0,0,0,0.1);
}

.range-legend {
    display: flex;
    gap: 24px;
    justify-content: center;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--fg-dim);
}

.legend-item .box {
    width: 16px;
    height: 16px;
    border-radius: 4px;
}

.box.in-range { background: var(--accent); }
.box.out-range { background: var(--bg-soft); border: 1px solid var(--border); }

@media (max-width: 600px) {
    .grid-cell { font-size: 0.5rem; }
    .range-modal-content { padding: 1rem; }
    .stats-bar { gap: 15px; padding: 15px; }
}
