/* ==========================================================================
   GO • 囲碁 (Weiqi / Baduk) — Čisté CSS bez frameworkov a bez Tailwindu
   Estetika: Tradičné japonské drevo Kaya, bridlica Nachiuro a mušľa Hamaguri
   ========================================================================== */

:root {
    /* Tmavá téma (Zen pracovňa) */
    --bg-primary: #121519;
    --bg-secondary: #1b2027;
    --bg-elevated: #232a34;
    --bg-hover: #2c3542;
    --border-subtle: rgba(255, 255, 255, 0.09);
    --border-highlight: rgba(218, 170, 95, 0.45);

    --text-primary: #f3efe6;
    --text-secondary: #b5b0a4;
    --text-muted: #7f7b72;

    --accent-gold: #d9a452;
    --accent-gold-hover: #e5b567;
    --accent-gold-soft: rgba(217, 164, 82, 0.16);

    --accent-jade: #38b27b;
    --accent-danger: #e05252;
    --accent-warning: #f0983e;

    --goban-wood-base: #d8a657;
    --goban-border: #8a5b24;
    --shadow-lg: 0 18px 42px rgba(0, 0, 0, 0.55);
    --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.25);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
}

body.theme-light {
    /* Svetlá téma (Tatami miestnosť) */
    --bg-primary: #f2ece1;
    --bg-secondary: #fbf8f3;
    --bg-elevated: #eee6d8;
    --bg-hover: #e3d9c6;
    --border-subtle: rgba(65, 48, 24, 0.13);
    --border-highlight: rgba(168, 112, 34, 0.55);

    --text-primary: #231e17;
    --text-secondary: #5a5043;
    --text-muted: #877b6b;

    --accent-gold: #b57924;
    --accent-gold-hover: #996419;
    --accent-gold-soft: rgba(181, 121, 36, 0.14);

    --shadow-lg: 0 16px 36px rgba(60, 42, 18, 0.18);
    --shadow-sm: 0 4px 12px rgba(60, 42, 18, 0.08);
}

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

html, body {
    min-height: 100%;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.45;
    -webkit-font-smoothing: antialiased;
    transition: background-color 0.25s ease, color 0.25s ease;
}

.hidden {
    display: none !important;
}

/* ==========================================================================
   Rozloženie stránky
   ========================================================================== */

.app-shell {
    max-width: 1540px;
    margin: 0 auto;
    padding: 14px 20px 28px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Horná lišta */
.top-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 12px 18px;
    box-shadow: var(--shadow-sm);
}

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

.brand-logo {
    position: relative;
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, #dfb165, #b88135);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.35), 0 3px 8px rgba(0, 0, 0, 0.3);
}

.logo-stone {
    position: absolute;
    width: 18px;
    height: 18px;
    border-radius: 50%;
}

