/*
Theme Name: LiteChess
Theme URI: https://litechess.ru
Author: LiteChess
Description: Минималистичная тема для онлайн-шахмат с упором на скорость и SEO.
Version: 2.1.18
Text Domain: litechess
*/

*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: #f5f8ff;
    color: #111827;
    line-height: 1.6;
}

a {
    color: #60a5fa;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.lc-container {
    width: 100%;
    max-width: 1200px;
    padding: 0 20px;
    margin: 0 auto;
}

.lc-header .lc-container {
    padding-left: 24px !important;
    padding-right: 24px !important;
}

.lc-header {
    background: #ffffff;
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.lc-logo {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.lc-logo-mark {
    width: 32px;
    height: 32px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 2px;
}

.lc-logo-square {
    border-radius: 4px;
}

.lc-logo-square--light {
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.08);
}

.lc-logo-square--dark {
    background: #111827;
}

.lc-logo-text {
    font-weight: 600;
    font-size: 18px;
    color: #0f172a;
}

.lc-nav {
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
}

.lc-nav a {
    font-size: 14px;
    color: #4b5563;
    padding: 6px 10px;
    border-radius: 999px;
    transition: background 0.15s ease, color 0.15s ease;
    text-decoration: none;
}

.lc-nav a:hover,
.lc-nav a:focus {
    background: rgba(96, 165, 250, 0.08);
    color: #60a5fa;
}

.lc-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    border-radius: 999px;
    border: none;
    background: #60a5fa;
    color: #ffffff !important;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none !important;
    transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
    box-shadow: 0 8px 20px rgba(96, 165, 250, 0.22);
    white-space: nowrap;
}

.lc-btn-primary:hover {
    background: #3b82f6;
    transform: translateY(-1px);
    box-shadow: 0 12px 30px rgba(96, 165, 250, 0.3);
}

.lc-btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 6px 16px rgba(96, 165, 250, 0.25);
}

.lc-game-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
}

.lc-game-actions .lc-btn-primary,
.lc-game-actions .lc-btn-secondary {
    width: 100%;
    min-height: 48px;
    padding: 12px 18px;
    border-radius: 999px;
}

.lc-btn-danger {
    background: #dc2626 !important;
    box-shadow: 0 8px 20px rgba(220, 38, 38, 0.18);
}

.lc-btn-danger:hover {
    background: #b91c1c !important;
    box-shadow: 0 12px 30px rgba(220, 38, 38, 0.24);
}

.lc-main {
    min-height: 60vh;
}

.lc-hero {
    padding: 40px 0 32px;
}

.lc-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: 32px;
    align-items: center;
}

.lc-hero-left {
    text-align: center;
}

.lc-hero-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 12px;
    color: #0f172a;
}

.lc-hero-text {
    font-size: 15px;
    color: #4b5563;
    max-width: 480px;
    margin: 0 auto 20px;
}

.lc-hero-text p {
    margin: 0 0 8px;
}

.lc-hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 13px;
    color: #6b7280;
}

.lc-hero-left .lc-hero-meta {
    justify-content: center;
    text-align: center;
}

.lc-board-card {
    background: #ffffff;
    border-radius: 24px;
    padding: 16px;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
}

.lc-chess-board {
    width: 100%;
    max-width: 440px;
    margin: 0 auto;
    aspect-ratio: 1 / 1;
    border-radius: 22px;
    overflow: hidden;
    position: relative;
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    grid-template-rows: repeat(8, 1fr);
    background: #1f2937;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12), 0 4px 12px rgba(15, 23, 42, 0.2);
}

.lc-chess-board--ready .lc-board-fallback {
    display: none;
}

.lc-board-fallback {
    grid-column: 1 / -1;
    grid-row: 1 / -1;
    display: grid;
    place-items: center;
    font-size: 14px;
    color: #e5e7eb;
    text-align: center;
}

.lc-square {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
    outline: none;
    background: none;
}

.lc-square--light {
    background: #e5e7eb;
}

.lc-square--dark {
    background: #60a5fa;
}

.lc-square--selected {
    box-shadow: inset 0 0 0 3px rgba(96, 165, 250, 0.9);
}

.lc-piece {
    width: 80%;
    height: 80%;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 80%;
}

