:root {
    --bg-dark: #121915;
    --panel-bg: #1c2620;
    --panel-border: #2d3e33;
    --accent-gold: #e2b04a;
    --accent-green: #38b000;
    --accent-emerald: #00796b;
    --text-main: #f0f4f1;
    --text-muted: #95a59b;
    --danger: #e63946;
    --warning: #f4a261;
    --success: #2a9d8f;

    /* Hex colors */
    --color-blue: #1e88e5;
    --color-green: #2e7d32;
    --color-red: #e53935;
    --color-grey: #757575;
    --color-purple: #8e24aa;
    --color-yellow: #fdd835;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    user-select: none;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: 'Nunito', sans-serif;
    overflow: hidden;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ==================== HEADER ==================== */
#game-header {
    height: 56px;
    background: linear-gradient(90deg, #18231c 0%, #101713 100%);
    border-bottom: 2px solid var(--panel-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.game-logo {
    font-family: 'Cinzel', serif;
    font-size: 20px;
    font-weight: 900;
    color: var(--accent-gold);
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: 1px;
}

.badge {
    background: rgba(226, 176, 74, 0.15);
    color: var(--accent-gold);
    border: 1px solid var(--accent-gold);
    font-size: 11px;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 12px;
}

.phase-tracker {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0,0,0,0.3);
    padding: 4px 12px;
    border-radius: 20px;
    border: 1px solid var(--panel-border);
    font-size: 13px;
}

.phase-step {
    color: var(--text-muted);
    font-weight: 700;
    transition: all 0.3s;
}

.phase-step.active {
    color: #4ade80;
    text-shadow: 0 0 8px rgba(74, 222, 128, 0.4);
}

.phase-arrow {
    color: #4b5563;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-btn {
    background: #25332a;
    color: var(--text-main);
    border: 1px solid var(--panel-border);
    padding: 6px 12px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.nav-btn:hover {
    background: #314438;
    border-color: #415a4b;
}

.nav-btn.primary {
    background: var(--accent-gold);
    color: #1a1a1a;
    border-color: #d49f33;
}

.nav-btn.primary:hover {
    background: #eed074;
}

/* ==================== WORKSPACE LAYOUT ==================== */
#app-workspace {
    display: flex;
    flex: 1;
    height: calc(100vh - 56px);
    overflow: hidden;
    position: relative;
}

.sidebar-panel {
    width: 380px;
    min-width: 360px;
    max-width: 420px;
    background: var(--panel-bg);
    border-right: 1px solid var(--panel-border);
    display: flex;
    flex-direction: column;
    padding: 14px;
    gap: 12px;
    overflow-y: auto;
    z-index: 20;
    box-shadow: 4px 0 16px rgba(0,0,0,0.4);
}

#player-sidebar {
    border-right: none;
    border-left: 1px solid var(--panel-border);
    box-shadow: -4px 0 16px rgba(0,0,0,0.4);
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--panel-border);
    padding-bottom: 8px;
}

.panel-header h2 {
    font-family: 'Cinzel', serif;
    font-size: 17px;
    color: var(--accent-gold);
}

.bag-counter {
    font-size: 12px;
    color: var(--text-muted);
}

