/* ===== RESET & BASE ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --green-dark: #1a5c2a;
    --green-mid: #2d8a4e;
    --green-light: #3aaa62;
    --green-felt: #35654d;
    --bg-dark: #0f1a13;
    --bg-card: #ffffff;
    --text-light: #f0f0f0;
    --text-dark: #1a1a1a;
    --text-muted: #888;
    --gold: #d4a843;
    --red: #c0392b;
    --border: #2a3a2e;
    --font-main: 'Segoe UI', system-ui, -apple-system, sans-serif;
    --max-width: 1100px;
    --radius: 8px;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-dark);
    color: var(--text-light);
    line-height: 1.7;
    font-size: 17px;
}

a {
    color: var(--green-light);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--gold);
}

img {
    max-width: 100%;
    height: auto;
}

/* ===== LAYOUT ===== */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

/* ===== HEADER ===== */
.site-header {
    background: linear-gradient(180deg, #0d1f12 0%, var(--bg-dark) 100%);
    border-bottom: 2px solid var(--green-dark);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
}

.logo img {
    height: 44px;
    width: auto;
    filter: invert(1) brightness(2);
}

/* ===== NAVIGATION ===== */
.main-nav ul {
    display: flex;
    list-style: none;
    gap: 4px;
}

.main-nav li {
    position: relative;
}

.main-nav > ul > li > a {
    display: block;
    padding: 8px 16px;
    color: var(--text-light);
    font-size: 15px;
    font-weight: 500;
    border-radius: var(--radius);
    transition: background 0.2s, color 0.2s;
}

.main-nav > ul > li > a:hover,
.main-nav > ul > li.active > a {
    background: var(--green-dark);
    color: #fff;
}

/* Dropdown */
.main-nav .dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #1a2e1f;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    min-width: 260px;
    padding: 6px 0;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
    z-index: 200;
}

.main-nav li:hover > .dropdown {
    display: block;
}

.main-nav .dropdown a {
    display: block;
    padding: 8px 18px;
    color: var(--text-light);
    font-size: 14px;
    transition: background 0.15s;
}

.main-nav .dropdown a:hover {
    background: var(--green-dark);
    color: #fff;
}

/* Chevron */
.chevron {
    font-size: 0.7em;
    margin-left: 2px;
    opacity: 0.5;
    transition: transform 0.2s;
    display: inline-block;
}

.has-dropdown.open > a .chevron {
    transform: rotate(180deg);
}

/* Mobile nav toggle */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 28px;
    cursor: pointer;
    padding: 4px 8px;
    margin-left: auto;
}

/* ===== HERO ===== */
.hero {
    position: relative;
    background: linear-gradient(135deg, #0d1f12 0%, var(--green-felt) 100%);
    padding: 48px 0;
    text-align: center;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('../images/felt-pattern.png') repeat;
    opacity: 0.05;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: #fff;
}

.hero h1 span {
    color: var(--gold);
}

.hero p {
    font-size: 1.05rem;
    color: rgba(255,255,255,0.8);
    max-width: 560px;
    margin: 0 auto 24px;
}

.hero .btn {
    display: inline-block;
    background: var(--gold);
    color: var(--bg-dark);
    padding: 14px 36px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius);
    transition: transform 0.2s, box-shadow 0.2s;
}

.hero .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(212,168,67,0.4);
    color: var(--bg-dark);
}

/* ===== CARD GRID (homepage features) ===== */
.features {
    padding: 36px 0 48px;
}

.features h2 {
    text-align: center;
    font-size: 1.6rem;
    margin-bottom: 24px;
    color: #fff;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
}