.lc-piece--white.lc-piece--pawn   { background-image: url('assets/img/chess/wP.svg'); }
.lc-piece--white.lc-piece--knight { background-image: url('assets/img/chess/wN.svg'); }
.lc-piece--white.lc-piece--bishop { background-image: url('assets/img/chess/wB.svg'); }
.lc-piece--white.lc-piece--rook   { background-image: url('assets/img/chess/wR.svg'); }
.lc-piece--white.lc-piece--queen  { background-image: url('assets/img/chess/wQ.svg'); }
.lc-piece--white.lc-piece--king   { background-image: url('assets/img/chess/wK.svg'); }

.lc-piece--black.lc-piece--pawn   { background-image: url('assets/img/chess/bP.svg'); }
.lc-piece--black.lc-piece--knight { background-image: url('assets/img/chess/bN.svg'); }
.lc-piece--black.lc-piece--bishop { background-image: url('assets/img/chess/bB.svg'); }
.lc-piece--black.lc-piece--rook   { background-image: url('assets/img/chess/bR.svg'); }
.lc-piece--black.lc-piece--queen  { background-image: url('assets/img/chess/bQ.svg'); }
.lc-piece--black.lc-piece--king   { background-image: url('assets/img/chess/bK.svg'); }

.lc-square-file,
.lc-square-rank {
    position: absolute;
    font-size: 9px;
    color: rgba(31, 41, 55, 0.7);
    pointer-events: none;
}

.lc-square-file {
    bottom: 2px;
    right: 4px;
}

.lc-square-rank {
    top: 2px;
    left: 4px;
}

.lc-page {
    padding: 32px 0 40px;
}

.lc-page-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 18px;
    color: #0f172a;
    text-align: center;
}

.lc-page-content {
    font-size: 15px;
    color: #374151;
}

.lc-play-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: 24px;
    align-items: flex-start;
}

.lc-play-panel {
    background: #ffffff;
    border-radius: 24px;
    padding: 20px;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
}

.lc-field {
    margin-bottom: 12px;
}

.lc-field-label {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #111827;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.lc-radio-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.lc-radio {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #374151;
    padding: 4px 0;
}

.lc-radio input[type="radio"] {
    accent-color: #60a5fa;
}

.lc-radio input[type="radio"]:checked + span {
    color: #60a5fa;
    font-weight: 600;
}

.lc-input-range {
    width: 100%;
    accent-color: #60a5fa;
}

.lc-input-range:hover {
    accent-color: #3b82f6;
}

.lc-range-value {
    font-size: 12px;
    color: #6b7280;
    margin-top: 6px;
    text-align: center;
}

.lc-range-value span {
    color: #60a5fa;
    font-weight: 600;
}

.lc-status {
    font-size: 14px;
    margin-top: 12px;
    color: #4b5563;
}

.lc-status--ok {
    color: #059669;
}

.lc-status--ready {
    color: #1e3a8a;
}

.lc-status--error {
    color: #b91c1c;
}

.lc-stats-card {
    margin-top: 20px;
    padding: 16px;
    border-radius: 20px;
    background: #f9fafb;
    border: 1px solid rgba(148, 163, 184, 0.6);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

.lc-stats-title {
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 10px;
}

.lc-stats-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.lc-stat {
    padding: 10px 12px;
    border-radius: 14px;
    background: #ffffff;
    border: 1px solid rgba(148, 163, 184, 0.5);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
}

.lc-stat-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #6b7280;
    margin-bottom: 4px;
}

.lc-stat-value {
    font-size: 20px;
    font-weight: 700;
    color: #111827;
}

.lc-stat-sub {
    margin-top: 4px;
    font-size: 12px;
    color: #6b7280;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.lc-stats-footer {
    margin-top: 8px;
    font-size: 11px;
    color: #9ca3af;
}

.lc-footer {
    border-top: 1px solid rgba(15, 23, 42, 0.06);
    padding: 20px 0 24px;
    font-size: 13px;
    color: #6b7280;
    background: #ffffff;
}

.lc-footer-inner {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    justify-content: space-between;
    align-items: center;
}

.lc-footer-right {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
}

.lc-footer-online {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #6b7280;
    white-space: nowrap;
}

.lc-footer-online-count {
    min-width: 26px;
    height: 26px;
    padding: 0 8px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    border: 1px solid rgba(148, 163, 184, 0.55);
    color: #0f172a;
    font-weight: 700;
    line-height: 1;
}