.action-box {
    background: #141c17;
    border: 1px solid var(--panel-border);
    border-radius: 8px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.box-desc {
    font-size: 12px;
    color: var(--text-muted);
}

.action-btn {
    background: #27382d;
    color: #fff;
    border: 1px solid var(--panel-border);
    padding: 8px 12px;
    border-radius: 6px;
    font-weight: 800;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.action-btn:hover:not(:disabled) {
    background: #354c3e;
    filter: brightness(1.1);
}

.action-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.action-btn.warning {
    border-color: #d97706;
    color: #fcd34d;
}

.action-btn.warning:hover:not(:disabled) {
    background: #78350f;
}

.action-btn.primary {
    background: #2563eb;
    border-color: #3b82f6;
}

.action-btn.success {
    background: #059669;
    border-color: #10b981;
}

.action-btn.danger {
    background: #dc2626;
    border-color: #ef4444;
}

.full-width {
    width: 100%;
}

.section-title {
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}

/* Choice Radios */
.choice-radios {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 4px;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    background: #18231c;
    padding: 6px 8px;
    border-radius: 6px;
    border: 1px solid transparent;
}

.radio-label:has(input:checked) {
    border-color: var(--accent-gold);
    color: var(--accent-gold);
    background: rgba(226, 176, 74, 0.1);
}

.hint-text {
    font-size: 11px;
    color: #94a3b8;
    line-height: 1.4;
    margin-top: 4px;
}

/* Market 6 Tiles Grid */
.market-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(3, auto);
    gap: 16px 14px;
    justify-items: center;
    padding: 10px 0;
}

/* Bonus cards */
.bonus-cards-list {
    display: flex;
    gap: 6px;
    margin-top: 6px;
}

.bonus-card-item {
    flex: 1;
    background: #151e18;
    border: 1px solid var(--panel-border);
    border-radius: 6px;
    padding: 6px 4px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.bonus-tag {
    font-size: 14px;
    font-weight: 900;
    color: var(--accent-gold);
}

.bonus-count {
    font-size: 11px;
    color: var(--text-muted);
}

/* Solo tracker */
.solo-tasks {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 6px;
}

.task-item {
    background: #141c17;
    border: 1px solid var(--panel-border);
    border-radius: 6px;
    padding: 6px 8px;
    font-size: 11px;
    display: flex;
    align-items: flex-start;
    gap: 6px;
    line-height: 1.3;
}

.task-item.done {
    border-color: #059669;
    background: rgba(5, 150, 105, 0.15);
    color: #6ee7b7;
}

.task-icon {
    font-size: 13px;
}

.solo-round-tracker {
    margin-top: 8px;
    background: #151e18;
    border-radius: 6px;
    padding: 8px;
    font-size: 12px;
}

.round-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 6px;
}

.round-pill {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #243329;
    border: 1px solid var(--panel-border);
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: var(--text-muted);
}

.round-pill.passed {
    background: #e2b04a;
    color: #121915;
    border-color: #eed074;
}

.round-pill.current {
    background: #059669;
    color: #fff;
    border-color: #34d399;
    box-shadow: 0 0 6px #059669;
}

/* ==================== CENTER BOARD ==================== */
#board-viewport {
    flex: 1;
    position: relative;
    background: radial-gradient(circle at center, #16241b 0%, #0c140f 100%);
    overflow: hidden;
}

#board-floating-toolbar {
    position: absolute;
    top: 14px;
    left: 14px;
    z-index: 50;
    display: flex;
    align-items: center;
    gap: 12px;
}

.zoom-controls {
    display: flex;
    background: rgba(20, 28, 23, 0.85);
    border: 1px solid var(--panel-border);
    border-radius: 8px;
    backdrop-filter: blur(4px);
    overflow: hidden;
    white-space: nowrap;
    flex-shrink: 0;
}

.zoom-controls button {
    background: transparent;
    border: none;
    color: var(--text-main);
    padding: 6px 14px;
    font-weight: 800;
    cursor: pointer;
    font-size: 13px;
    min-width: 32px;
    transition: background 0.2s;
}

.zoom-controls button:hover {
    background: rgba(255,255,255,0.1);
}

#board-quick-message {
    background: rgba(20, 28, 23, 0.9);
    border: 1px solid var(--panel-border);
    border-radius: 8px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 700;
    color: #6ee7b7;
    backdrop-filter: blur(4px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

#board-pan-container {
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: relative;
    cursor: grab;
}

#board-pan-container.panning {
    cursor: grabbing;
}

#board-canvas {
    position: absolute;
    width: 3000px;
    height: 3000px;
    top: 0;
    left: 0;
    transform-origin: 0 0;
}

#board-paths-svg {
    position: absolute;
    width: 3000px;
    height: 3000px;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 50;
}

#hex-elements-layer {
    position: absolute;
    width: 3000px;
    height: 3000px;
    top: 0;
    left: 0;
}

/* ==================== HEX ELEMENTS ==================== */
.hex {
    width: 200px;
    height: 173.2px;
    clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-size: 16px;
    font-weight: bold;
    user-select: none;
    box-sizing: border-box;
    transition: transform 0.15s ease, filter 0.15s ease;
}

.board-hex {
    position: absolute;
    z-index: 10;
    cursor: pointer;
}