.logo-stone.black {
    top: 6px;
    left: 6px;
    background: radial-gradient(circle at 35% 30%, #555, #111 75%);
    box-shadow: 1px 2px 4px rgba(0, 0, 0, 0.55);
}

.logo-stone.white {
    bottom: 5px;
    right: 5px;
    background: radial-gradient(circle at 35% 30%, #fff, #dcd8cf 80%);
    box-shadow: 1px 2px 4px rgba(0, 0, 0, 0.45);
}

.brand-text h1 {
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    display: flex;
    align-items: center;
    gap: 8px;
}

.brand-text .kanji {
    font-weight: 500;
    color: var(--accent-gold);
    font-size: 1.1rem;
}

.brand-text .subtitle {
    font-size: 0.78rem;
    color: var(--text-secondary);
}

.header-badges {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.badge {
    font-size: 0.78rem;
    font-weight: 600;
    padding: 5px 11px;
    border-radius: 999px;
    background: var(--bg-elevated);
    color: var(--text-secondary);
    border: 1px solid var(--border-subtle);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Trojstĺpcová mriežka */
.main-grid {
    display: grid;
    grid-template-columns: 330px minmax(420px, 1fr) 350px;
    gap: 18px;
    align-items: start;
}

.side-panel {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.panel-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 15px 16px;
    box-shadow: var(--shadow-sm);
}

.card-section-title {
    font-size: 0.88rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    margin-bottom: 12px;
    font-weight: 700;
}

/* ==========================================================================
   Karty hráčov (Čierny & Biely)
   ========================================================================== */

.player-card {
    background: var(--bg-secondary);
    border: 1.5px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    box-shadow: var(--shadow-sm);
    transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.player-card.active {
    border-color: var(--accent-gold);
    box-shadow: 0 0 0 2px var(--accent-gold-soft), var(--shadow-sm);
}

.player-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.stone-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    flex-shrink: 0;
}

.stone-avatar.black-stone {
    background: radial-gradient(circle at 32% 28%, #5b6068, #141619 72%);
    box-shadow: 0 3px 7px rgba(0, 0, 0, 0.5), inset 0 1px 2px rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.14);
}

.stone-avatar.white-stone {
    background: radial-gradient(circle at 32% 28%, #ffffff, #dad5c9 78%, #bfb8a8 100%);
    box-shadow: 0 3px 7px rgba(0, 0, 0, 0.35), inset 0 -1px 3px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(0, 0, 0, 0.15);
}

.player-identity {
    flex: 1;
    min-width: 0;
}

.player-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.player-title-row h2 {
    font-size: 1rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.turn-pill {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--accent-gold);
    color: #16130d;
}

.player-role {
    display: block;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 1px;
}

.player-clock {
    font-family: "SF Mono", "Menlo", "Consolas", monospace;
    font-size: 0.95rem;
    font-weight: 700;
    padding: 4px 9px;
    border-radius: var(--radius-sm);
    background: var(--bg-elevated);
    color: var(--text-primary);
    border: 1px solid var(--border-subtle);
}

.player-clock.low-time {
    color: var(--accent-danger);
    border-color: var(--accent-danger);
    animation: pulse-opacity 1s infinite;
}

.player-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.stat-box {
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 7px 8px;
    text-align: center;
}

.stat-box.highlight {
    border-color: var(--border-highlight);
    background: var(--accent-gold-soft);
}

.stat-label {
    display: block;
    font-size: 0.68rem;
    color: var(--text-secondary);
    margin-bottom: 2px;
}

.stat-value {
    font-size: 1rem;
    font-weight: 800;
}

.atari-warning {
    margin-top: 10px;
    padding: 7px 10px;
    border-radius: var(--radius-sm);
    background: rgba(224, 82, 82, 0.16);
    border: 1px solid rgba(224, 82, 82, 0.45);
    color: #ff9c9c;
    font-size: 0.76rem;
}

body.theme-light .atari-warning {
    color: #a61e1e;
}

/* ==========================================================================
   Pomer síl a komentár AI
   ========================================================================== */

.balance-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 7px;
}

.balance-lead {
    color: var(--accent-gold);
    font-weight: 700;
}

.balance-bar-track {
    width: 100%;
    height: 11px;
    background: #e8e3d8;
    border-radius: 999px;
    overflow: hidden;
    border: 1px solid var(--border-subtle);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3);
    margin-bottom: 11px;
}

.balance-bar-black {
    height: 100%;
    background: linear-gradient(90deg, #181a1e, #3b4049);
    transition: width 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.ai-insight {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    background: var(--bg-elevated);
    border-radius: var(--radius-sm);
    padding: 9px 11px;
    font-size: 0.79rem;
    color: var(--text-secondary);
    border-left: 3px solid var(--accent-gold);
}

.insight-icon {
    font-size: 1rem;
    line-height: 1.2;
}

/* ==========================================================================
   Stredný panel: Doska Goban
   ========================================================================== */

.board-stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.board-status-bar {
    width: 100%;
    max-width: 760px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 10px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    box-shadow: var(--shadow-sm);
}

.status-main {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.92rem;
    font-weight: 600;
}

.status-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    flex-shrink: 0;
}

.status-dot.black {
    background: #1a1c20;
    border: 2px solid #777;
}

.status-dot.white {
    background: #f5f2eb;
    border: 2px solid #999;
}

.ai-thinking-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    color: var(--accent-gold);
    font-weight: 600;
}

.spinner {
    width: 15px;
    height: 15px;
    border: 2.5px solid var(--accent-gold-soft);
    border-top-color: var(--accent-gold);
    border-radius: 50%;
    animation: spin 0.75s linear infinite;
}

.goban-wrapper {
    position: relative;
    width: 100%;
    max-width: 760px;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-lg);
    padding: 6px;
    background: linear-gradient(145deg, #5e3e19, #3b240c);
    box-shadow: var(--shadow-lg), inset 0 1px 2px rgba(255, 255, 255, 0.25);
}

#goban-canvas {
    width: 100%;
    height: 100%;
    border-radius: 11px;
    cursor: pointer;
    display: block;
    touch-action: manipulation;
}

.board-toast {
    position: absolute;
    bottom: 22px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(20, 23, 28, 0.94);
    color: #fff;
    padding: 10px 18px;
    border-radius: 999px;
    font-size: 0.86rem;
    font-weight: 600;
    border: 1px solid var(--accent-gold);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    pointer-events: none;
    z-index: 10;
    white-space: nowrap;
    max-width: 92%;
    overflow: hidden;
    text-overflow: ellipsis;
}

.board-toast.error {
    border-color: var(--accent-danger);
    background: rgba(58, 16, 16, 0.95);
    color: #ffd4d4;
}

.board-footer-bar {
    width: 100%;
    max-width: 760px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 9px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 0.8rem;
}

.cursor-info {
    color: var(--text-secondary);
    min-width: 165px;
}

.overlay-toggles {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.toggle-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 999px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    cursor: pointer;
    user-select: none;
    font-size: 0.76rem;
    font-weight: 600;
    color: var(--text-secondary);
    transition: all 0.15s ease;
}

.toggle-chip:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.toggle-chip input {
    accent-color: var(--accent-gold);
    cursor: pointer;
}

/* ==========================================================================
   Tlačidlá a ovládacie prvky
   ========================================================================== */

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
    color: inherit;
}

button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.icon-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    border-radius: var(--radius-sm);
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    font-size: 0.82rem;
    font-weight: 600;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.icon-btn:hover {
    background: var(--bg-hover);
    border-color: var(--border-highlight);
}

.primary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--accent-gold), #c28832);
    color: #16120b;
    font-weight: 700;
    font-size: 0.88rem;
    box-shadow: 0 3px 10px rgba(217, 164, 82, 0.25);
    transition: filter 0.15s ease, transform 0.1s ease;
}