.lc-footer-links {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.lc-footer a {
    color: #60a5fa !important;
    text-decoration: none;
    font-weight: 500;
}

.lc-footer a:hover {
    color: #3b82f6 !important;
    text-decoration: underline;
}

@media (max-width: 900px) {
    .lc-hero-grid {
        grid-template-columns: 1fr;
    }

    .lc-play-layout {
        grid-template-columns: 1fr;
    }

    .lc-header-inner {
        flex-wrap: wrap;
        gap: 10px;
    }

    .lc-chess-board {
        max-width: 400px;
    }
}

@media (max-width: 600px) {
    .lc-container {
        padding-left: 18px;
        padding-right: 18px;
    }

    .lc-header .lc-container {
        padding-left: 22px !important;
        padding-right: 22px !important;
    }

    .lc-header-inner {
        padding: 10px 0;
    }

    .lc-logo-mark {
        width: 28px;
        height: 28px;
    }

    .lc-logo-text {
        font-size: 16px;
    }

    .lc-btn-primary {
        padding: 8px 16px;
        font-size: 13px;
        box-shadow: 0 6px 16px rgba(96, 165, 250, 0.24);
    }

    .lc-chess-board {
        max-width: 360px;
    }

    .lc-piece {
        width: 86%;
        height: 86%;
        background-size: 86%;
    }
}

@media (min-width: 900px) {
    .lc-stats-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.lc-main {
    flex-grow: 1;
}

.lc-footer {
    border-top: 1px solid rgba(15, 23, 42, 0.06);
    padding: 20px 0 24px;
    font-size: 13px;
    color: #6b7280;
    background: #ffffff;
    margin-top: auto;
}

.lc-status--warning {
    color: #f59e0b !important;
    font-weight: 500;
}

#lc-restart-game {
    margin-top: 10px !important;
    padding: 8px 16px !important;
    font-size: 14px !important;
    display: inline-block !important;
}

.lc-status--waiting {
    color: #f59e0b !important;
    font-weight: 500;
    background: rgba(245, 158, 11, 0.1) !important;
    padding: 10px 14px !important;
    border-radius: 12px !important;
    border: 1px solid rgba(245, 158, 11, 0.3) !important;
}

.lc-status--waiting:before {
    content: "⏳ ";
    margin-right: 5px;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

.lc-status--waiting {
    animation: pulse 2s infinite;
}


.lc-status {
    margin-top: 15px;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.5;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    transition: all 0.3s ease;
}

.lc-status--ok {
    background: rgba(16, 185, 129, 0.1);
    color: #065f46;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.lc-status--ready {
    background: rgba(96, 165, 250, 0.08);
    color: #1f3b57;
    border: 1px solid rgba(147, 197, 253, 0.45);
}

.lc-status--error {
    background: rgba(239, 68, 68, 0.1);
    color: #7f1d1d;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.lc-status--warning {
    background: rgba(245, 158, 11, 0.1);
    color: #92400e;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.lc-hidden-for-human {
    display: none !important;
}

@media (max-width: 900px) {
    .lc-play-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .lc-board-card {
        padding: 12px;
    }
    
    .lc-status {
        padding: 10px 12px;
        font-size: 13px;
        min-height: 50px;
    }
}

@media (max-width: 600px) {
    .lc-play-panel {
        padding: 16px;
    }
    
    .lc-stats-card {
        padding: 12px;
    }
    
    .lc-stat {
        padding: 8px 10px;
    }
    
    .lc-stat-value {
        font-size: 18px;
    }
    
    .lc-btn-primary {
        padding: 10px 16px;
        font-size: 14px;
    }
    }

.lc-queue-info {
    font-size: 12px;
    color: #6b7280;
    margin-top: 5px;
    text-align: center;
}

.lc-game-hint {
    font-size: 12px;
    color: #6b7280;
    margin-top: 8px;
    text-align: center;
    font-style: italic;
}

/* Стили для перевернутой доски (черные снизу) */
.lc-chess-board--flipped {
    /* НЕ переворачиваем всю доску */
}

/* Стили для координат на перевернутой доске */
.lc-chess-board--flipped .lc-square-file {
    top: 2px !important;
    left: 4px !important;
    bottom: auto !important;
    right: auto !important;
    transform: none !important;
}

.lc-chess-board--flipped .lc-square-rank {
    bottom: 2px !important;
    right: 4px !important;
    top: auto !important;
    left: auto !important;
    transform: none !important;
}

/* Фигуры не переворачиваем - они остаются как есть */
.lc-chess-board--flipped .lc-piece {
    transform: none !important;
}

.lc-ready-confirmation {
    text-align: center;
    padding: 10px;
}

.lc-ready-confirmation p {
    margin-bottom: 15px;
    font-size: 15px;
    color: #374151;
}

.lc-btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    border-radius: 999px;
    border: none;
    background: #6b7280;
    color: #ffffff !important;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none !important;
    transition: background 0.12s ease;
}

.lc-btn-secondary:hover {
    background: #4b5563;
}

.lc-queue-indicator {
    display: inline-block;
    margin-left: 10px;
    animation: pulse 1.5s infinite;
}

.lc-status {
    transition: all 0.3s ease;
    min-height: 80px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

@media (max-width: 600px) {
    .lc-ready-confirmation {
        padding: 8px;
    }
    
    .lc-ready-confirmation p {
        font-size: 14px;
        margin-bottom: 12px;
    }
    
    .lc-btn-primary, .lc-btn-secondary {
        padding: 8px 14px;
        font-size: 13px;
        margin-bottom: 5px;
        width: 100%;
    }
    
    .lc-ready-confirmation button {
        width: 100%;
        margin-bottom: 8px;
    }
    
    .lc-ready-confirmation button:last-child {
        margin-bottom: 0;
    }
}

/* === НОВЫЕ СТИЛИ ДЛЯ ВЕРТИКАЛЬНОЙ КОЛОНКИ === */
.lc-field-framed {
    border: 1px solid rgba(148, 163, 184, 0.3);
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 10px;
    background: #ffffff;
    transition: border-color 0.2s ease;
}

.lc-field-framed:hover {
    border-color: rgba(96, 165, 250, 0.5);
}

.lc-field-framed .lc-field-label {
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #4b5563;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.lc-field-framed .lc-radio-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.lc-field-framed .lc-radio {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #374151;
    padding: 4px 0;
}

.lc-field-framed .lc-radio input[type="radio"] {
    accent-color: #60a5fa;
    width: 14px;
    height: 14px;
}

.lc-field-framed .lc-radio input[type="radio"]:checked + span {
    color: #60a5fa;
    font-weight: 600;
}

.lc-field-framed .lc-input-range {
    width: 100%;
    margin: 8px 0;
    height: 4px;
}

.lc-field-framed .lc-range-value {
    font-size: 11px;
    color: #6b7280;
    margin-top: 4px;
    text-align: center;
}

/* На мобильных устройствах */
@media (max-width: 600px) {
    .lc-field-framed {
        padding: 10px;
        margin-bottom: 8px;
    }
    
    .lc-field-framed .lc-field-label {
        font-size: 11px;
        margin-bottom: 6px;
    }
    
    .lc-field-framed .lc-radio {
        font-size: 12px;
        padding: 3px 0;
    }
}

/* ===== СТИЛИ ДЛЯ ШАШЕК ===== */

/* Контейнер доски */
#checkers-board-play.checkers-board {
    display: grid;
    width: 440px;
    height: 440px;
    max-width: 100%;
    background: #1f2937 !important;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid #cbd5e1;
    margin: 0 auto;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Клетки шашек */
.checker-square {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    min-height: 0;
    min-width: 0;
}

.checker-square.dark {
    background-color: #60a5fa !important;
}

.checker-square.light {
    background-color: #e5e7eb !important;
}

.checker-square.highlight {
    box-shadow: inset 0 0 0 3px #10b981 !important;
    cursor: pointer;
    z-index: 1;
}

.checker-square.selected {
    box-shadow: inset 0 0 0 3px #f59e0b !important;
    z-index: 2;
}

/* Фигуры шашек */
.checker-piece {
    width: 80%;
    height: 80%;
    border-radius: 50%;
    cursor: pointer;
    position: relative;
    z-index: 3;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    transition: transform 0.2s ease;
}

.checker-piece:hover {
    transform: scale(1.05);
}

.checker-piece.white {
    background: radial-gradient(circle at 30% 30%, #ffffff, #d1d5db);
    border: 2px solid #9ca3af;
}

.checker-piece.black {
    background: radial-gradient(circle at 30% 30%, #4b5563, #111827);
    border: 2px solid #1f2937;
}

.checker-piece.king {
    border: 2px solid #d4af37 !important;
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.5) !important;
}

.checker-piece.king::after {
    content: none; /* корона дамки выводится элементом .checker-crown */
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 20px;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.checker-piece.white.king::after {
    color: #374151;
}

.checker-piece.black.king::after {
    color: #f3f4f6;
}
/* Адаптивность */
@media (max-width: 900px) {
    #checkers-board-play.checkers-board {
        width: 400px !important;
        height: 400px !important;
    }
}

@media (max-width: 600px) {
    #checkers-board-play.checkers-board {
        width: min(360px, calc(100vw - 40px)) !important;
        height: min(360px, calc(100vw - 40px)) !important;
    }
    
    .checker-piece {
        width: 70%;
        height: 70%;
    }
    
    .checker-piece.king::after {
        font-size: 16px;
    }
}

/* Анимации */
@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.8; }
    100% { opacity: 1; }
}

