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

body {
    font-family: "Courier New", Courier, monospace;
    background: #fff;
    color: #000;
    min-height: 100vh;
}

header { border-bottom: 1px solid #000; padding: 1rem 2rem; }
header nav .logo {
    color: #000;
    text-decoration: none;
    font-size: 1.4rem;
    font-weight: bold;
}

main { max-width: 800px; margin: 0 auto; padding: 2rem; }

h1 { margin-bottom: 0.5rem; }
.subtitle { color: #666; margin-bottom: 1rem; }

/* Landing page */
.drill-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.drill-card {
    border: 1px solid #000;
    padding: 1.5rem;
    text-decoration: none;
    color: inherit;
    transition: background 0.15s;
}
.drill-card:hover { filter: brightness(0.95); }
.drill-preflop { background: #e8f0fe; border-color: #4a7abf; }
.drill-flop { background: #fef3e2; border-color: #c47a20; }
.drill-card h2 { margin-bottom: 0.5rem; font-size: 1.2rem; }
.drill-card p { color: #444; font-size: 0.95rem; }

/* Landing page hero */
.landing-hero { margin-bottom: 1.5rem; }

/* Compact drill tiles */
.drill-grid-compact {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.drill-tile {
    border: 1px solid #000;
    padding: 0.75rem;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    transition: background 0.15s;
}
.drill-tile:hover { filter: brightness(0.95); }
.drill-tile strong { font-size: 0.9rem; }
.drill-desc { color: #444; font-size: 0.8rem; line-height: 1.3; }

/* Drill pages */
.drill-container { max-width: 600px; margin: 0 auto; }
.back-link { color: #000; text-decoration: none; font-size: 0.9rem; }
.back-link:hover { text-decoration: underline; }

.score-bar {
    display: flex; gap: 1rem; align-items: center;
    border: 1px solid #000; padding: 0.75rem 1rem;
    margin: 1rem 0;
    flex-wrap: wrap; font-size: 0.9rem;
}

.problem-card {
    border: 1px solid #000;
    padding: 2rem;
    margin: 1.5rem 0;
    text-align: center;
}

.problem-values {
    display: flex; justify-content: center; gap: 3rem; margin-bottom: 1.5rem;
}
.value-box { text-align: center; }
.value-box .label { display: block; font-size: 0.85rem; color: #666; text-transform: uppercase; }
.value-box .value { display: block; font-size: 2.5rem; font-weight: bold; }

.prompt { margin-bottom: 1rem; font-size: 1.1rem; }
.hint { color: #666; font-size: 0.85rem; }

.answer-form { display: flex; gap: 0.5rem; justify-content: center; margin: 1rem 0; }
.answer-input {
    padding: 0.75rem; font-size: 1.2rem; width: 150px;
    border: 1px solid #000;
    background: #fff; color: #000; text-align: center;
    font-family: inherit;
}
.answer-input:focus { outline: none; border-width: 2px; }

.btn-primary {
    padding: 0.75rem 1.5rem; font-size: 1rem;
    background: #000; color: #fff;
    border: none; cursor: pointer; font-weight: bold;
    font-family: inherit;
}
.btn-primary:hover { background: #333; }

.btn-secondary {
    padding: 0.5rem 1rem; background: #fff;
    border: 1px solid #000; color: #000;
    cursor: pointer; font-family: inherit;
}
.btn-secondary:hover { background: #f0f0f0; }

.btn-small {
    padding: 0.3rem 0.8rem; font-size: 0.8rem;
    background: #fff; border: 1px solid #000;
    color: #000; cursor: pointer;
    margin-left: auto; font-family: inherit;
}
.btn-small:hover { background: #f0f0f0; }

.timer { font-size: 1.1rem; color: #666; margin-top: 0.5rem; }

/* Results */
.result-card {
    border: 1px solid #000;
    padding: 2rem; margin: 1.5rem 0; text-align: center;
}
.result-card.correct { border-left: 4px solid #22a522; }
.result-card.mediocre { border-left: 4px solid #000; }
.result-card.incorrect { border-left: 4px solid #d42020; }
.result-icon { font-size: 1.5rem; margin-bottom: 1rem; }
.correct .result-icon { color: #22a522; }
.incorrect .result-icon { color: #d42020; }
.result-details { margin-bottom: 1rem; text-align: left; }
.result-details p { margin: 0.3rem 0; }
.explanation { color: #444; font-size: 0.95rem; margin-top: 0.5rem; line-height: 1.5; }
.explanation .draw-line { margin: 0.6rem 0; }
.explanation .draw-summary { margin-top: 0.8rem; color: #555; font-style: italic; }
.explanation .draw-math { margin-top: 0.8rem; font-size: 1rem; color: #222; }
.explanation .draw-note { margin-top: 0.5rem; color: #b45309; }
.board-review { margin: 1rem 0 1.2rem; padding-bottom: 1rem; border-bottom: 1px solid #ddd; }
.score-update { color: #666; font-size: 0.9rem; margin-bottom: 1.5rem; }

/* Board display */
.board-display { font-size: 1.3rem; margin-bottom: 1rem; }
.board-display .label { color: #666; margin-right: 0.5rem; }
.board-display .card {
    display: inline-flex; align-items: center; justify-content: center;
    background: #fff; color: #000;
    min-width: 38px; min-height: 52px;
    padding: 0.2rem 0.4rem; margin: 0 0.15rem;
    border: 1.5px solid #999; border-radius: 5px;
    font-weight: bold; font-size: 1.1rem;
    box-shadow: 1px 2px 4px rgba(0,0,0,0.15);
    line-height: 1;
}
.board-display .card.card-red { color: #d42020; }

/* Section titles */
.section-title {
    margin-top: 2rem; margin-bottom: 0.5rem;
    border-bottom: 1px solid #000; padding-bottom: 0.3rem;
}

/* Poker table for position ID */
.table-wrapper { padding: 2.5rem 1rem; }
.poker-table {
    position: relative; width: 340px; height: 190px;
    margin: 0 auto;
}
.felt {
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: #1a6b37; border: 6px solid #5c3a1e;
    border-radius: 50%; box-shadow: inset 0 0 30px rgba(0,0,0,0.3);
}
.seat {
    position: absolute; width: 40px; height: 40px;
    background: #444; color: #fff; border-radius: 50%;
    text-align: center; line-height: 40px; font-size: 0.85rem;
    font-weight: bold; z-index: 1;
}
/* 7 seats around the oval: 0=right, 1-2=bottom, 3=left, 4-6=top */
.seat-0 { top: 50%; right: -20px; transform: translateY(-50%); }
.seat-1 { bottom: -20px; right: 55px; }
.seat-2 { bottom: -20px; left: 55px; }
.seat-3 { top: 50%; left: -20px; transform: translateY(-50%); }
.seat-4 { top: -20px; left: 55px; }
.seat-5 { top: -20px; left: 50%; transform: translateX(-50%); }
.seat-6 { top: -20px; right: 55px; }
.target-seat { background: #c9a800; color: #000; }
.seat-number { pointer-events: none; }
.btn-marker {
    position: absolute; top: -6px; right: -6px;
    background: #fff; color: #000; border-radius: 50%;
    width: 20px; height: 20px; line-height: 20px;
    font-size: 0.65rem; font-weight: bold;
    border: 2px solid #000;
}
.position-buttons {
    display: flex; gap: 0.5rem; justify-content: center;
    flex-wrap: wrap; margin: 1rem 0;
}

/* Action buttons (RFI raise/fold) */
.action-buttons { display: flex; gap: 1rem; justify-content: center; margin: 1rem 0; }

/* Range chart grid */
.range-chart { margin: 1rem 0; text-align: center; }
.range-grid { border-collapse: collapse; font-size: 0.55rem; margin: 0.5rem auto; }
.range-grid td {
    width: 28px; height: 20px; border: 1px solid #000;
    text-align: center; padding: 1px;
}
.range-grid td.raise { background: #b6e2b6; font-weight: bold; color: #1a5c1a; }
.range-grid td.fold { background: #f2c4c4; color: #8b2020; }

/* Range chart legend */
.range-legend {
    display: flex; gap: 1.5rem; justify-content: center;
    margin-top: 0.5rem; font-size: 0.8rem;
}
.range-legend-item {
    display: flex; align-items: center; gap: 0.3rem;
}
.range-legend-swatch {
    display: inline-block; width: 14px; height: 14px;
    border: 1px solid #000;
}
.range-legend-swatch.raise-swatch { background: #b6e2b6; }
.range-legend-swatch.fold-swatch { background: #f2c4c4; }

/* Texture form */
.texture-form { text-align: left; max-width: 320px; margin: 1rem auto; }
.texture-row {
    margin: 0.75rem 0; display: flex; gap: 1rem; align-items: center;
}
.texture-row label { cursor: pointer; }
.texture-label { min-width: 90px; font-weight: bold; }

/* Multi-input form (equity counting) */
.answer-form-multi {
    display: flex; flex-direction: column; align-items: center;
    gap: 0.75rem; margin: 1rem 0;
}
.input-group { display: flex; gap: 0.5rem; align-items: center; }
.input-group label { min-width: 70px; font-weight: bold; text-align: right; }

/* Auth nav */
header nav {
    display: flex; justify-content: space-between; align-items: center;
}
.nav-right { display: flex; gap: 0.75rem; align-items: center; }
.nav-user { font-size: 0.85rem; color: #666; }
.nav-form { display: inline; }
.btn-nav {
    padding: 0.3rem 0.8rem; font-size: 0.85rem;
    background: #fff; border: 1px solid #000;
    color: #000; cursor: pointer;
    text-decoration: none; font-family: inherit;
}
.btn-nav:hover { background: #f0f0f0; }

/* Auth forms */
.auth-form-card {
    border: 1px solid #000; padding: 2rem;
    margin: 1.5rem 0; max-width: 400px;
}
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; margin-bottom: 0.3rem; font-weight: bold; font-size: 0.9rem; }
.auth-input { width: 100%; text-align: left; }
.auth-btn { width: 100%; margin-top: 0.5rem; }
.auth-switch { margin-top: 1rem; font-size: 0.9rem; color: #666; }
.auth-switch a { color: #000; }
.auth-error {
    border: 1px solid #d42020; background: #fef2f2;
    color: #d42020; padding: 0.75rem; margin: 1rem 0;
    font-size: 0.9rem;
}
.auth-success {
    border: 1px solid #22a522; background: #f0fdf4;
    color: #22a522; padding: 0.75rem; margin: 1rem 0;
    font-size: 0.9rem;
}

/* Profile page */
.profile-summary {
    border: 1px solid #000; padding: 1.5rem;
    margin: 1.5rem 0;
}
.profile-summary p { margin: 0.3rem 0; }

.profile-table {
    width: 100%; border-collapse: collapse;
    margin: 1.5rem 0; font-size: 0.9rem;
}
.profile-table th, .profile-table td {
    border: 1px solid #000; padding: 0.5rem 0.75rem;
    text-align: left;
}
.profile-table th { background: #000; color: #fff; font-weight: bold; }
.profile-table tr:nth-child(even) { background: #f5f5f5; }