.feature-card {
    background: linear-gradient(145deg, #1a2e1f, #162a1b);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px 20px;
    text-align: center;
    transition: transform 0.2s, border-color 0.2s;
}

.feature-card:hover {
    transform: translateY(-4px);
    border-color: var(--green-mid);
}

.feature-card .icon {
    font-size: 2.4rem;
    margin-bottom: 16px;
}

.feature-card h3 {
    font-size: 1.15rem;
    margin-bottom: 10px;
    color: var(--gold);
}

.feature-card p {
    font-size: 0.95rem;
    color: rgba(255,255,255,0.7);
    line-height: 1.6;
}

.feature-card a {
    color: inherit;
}

.feature-card a:hover {
    color: inherit;
}

/* ===== ARTICLE / CONTENT PAGES ===== */
.page-content {
    padding: 24px 0 48px;
}

.article {
    max-width: 800px;
    margin: 0 auto;
}

.article h1 {
    font-size: 1.8rem;
    margin-bottom: 4px;
    color: #fff;
}

.article .subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 20px;
}

.article h2 {
    font-size: 1.35rem;
    margin-top: 28px;
    margin-bottom: 12px;
    color: var(--gold);
    border-bottom: 1px solid var(--border);
    padding-bottom: 8px;
}

.article h3 {
    font-size: 1.1rem;
    margin-top: 20px;
    margin-bottom: 8px;
    color: var(--green-light);
}

.article p {
    margin-bottom: 12px;
    color: rgba(255,255,255,0.85);
}

.article ul, .article ol {
    margin-bottom: 16px;
    padding-left: 24px;
}

.article li {
    margin-bottom: 8px;
    color: rgba(255,255,255,0.85);
}

.article strong {
    color: #fff;
}

/* Article navigation (prev/next) */
.article-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 36px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    gap: 16px;
}

.article-nav a {
    font-size: 0.9rem;
    font-weight: 500;
    padding: 8px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: all 0.2s;
}

.article-nav a:hover {
    border-color: var(--green-mid);
    background: rgba(45,138,78,0.1);
}

/* Info box */
.info-box {
    background: linear-gradient(135deg, #1a2e1f, #162a1b);
    border-left: 4px solid var(--gold);
    border-radius: 0 var(--radius) var(--radius) 0;
    padding: 20px 24px;
    margin: 24px 0;
}

.info-box p {
    margin-bottom: 0;
}

/* ===== CARD HAND DISPLAY ===== */
.hand {
    display: inline-flex;
    gap: 6px;
    margin: 16px 0;
    padding: 16px 20px;
    background: var(--green-felt);
    border-radius: var(--radius);
    box-shadow: inset 0 2px 8px rgba(0,0,0,0.3);
}

.hand img {
    height: 90px;
    width: auto;
    border-radius: 4px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    transition: transform 0.15s;
}

.hand img:hover {
    transform: translateY(-4px);
}

.hand-label {
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Community cards (board) */
.board {
    display: inline-flex;
    gap: 8px;
    margin: 16px 0;
    padding: 20px 24px;
    background: var(--green-felt);
    border-radius: var(--radius);
    box-shadow: inset 0 2px 8px rgba(0,0,0,0.3);
}

.board img {
    height: 100px;
    width: auto;
    border-radius: 4px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

/* ===== TABLES ===== */
.article table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
    font-size: 0.95rem;
}

.article th {
    background: var(--green-dark);
    color: #fff;
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
}

.article td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    color: rgba(255,255,255,0.85);
}

.article tr:hover td {
    background: rgba(45,138,78,0.1);
}

/* ===== CALCULATOR ===== */
.calc-wrap {
    max-width: 520px;
    margin: 0 auto;
    background: linear-gradient(145deg, #1a2e1f, #162a1b);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
}

/* Top bar */
.calc-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    gap: 12px;
}

.calc-tabs {
    display: flex;
    background: #0f1a13;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid var(--border);
}

.calc-tab {
    padding: 8px 20px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    font-family: inherit;
}

.calc-tab.active {
    background: var(--green-dark);
    color: #fff;
}

.calc-tab:hover:not(.active) {
    color: var(--text-light);
}

/* Sections */
.calc-section label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 8px;
}

/* Blind presets */
.blind-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}

.preset-btn {
    padding: 5px 12px;
    border-radius: 20px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-muted);
    font-size: 0.82rem;
    cursor: pointer;
    transition: all 0.15s;
    font-family: inherit;
}

.preset-btn.active {
    background: var(--green-dark);
    color: #fff;
    border-color: var(--green-mid);
}