.checker-square.highlight {
    animation: pulse 2s infinite;
}

/* Стили для шашечной доски */
.checker-board {
    display: grid;
    background: #1f2937 !important;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid #cbd5e1;
    margin: 0 auto;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.checker-square {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    min-height: 0;
    min-width: 0;
}

.checker-square.dark {
    background-color: #60a5fa !important;
}

.checker-square.light {
    background-color: #e5e7eb !important;
}

.checker-square.highlight {
    box-shadow: inset 0 0 0 3px #10b981 !important;
    cursor: pointer;
    z-index: 1;
}

.checker-square.selected {
    box-shadow: inset 0 0 0 3px #f59e0b !important;
    z-index: 2;
}

.checker-piece {
    width: 80%;
    height: 80%;
    border-radius: 50%;
    cursor: pointer;
    position: relative;
    z-index: 3;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    transition: transform 0.2s ease;
}

.checker-piece:hover {
    transform: scale(1.05);
}

.checker-piece.white {
    background: radial-gradient(circle at 30% 30%, #ffffff, #d1d5db);
    border: 2px solid #9ca3af;
}

.checker-piece.black {
    background: radial-gradient(circle at 30% 30%, #4b5563, #111827);
    border: 2px solid #1f2937;
}

.checker-piece.king {
    border: 2px solid #d4af37 !important;
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.5) !important;
}

.checker-piece.king .checker-crown {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 20px;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.checker-piece.white.king .checker-crown {
    color: #374151;
}

.checker-piece.black.king .checker-crown {
    color: #f3f4f6;
}

/* Анимации */
@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.8; }
    100% { opacity: 1; }
}

.checker-square.highlight {
    animation: pulse 2s infinite;
}

/* ===== ОБНОВЛЁННЫЕ СТИЛИ СТАТИСТИКИ НА ГЛАВНОЙ ===== */
.lc-play {
    padding: 30px 0;
    background: #f8fafc;
}

.lc-play h2 {
    text-align: center;
    margin-bottom: 25px;
    font-size: 22px;
    color: #0f172a;
    font-weight: 600;
}

.lc-home-intro-card {
    max-width: 900px;
    margin: 0 auto;
    padding: 22px 24px;
    border-radius: 20px;
    background: #ffffff;
    border: 1px solid rgba(148, 163, 184, 0.4);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
}

.lc-home-intro-card p {
    margin: 0 0 10px;
    color: #374151;
    font-size: 15px;
    line-height: 1.65;
}

.lc-home-intro-card p:last-child {
    margin-bottom: 0;
}

.lc-play .lc-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    max-width: 1000px;
    margin: 0 auto;
}