.primary-btn:hover:not(:disabled) {
    filter: brightness(1.08);
}

.primary-btn:active:not(:disabled) {
    transform: translateY(1px);
}

.primary-btn.small {
    padding: 7px 13px;
    font-size: 0.82rem;
}

.secondary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 15px;
    border-radius: var(--radius-sm);
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.86rem;
    transition: background 0.15s ease;
}

.secondary-btn:hover:not(:disabled) {
    background: var(--bg-hover);
}

.full-width {
    width: 100%;
}

.action-buttons-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 9px;
}

.control-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 11px;
    border-radius: var(--radius-sm);
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    text-align: left;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}

.control-btn:hover:not(:disabled) {
    background: var(--bg-hover);
    border-color: var(--border-highlight);
}

.control-btn:active:not(:disabled) {
    transform: translateY(1px);
}

.control-btn.accent {
    border-color: rgba(217, 164, 82, 0.4);
    background: var(--accent-gold-soft);
}

.control-btn.danger:hover:not(:disabled) {
    border-color: var(--accent-danger);
    background: rgba(224, 82, 82, 0.14);
}

.btn-icon {
    font-size: 1.2rem;
}

.btn-content strong {
    display: block;
    font-size: 0.84rem;
}

.btn-content small {
    display: block;
    font-size: 0.7rem;
    color: var(--text-secondary);
}

/* Fáza bodovania */
.scoring-phase-box {
    border: 2px solid var(--accent-gold);
    background: var(--accent-gold-soft);
}

.scoring-phase-box h3 {
    font-size: 0.96rem;
    margin-bottom: 6px;
}

.scoring-phase-box p {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.scoring-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* ==========================================================================
   Pravý panel: Formulár nastavení a história ťahov
   ========================================================================== */

.form-group {
    margin-bottom: 12px;
}

.form-label {
    display: block;
    font-size: 0.76rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 5px;
}

.form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.segmented-control {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    gap: 5px;
    background: var(--bg-elevated);
    padding: 4px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-subtle);
}

.seg-btn {
    padding: 7px 6px;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-align: center;
    transition: all 0.15s ease;
}

.seg-btn small {
    display: block;
    font-size: 0.66rem;
    font-weight: 400;
    opacity: 0.85;
}

.seg-btn:hover {
    color: var(--text-primary);
}

.seg-btn.active {
    background: var(--bg-secondary);
    color: var(--accent-gold);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border-highlight);
}

.difficulty-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 7px;
}

.diff-btn {
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    text-align: left;
    transition: all 0.15s ease;
}

.diff-btn strong {
    display: block;
    font-size: 0.8rem;
    margin-bottom: 2px;
}