.preset-btn:hover:not(.active) {
    border-color: var(--green-mid);
    color: var(--text-light);
}

/* Input groups */
.input-pair {
    display: flex;
    gap: 10px;
    margin-bottom: 14px;
    justify-content: center;
}

/* Preset label toggle: desktop shows full (SB/BB), mobile shows short (BB only) */
.preset-short {
    display: none;
}
.preset-full {
    display: inline;
}
}

.input-group {
    flex: 1;
    display: flex;
    align-items: stretch;
}

.input-group.wide {
    margin-bottom: 14px;
}

.input-group .input-label {
    display: flex;
    align-items: center;
    align-self: stretch;
    padding: 0 10px;
    background: #0f1a13;
    border: 1px solid var(--border);
    border-left: none;
    color: var(--text-muted);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
    border-radius: 0 6px 6px 0;
}

.input-group input {
    width: 100%;
    padding: 9px 8px;
    background: #0f1a13;
    border: 1px solid var(--border);
    border-radius: 6px 0 0 6px;
    border-right: none;
    color: var(--text-light);
    font-size: 0.95rem;
    font-family: inherit;
    text-align: center;
}

.input-group input:focus {
    outline: none;
    border-color: var(--green-mid);
    box-shadow: 0 0 0 2px rgba(45,138,78,0.2);
    z-index: 1;
}

.input-group.compact {
    flex: 1;
}

.input-group.compact input {
    padding: 6px 8px;
    font-size: 0.9rem;
    border-radius: 6px 0 0 6px;
    border-right: none;
}

/* When compact has no label, adjust border radius */
.input-group.compact .input-label {
    display: none;
}

/* Fixed (read-only) action inputs */
.action-fixed {
    opacity: 0.6;
    cursor: default;
}

.action-fixed + .spin-controls {
    display: none;
}

.action-fixed {
    border-radius: 6px !important;
    border-right: 1px solid var(--border) !important;
}

/* Range hint under raise/bet inputs */
.action-range {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-align: center;
    margin-top: 2px;
    padding: 0 50px;
}

/* Actions */
.calc-actions-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.calc-actions-header label {
    margin-bottom: 0;
}

.action-buttons {
    display: flex;
    gap: 6px;
}

.action-add {
    padding: 4px 10px;
    border-radius: 4px;
    border: 1px dashed var(--border);
    background: transparent;
    color: var(--green-light);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.15s;
    font-family: inherit;
}

.action-add:hover {
    border-color: var(--green-mid);
    background: rgba(45,138,78,0.1);
}

.action-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 8px;
    min-height: 4px;
}

.action-row {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(15,26,19,0.6);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 6px 8px;
    animation: slideIn 0.15s ease-out;
    flex-wrap: wrap;
}