.lc-play .lc-stats-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
    border: 1px solid rgba(148, 163, 184, 0.4);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.lc-play .lc-stats-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.lc-play .lc-stats-title {
    font-size: 14px;
    font-weight: 600;
    color: #4b5563;
    margin-bottom: 12px;
    text-align: center;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.lc-play .lc-stat {
    text-align: center;
    padding: 8px 0;
}

.lc-play .lc-stat-label {
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 4px;
    font-weight: 500;
}

.lc-play .lc-stat-value {
    font-size: 24px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 8px;
    line-height: 1.2;
}

.lc-play .lc-stat-sub {
    font-size: 11px;
    color: #9ca3af;
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-top: 6px;
}

/* Стили для описания игр в правой панели */
.lc-play-panel .lc-stats-card {
    margin-top: 20px;
    padding: 16px;
    border-radius: 20px;
    background: #f9fafb;
    border: 1px solid rgba(148, 163, 184, 0.6);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

.lc-play-panel .lc-stats-title {
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.lc-play-panel .lc-stats-card div[style*="font-size: 14px"] {
    font-size: 14px;
    line-height: 1.5;
    color: #374151;
}

.lc-play-panel .lc-stats-card ul {
    margin: 10px 0 10px 20px;
    padding: 0;
}

.lc-play-panel .lc-stats-card li {
    margin-bottom: 5px;
}

.lc-play-panel .lc-stats-card strong {
    color: #111827;
}

/* Стили для подписей уровней сложности */
.lc-range-value {
    font-size: 12px;
    color: #6b7280;
    margin-top: 6px;
    text-align: center;
}

.lc-range-value span {
    color: #60a5fa;
    font-weight: 600;
}

#lc-difficulty-label,
#lc-checkers-difficulty-label {
    color: #059669;
    font-weight: 700;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 900px) {
    .lc-play .lc-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }
    
    .lc-play h2 {
        font-size: 20px;
        margin-bottom: 20px;
    }
    
    .lc-play .lc-stats-card {
        padding: 14px;
        border-radius: 14px;
    }
    
    .lc-play .lc-stat-value {
        font-size: 22px;
    }
}

@media (max-width: 600px) {
    .lc-play {
        padding: 25px 0;
    }
    
    .lc-play h2 {
        font-size: 18px;
        margin-bottom: 18px;
    }
    
    .lc-play .lc-stats-grid {
        grid-template-columns: 1fr;
        gap: 12px;
        max-width: 300px;
    }
    
    .lc-play .lc-stats-card {
        padding: 16px 14px;
        border-radius: 14px;
    }
    
    .lc-play .lc-stats-title {
        font-size: 13px;
        margin-bottom: 10px;
    }
    
    .lc-play .lc-stat-value {
        font-size: 20px;
    }
    
    .lc-play .lc-stat-label {
        font-size: 11px;
    }
    
    .lc-play .lc-stat-sub {
        font-size: 10px;
    }
}

/* Для очень маленьких экранов */
@media (max-width: 400px) {
    .lc-play .lc-stats-grid {
        max-width: 280px;
    }
    
    .lc-play .lc-stats-card {
        padding: 14px 12px;
    }
    
    .lc-play .lc-stat-value {
        font-size: 18px;
    }
}

/* Стили для меток уровней сложности в диапазоне */
.lc-difficulty-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 5px;
    font-size: 11px;
    color: #6b7280;
}