.diff-btn span {
    display: block;
    font-size: 0.68rem;
    color: var(--text-secondary);
}

.diff-btn:hover {
    background: var(--bg-hover);
}

.diff-btn.active {
    border-color: var(--accent-gold);
    background: var(--accent-gold-soft);
}

.custom-select {
    width: 100%;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    background: var(--bg-elevated);
    color: var(--text-primary);
    border: 1px solid var(--border-subtle);
    font-size: 0.8rem;
    font-family: inherit;
    outline: none;
}

.custom-select:focus {
    border-color: var(--accent-gold);
}

.start-game-btn {
    margin-top: 4px;
}

/* História ťahov */
.history-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.history-header .card-section-title {
    margin-bottom: 0;
}

.text-btn {
    font-size: 0.76rem;
    font-weight: 600;
    color: var(--accent-gold);
    padding: 4px 8px;
    border-radius: 6px;
    background: var(--accent-gold-soft);
}

.text-btn:hover {
    filter: brightness(1.12);
}

.move-history-list {
    max-height: 235px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding-right: 4px;
}

.empty-history {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: center;
    padding: 20px 0;
}

.history-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 10px;
    border-radius: 6px;
    background: var(--bg-elevated);
    font-size: 0.79rem;
    border: 1px solid transparent;
}

.history-item:last-child {
    border-color: var(--border-highlight);
    background: var(--accent-gold-soft);
}

.history-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.move-num {
    font-family: monospace;
    color: var(--text-muted);
    min-width: 28px;
}

.mini-stone {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    display: inline-block;
}

.mini-stone.black {
    background: #181a1f;
    border: 1px solid #666;
}

.mini-stone.white {
    background: #f3efe6;
    border: 1px solid #999;
}

.capture-tag {
    font-size: 0.7rem;
    color: var(--accent-gold);
    font-weight: 600;
}

/* ==========================================================================
   Modálne okná
   ========================================================================== */

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(8, 10, 14, 0.76);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 100;
}

.modal-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-highlight);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 540px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    animation: modal-pop 0.2s ease-out;
}

.modal-card.rules-card {
    max-width: 680px;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-subtle);
}

.modal-header h2 {
    font-size: 1.15rem;
}

.modal-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-elevated);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-body {
    padding: 20px;
    max-height: 72vh;
    overflow-y: auto;
}

.modal-footer {
    padding: 14px 20px;
    border-top: 1px solid var(--border-subtle);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    background: var(--bg-elevated);
}

.winner-banner {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    border-radius: var(--radius-md);
    background: var(--accent-gold-soft);
    border: 1px solid var(--border-highlight);
    margin-bottom: 18px;
}

.winner-stone {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    flex-shrink: 0;
}

.winner-stone.black {
    background: radial-gradient(circle at 32% 28%, #5b6068, #141619 72%);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

.winner-stone.white {
    background: radial-gradient(circle at 32% 28%, #ffffff, #dad5c9 78%);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35);
}

.winner-banner h3 {
    font-size: 1.25rem;
    margin-bottom: 2px;
}

.winner-banner p {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.score-breakdown-table table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.score-breakdown-table th,
.score-breakdown-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-subtle);
}

.score-breakdown-table th:not(:first-child),
.score-breakdown-table td:not(:first-child) {
    text-align: center;
}

.score-breakdown-table .total-row {
    background: var(--bg-elevated);
    font-size: 0.96rem;
}

.rules-content {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.rule-block {
    background: var(--bg-elevated);
    padding: 13px 15px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-subtle);
}

.rule-block h3 {
    font-size: 0.95rem;
    color: var(--accent-gold);
    margin-bottom: 6px;
}

.rule-block p,
.rule-block li {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.rule-block ul {
    margin-top: 6px;
    padding-left: 18px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* ==========================================================================
   Animácie & Responzívnosť
   ========================================================================== */

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes pulse-opacity {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.55; }
}

@keyframes modal-pop {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

@media (max-width: 1240px) {
    .main-grid {
        grid-template-columns: 310px 1fr;
    }
    .right-panel {
        grid-column: 1 / -1;
        display: grid;
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 880px) {
    .main-grid {
        grid-template-columns: 1fr;
    }
    .board-stage {
        order: -1;
    }
    .right-panel {
        grid-template-columns: 1fr;
    }
    .header-badges {
        display: none;
    }
    .btn-label {
        display: none;
    }
}