.action-row .action-range {
    width: 100%;
    padding: 0;
    margin-top: 0;
    margin-bottom: 2px;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

.action-type {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 2px 8px;
    border-radius: 4px;
    white-space: nowrap;
}

.action-type-straddle { background: #3d2a08; color: var(--gold); }
.action-type-call { background: #0a2a3d; color: #5bb8f5; }
.action-type-raise { background: #3d0a0a; color: #f57070; }
.action-type-bet { background: #1a3d0a; color: var(--green-light); }

.action-remove {
    width: 26px;
    height: 26px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 1.1rem;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.1s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: inherit;
    flex-shrink: 0;
}

.action-remove:hover {
    background: rgba(195,57,43,0.2);
    color: var(--red);
}

/* Result */
.calc-result {
    background: rgba(15,26,19,0.8);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
}

.result-max {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.result-label {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.result-value {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--gold);
}

/* Number input spinners */
.calc-wrap input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

.calc-wrap input[type="number"]::-webkit-inner-spin-button,
.calc-wrap input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    appearance: none;
}

.input-group {
    display: flex;
    align-items: center;
}

.input-group input[type="number"] {
    border-radius: 0;
    border-right: none;
    text-align: center;
}

.input-group .input-label {
    border-radius: 0 6px 6px 0 !important;
}

.spin-controls {
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    align-self: stretch;
}

.spin-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    flex: 1;
    background: #0f1a13;
    border: 1px solid var(--border);
    color: var(--green-light);
    cursor: pointer;
    font-size: 0.6rem;
    line-height: 1;
    transition: all 0.1s;
    padding: 0;
    font-family: inherit;
}

.spin-btn:first-child {
    border-radius: 0;
    border-bottom: none;
}

.spin-btn:last-child {
    border-radius: 0;
}

/* When spin-controls is last child (no label after it) */
.input-group .spin-controls:last-child .spin-btn:first-child {
    border-radius: 0 6px 0 0;
}
.input-group .spin-controls:last-child .spin-btn:last-child {
    border-radius: 0 0 6px 0;
}

.spin-btn:hover {
    background: var(--green-dark);
    color: #fff;
}

.spin-btn:active {
    background: var(--green-mid);
}

/* Responsive calc */
@media (max-width: 520px) {
    .calc-wrap {
        padding: 14px;
    }
    .calc-topbar {
        justify-content: center;
    }
    .calc-section label {
        text-align: center;
    }
    .preset-short {
        display: inline;
    }
    .preset-full {
        display: none;
    }
    .blind-presets {
        justify-content: center;
        gap: 4px;
    }
    .preset-btn {
        padding: 4px 10px;
        font-size: 0.78rem;
    }
    .input-pair {
        justify-content: center;
    }
}

/* ===== BREADCRUMBS ===== */
.breadcrumbs {
    padding: 12px 0 0;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.breadcrumbs a {
    color: var(--text-muted);
}

.breadcrumbs a:hover {
    color: var(--green-light);
}

.breadcrumbs span {
    margin: 0 6px;
}

/* ===== CATEGORY PAGE ===== */
.category-header {
    text-align: center;
    padding: 20px 0 16px;
}

.category-header h1 {
    font-size: 1.8rem;
    color: #fff;
    margin-bottom: 12px;
}

.category-header p {
    color: var(--text-muted);
    font-size: 1.05rem;
}

.article-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    padding-bottom: 80px;
}

.article-card {
    background: linear-gradient(145deg, #1a2e1f, #162a1b);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px 24px;
    transition: transform 0.2s, border-color 0.2s;
}

.article-card:hover {
    transform: translateY(-3px);
    border-color: var(--green-mid);
}

.article-card h3 {
    font-size: 1.15rem;
    margin-bottom: 10px;
}

.article-card h3 a {
    color: #fff;
}

.article-card h3 a:hover {
    color: var(--gold);
}

.article-card p {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.6);
    line-height: 1.5;
}

.coming-soon {
    text-align: center;
    padding: 80px 0;
    color: var(--text-muted);
}

.coming-soon h2 {
    font-size: 1.6rem;
    color: var(--gold);
    margin-bottom: 12px;
}

/* ===== FOOTER ===== */
.site-footer {
    border-top: 1px solid var(--border);
    padding: 24px 0;
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .header-inner {
        padding: 8px 16px;
    }

    .logo img {
        height: 34px;
    }

    .nav-toggle {
        display: block;
    }

    .main-nav > ul {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #0d1f12;
        border-bottom: 2px solid var(--green-dark);
        padding: 6px 0;
        gap: 0;
    }

    .main-nav.open > ul {
        display: flex;
    }

    .main-nav > ul > li > a {
        padding: 10px 20px;
        font-size: 14px;
        border-radius: 0;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .main-nav .chevron {
        font-size: 0.8em;
        opacity: 0.4;
    }

    .main-nav .dropdown {
        display: none;
        position: static;
        box-shadow: none;
        border: none;
        border-radius: 0;
        background: rgba(0,0,0,0.2);
        min-width: 0;
        padding: 2px 0;
    }

    .main-nav li:hover > .dropdown {
        display: none;
    }

    .main-nav li.open > .dropdown {
        display: block;
    }

    .main-nav .dropdown a {
        padding: 8px 20px 8px 36px;
        font-size: 13px;
    }

    .hero {
        padding: 36px 0;
    }

    .hero h1 {
        font-size: 1.8rem;
    }

    .hand img {
        height: 64px;
    }

    .board img {
        height: 72px;
    }
}
