/* ================== БАЗА ================== */
:root {
    --bg-panel: #1a1f2e;
    --bg-panel-2: #232a3d;
    --accent: #00d4ff;
    --accent-2: #ff4d8f;
    --border: #2d3548;
}

html, body {
    min-height: 100vh;
    background: radial-gradient(ellipse at top, #1e2540 0%, #0a0d1a 100%);
    font-family: 'Segoe UI', Roboto, sans-serif;
    overflow-x: hidden;
}

/* ================== ЗАГОЛОВОК ================== */
.game-title {
    font-weight: 900;
    letter-spacing: 4px;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 0 30px rgba(0, 212, 255, 0.3);
    margin-bottom: 15px;
    font-size: 2rem;
}

/* ================== КНОПКИ СВЕРХУ ================== */
.top-buttons {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.btn-accent {
    background: linear-gradient(145deg, var(--accent), var(--accent-2));
    color: #000;
    font-weight: 700;
    border: none;
    padding: 10px 24px;
    border-radius: 10px;
    transition: all 0.2s;
    font-size: 1rem;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.25);
}

.btn-accent:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 212, 255, 0.5);
    color: #000;
}

.btn-accent:active {
    transform: translateY(0);
}

/* ================== ИГРОВОЕ ПОЛЕ ================== */
#game-wrapper {
    position: relative;
    display: inline-block;
    border-radius: 12px;
    padding: 6px;
    background: linear-gradient(145deg, #0d111c, #1a1f2e);
    box-shadow:
        0 0 0 2px var(--border),
        0 0 40px rgba(0, 212, 255, 0.2),
        inset 0 0 20px rgba(0, 0, 0, 0.6);
    max-width: 320px;
    width: 100%;
    animation: fadeIn 0.5s ease-out;
}

#board {
    display: block;
    background: #0a0d1a;
    border-radius: 8px;
    image-rendering: pixelated;
    width: 100%;
    height: auto;
    touch-action: none;
}

/* ================== ОВЕРЛЕЙ ================== */
.overlay {
    position: absolute;
    inset: 6px;
    background: rgba(10, 13, 26, 0.92);
    backdrop-filter: blur(4px);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.overlay-content {
    text-align: center;
    color: var(--accent);
    padding: 20px;
}

.overlay-content h3 {
    letter-spacing: 3px;
    font-weight: 900;
    margin-bottom: 10px;
}

.overlay-content i {
    color: var(--accent-2);
}

/* ================== РЕКОРДЫ (плотнее) ================== */
.records-list {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 400px;
    overflow-y: auto;
}

.records-list li {
    padding: 0px 3px; /* уменьшено с 10px 8px */
    border-bottom: 1px dashed var(--border);
    font-size: 0.95rem;
    line-height: 1.3;
}

.records-list li:last-child {
    border-bottom: none;
}

/* ================== ПАГИНАЦИЯ ================== */
.pagination .page-link {
    background: var(--bg-panel);
    border-color: var(--border);
    color: var(--accent);
}

.pagination .page-item.active .page-link {
    background: var(--accent);
    border-color: var(--accent);
    color: #000;
}

.pagination .page-item.disabled .page-link {
    background: #1a1f2e;
    color: #555;
}

/* ================== АДАПТИВ ================== */
@media (max-width: 576px) {
    .game-title {
        font-size: 1.5rem;
        letter-spacing: 2px;
    }
    .btn-accent {
        padding: 8px 18px;
        font-size: 0.9rem;
    }
}

/* ================== АНИМАЦИЯ ================== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to   { opacity: 1; transform: translateY(0); }
}