.lc-difficulty-labels span {
    width: 10%;
    text-align: center;
}

/* ====== Реальный счётчик очереди в шапке (страницы /play и /play-checkers) ====== */
.lc-header-queue {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: 12px;
    padding: 7px 10px;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    background: #ffffff;
    font-size: 13px;
    line-height: 1;
    color: #111827;
    user-select: none;
}

.lc-header-queue-label {
    color: #6b7280;
    font-weight: 600;
}

@media (max-width: 600px) {
    /* Mobile: show queue indicator centered under header without pushing buttons/menu. */
    .lc-header--has-queue {
        position: relative;
        padding-bottom: 46px;
    }

    .lc-header--has-queue .lc-header-queue {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        bottom: 10px;
        margin: 0;
        justify-content: center;
        z-index: 3;
        max-width: calc(100% - 24px);
    }
}

@media (max-width: 420px) {
    .lc-header--has-queue {
        padding-bottom: 52px;
    }

    .lc-header--has-queue .lc-header-queue {
        font-size: 12px;
        padding: 6px 9px;
        gap: 5px;
    }
}



/* Оповещение в шапке: рост очереди ожидания (кто-то выбрал игру против игрока) */
.lc-header-queue.pulse {
    animation: lcQueuePulse 0.9s ease-in-out 1;
}

@keyframes lcQueuePulse {
    0% { box-shadow: 0 0 0 0 rgba(17, 24, 39, 0.0); }
    30% { box-shadow: 0 0 0 6px rgba(17, 24, 39, 0.12); }
    100% { box-shadow: 0 0 0 0 rgba(17, 24, 39, 0.0); }
}

.lc-header-queue-toast {
    margin-left: 8px;
    padding: 4px 8px;
    border-radius: 999px;
    background: #111827;
    color: #ffffff;
    font-size: 12px;
    line-height: 1;
    white-space: nowrap;
}

@media (max-width: 600px) {
    .lc-header-queue-toast {
        display: none !important;
    }
}