.board-hex:hover {
    filter: brightness(1.15);
    z-index: 25;
}

.board-hex.selected {
    box-shadow: 0 0 16px #e2b04a;
    transform: scale(1.06);
    z-index: 30;
}

.board-hex.path-valid-step {
    animation: pulse-hex 1s infinite alternate;
    cursor: pointer;
    z-index: 35;
}

@keyframes pulse-hex {
    0% { filter: drop-shadow(0 0 4px #4ade80); }
    100% { filter: drop-shadow(0 0 12px #22c55e); }
}

.board-hex.path-chosen {
    filter: drop-shadow(0 0 10px #e2b04a) brightness(1.2);
}

.pool-hex {
    position: relative;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0,0,0,0.5);
    width: 160px;
    height: 138.56px;
    font-size: 14px;
}

.pool-hex:hover {
    transform: scale(1.08);
}

.pool-hex.selected {
    transform: scale(1.12);
    box-shadow: 0 0 12px var(--accent-gold);
}

/* Hex Color Palettes */
.hex.blue      { background: radial-gradient(circle, #2563eb, #1e3a8a); color: #fff; }
.hex.green     { background: radial-gradient(circle, #16a34a, #14532d); color: #fff; }
.hex.red       { background: radial-gradient(circle, #dc2626, #7f1d1d); color: #fff; }
.hex.grey      { background: radial-gradient(circle, #6b7280, #374151); color: #fff; }
.hex.purple    { background: radial-gradient(circle, #9333ea, #581c87); color: #fff; }
.hex.yellow    { background: radial-gradient(circle, #eab308, #854d0e); color: #111; }

.hex.start-tile {
    background: #ffffff !important;
    color: #0f172a !important;
    filter: drop-shadow(0 0 1px #f59e0b) drop-shadow(0 0 2px #f59e0b) drop-shadow(0 0 3px #f59e0b);
}

.hex.is-mission-side {
    background: #ffffff !important;
    color: #0f172a !important;
    position: absolute;
}

/* Hexagonal inner cutout to create continuous hexagonal solid border with base color */
.hex.is-mission-side::before {
    content: '';
    position: absolute;
    inset: 5px;
    background: #ffffff;
    clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
    z-index: 1;
    pointer-events: none;
}

.hex.is-mission-side.pool-hex::before {
    inset: 4px;
}

.hex.is-mission-side .hex-inner-content {
    z-index: 2;
}

/* Colored accent borders for mission side corresponding to base tile color */
.hex.is-mission-side.blue   { background: #2563eb !important; }
.hex.is-mission-side.green  { background: #16a34a !important; }
.hex.is-mission-side.red    { background: #dc2626 !important; }
.hex.is-mission-side.grey   { background: #64748b !important; }
.hex.is-mission-side.purple { background: #9333ea !important; }
.hex.is-mission-side.yellow { background: #d97706 !important; }

.hex.start-tile.is-mission-side {
    background: #f59e0b !important;
}

.hex.start-tile.is-mission-side::before {
    background: #ffffff;
}

.hex.placeholder {
    background: rgba(45, 180, 110, 0.12);
    color: #4ade80;
    cursor: pointer;
    font-size: 40px;
    z-index: 8;
}

.hex.placeholder:hover {
    background: rgba(45, 180, 110, 0.35);
    border-color: #4ade80;
    transform: scale(1.05);
}

/* Inner Hex Content Elements */
.hex-inner-content {
    position: relative;
    width: 100%;
    height: 100%;
    pointer-events: none;
    text-align: center;
}

.cb-symbol {
    position: absolute;
    top: 18%;
    left: 50%;
    transform: translateX(-50%);
    font-size: 22px;
    line-height: 1;
}

.mission-label-text {
    position: absolute;
    top: 18%;
    left: 50%;
    transform: translateX(-50%);
    font-size: 13px;
    letter-spacing: 0.8px;
    font-weight: 800;
    color: #475569;
}

.mission-path-preview {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    gap: 5px;
    align-items: center;
    justify-content: center;
}

.mission-path-preview.start-path-preview {
    gap: 1px;
}

.mission-path-preview.start-path-preview .path-preview-dot {
    width: 24px;
    height: 24px;
}

.path-preview-dot {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.9);
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.path-preview-dot.blue   { background: var(--color-blue); }
.path-preview-dot.green  { background: var(--color-green); }
.path-preview-dot.red    { background: var(--color-red); }
.path-preview-dot.grey   { background: var(--color-grey); }
.path-preview-dot.purple { background: var(--color-purple); }
.path-preview-dot.yellow { background: var(--color-yellow); }
.path-preview-dot.light { background: #ccc; }

.tile-pts-tag {
    position: absolute;
    top: 65%;
    left: 50%;
    transform: translateX(-50%);
    font-size: 16px;
    font-weight: 900;
    background: rgba(0, 0, 0, 0.65);
    padding: 2px 10px;
    border-radius: 6px;
    color: #fff;
    white-space: nowrap;
}

.hex.is-mission-side .tile-pts-tag {
    background: #0f172a;
    color: #f8fafc;
    border: 1px solid #334155;
}

.hex.start-tile .tile-pts-tag {
    background: #fef3c7 !important;
    color: #78350f !important;
    border: 1.5px solid #d97706 !important;
    font-size: 25px !important;
    font-weight: 900 !important;
}

/* Animal Pawn Representation */
.animal-pawn {
    position: absolute;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: #facc15;
    border: 2px solid #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 25px;
    top: 25%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 40;
}

.animal-pawn.pawn-blue   { background: #3b82f6; }
.animal-pawn.pawn-green  { background: #10b981; }
.animal-pawn.pawn-yellow { background: #f59e0b; }
.animal-pawn.pawn-red    { background: #ef4444; }

/* Mission Execution Bar */
.floating-panel {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(24, 35, 28, 0.95);
    border: 2px solid var(--accent-gold);
    border-radius: 12px;
    padding: 12px 20px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    gap: 24px;
    z-index: 60;
    backdrop-filter: blur(8px);
}

.floating-panel.hidden {
    display: none;
}

.mission-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.mission-badge {
    font-size: 13px;
    font-weight: 800;
    color: var(--accent-gold);
}

.color-sequence {
    display: flex;
    align-items: center;
    gap: 6px;
}

.seq-item {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: bold;
    color: #fff;
    transition: transform 0.2s, box-shadow 0.2s;
}

.seq-item.step-done {
    box-shadow: 0 0 10px #4ade80, 0 0 0 2px #4ade80;
    transform: scale(1.18);
}

.seq-arrow {
    color: #94a3b8;
    font-size: 12px;
}

.mission-guide {
    font-size: 11px;
    color: var(--text-muted);
}

.mission-buttons {
    display: flex;
    gap: 8px;
}

/* ==================== RIGHT PLAYER SIDEBAR ==================== */
.player-identity {
    display: flex;
    align-items: center;
    gap: 12px;
}

.avatar-icon {
    font-size: 32px;
    background: #141c17;
    border: 1px solid var(--panel-border);
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#player-score-badge {
    font-size: 13px;
    color: var(--text-muted);
}

#player-score-badge strong {
    color: var(--accent-gold);
    font-size: 16px;
}

.pawns-summary {
    display: flex;
    gap: 10px;
    margin-top: 6px;
}

.pawn-box {
    flex: 1;
    background: #141c17;
    border: 1px solid var(--panel-border);
    border-radius: 6px;
    padding: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pawn-icon {
    font-size: 20px;
}

.pawn-info {
    display: flex;
    flex-direction: column;
    font-size: 11px;
}

.pawn-info span:last-child {
    font-size: 14px;
    font-weight: 800;
    color: var(--text-main);
}

.completed-missions-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 120px;
}

.completed-missions-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    max-height: 140px;
    overflow-y: auto;
    background: #141c17;
    padding: 8px;
    border-radius: 6px;
    border: 1px solid var(--panel-border);
    margin-top: 6px;
}

.completed-mission-card {
    background: #25332a;
    border: 1px solid var(--panel-border);
    border-radius: 4px;
    padding: 4px 6px;
    font-size: 11px;
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
}

.completed-mission-card.flipped {
    opacity: 0.5;
    text-decoration: line-through;
    border-color: #dc2626;
    background: #291a1a;
}

.combo-info-box {
    font-size: 12px;
    color: var(--accent-gold);
    margin-top: 6px;
}

.player-bonus-box {
    margin-top: 8px;
    background: #141c17;
    border: 1px solid var(--panel-border);
    border-radius: 6px;
    padding: 6px 8px;
    font-size: 11px;
}

.player-bonus-box.hidden {
    display: none;
}

.player-bonus-box .bonus-label {
    color: var(--text-muted);
    font-size: 11px;
}

.player-bonus-list {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 4px;
    font-weight: 800;
}

.player-bonus-pill {
    background: #d97706;
    color: #fff;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.4);
}

.bottom-controls {
    margin-top: auto;
}

.log-section {
    max-height: 140px;
}

.event-log-container {
    background: #121814;
    border: 1px solid var(--panel-border);
    border-radius: 6px;
    padding: 6px 8px;
    height: 100px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 11px;
    color: #cbd5e1;
    margin-top: 6px;
}

.log-entry {
    line-height: 1.3;
}

.log-entry.system { color: #94a3b8; }
.log-entry.action { color: #6ee7b7; }
.log-entry.mission { color: #fde047; font-weight: bold; }
.log-entry.bonus { color: #f472b6; font-weight: bold; }

/* ==================== MODALS ==================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.modal-overlay.hidden {
    display: none;
}

.modal-card {
    background: #18231c;
    border: 2px solid var(--accent-gold);
    border-radius: 12px;
    padding: 24px;
    width: 90%;
    max-width: 520px;
    box-shadow: 0 12px 32px rgba(0,0,0,0.8);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.modal-card.wide {
    max-width: 760px;
    max-height: 85vh;
}

.modal-title {
    font-family: 'Cinzel', serif;
    font-size: 22px;
    color: var(--accent-gold);
    border-bottom: 1px solid var(--panel-border);
    padding-bottom: 8px;
}

.modal-subtitle {
    font-size: 13px;
    color: var(--text-muted);
}

.mode-cards {
    display: flex;
    gap: 12px;
}

.mode-card {
    flex: 1;
    background: #141c17;
    border: 2px solid var(--panel-border);
    border-radius: 8px;
    padding: 14px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: all 0.2s;
}

.mode-card:hover {
    border-color: #4b6654;
}

.mode-card.selected {
    border-color: var(--accent-gold);
    background: rgba(226, 176, 74, 0.1);
}

.mode-icon {
    font-size: 28px;
}

.mode-card h3 {
    font-size: 15px;
    color: var(--text-main);
}

.mode-card p {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.4;
}

select {
    width: 100%;
    background: #1e2a22;
    color: var(--text-main);
    border: 1px solid var(--panel-border);
    padding: 6px 8px;
    border-radius: 4px;
    font-family: inherit;
    font-size: 12px;
    margin-top: 4px;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 8px;
}

.btn {
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 800;
    font-size: 13px;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

.btn.primary {
    background: var(--accent-gold);
    color: #121915;
}

.btn.primary:hover {
    background: #eed074;
}

.btn.secondary {
    background: #25332a;
    color: var(--text-main);
    border: 1px solid var(--panel-border);
}

/* Rules tabs */
.rules-tabs {
    display: flex;
    border-bottom: 1px solid var(--panel-border);
    gap: 4px;
}

.tab-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 8px 12px;
    font-weight: 700;
    font-size: 12px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
}

.tab-btn.active {
    color: var(--accent-gold);
    border-bottom-color: var(--accent-gold);
}

.rules-content {
    max-height: 380px;
    overflow-y: auto;
    font-size: 13px;
    line-height: 1.6;
    color: #e2e8f0;
    padding-right: 8px;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

.tab-pane h3 {
    color: var(--accent-gold);
    margin: 12px 0 6px 0;
    font-size: 15px;
}

.tab-pane ul, .tab-pane ol {
    margin-left: 20px;
    margin-bottom: 10px;
}

.color-badge {
    padding: 1px 6px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 11px;
}

.color-badge.blue   { background: var(--color-blue); }
.color-badge.green  { background: var(--color-green); }
.color-badge.red    { background: var(--color-red); }
.color-badge.grey   { background: var(--color-grey); }
.color-badge.purple { background: var(--color-purple); }
.color-badge.yellow { background: var(--color-yellow); color: #000; }

