/* ============================================
   Snake — Pear
   Minimalistic dark theme, monospace typography
   Full-screen layout (PC)
   ============================================ */

/* Reset & Base */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    overflow: hidden;
}

body {
    font-family: 'Courier New', Courier, monospace;
    background-color: #1a1a2e;
    color: #e0e0e0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.container {
    width: 100%;
    height: 100dvh;
    padding: 12px 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow: hidden;
}

/* Header */
.header {
    flex-shrink: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-img {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    object-fit: cover;
}

.logo-text {
    font-size: 16px;
    font-weight: bold;
    color: #a8e6cf;
    letter-spacing: 1px;
}

.score-board {
    text-align: right;
}

.score-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #888;
    display: block;
}

.score-value {
    font-size: 32px;
    font-weight: bold;
    color: #a8e6cf;
    font-family: 'Courier New', Courier, monospace;
    line-height: 1;
}

/* Game Canvas — fills remaining space */
.game-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #16213e;
    border-radius: 12px;
    box-shadow: 0 4px 32px rgba(0, 0, 0, 0.6);
    min-height: 0;
    position: relative;
    overflow: hidden;
}

#gameCanvas {
    display: block;
    width: 100%;
    height: 100%;
    background-color: #0f3460;
    touch-action: none;
}

/* Settings */
.settings {
    flex-shrink: 0;
    display: flex;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
}

.setting-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.setting-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #888;
}

.btn-group {
    display: flex;
    gap: 4px;
}

.setting-btn {
    font-family: 'Courier New', Courier, monospace;
    font-size: 12px;
    padding: 4px 12px;
    background: transparent;
    color: #888;
    border: 1px solid #2a2a4a;
    border-radius: 6px;
    cursor: pointer;
    letter-spacing: 0.5px;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.setting-btn:hover {
    color: #a8e6cf;
    border-color: #a8e6cf;
}

.setting-btn.active {
    background: #a8e6cf;
    color: #1a1a2e;
    border-color: #a8e6cf;
}

/* Bottom bar: restart + high scores */
.bottom-bar {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 28px;
}

.restart-btn {
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
    font-weight: bold;
    padding: 8px 28px;
    background: transparent;
    color: #a8e6cf;
    border: 1px solid #a8e6cf;
    border-radius: 8px;
    cursor: pointer;
    letter-spacing: 1px;
    transition: background 0.2s, color 0.2s;
}

.restart-btn:hover {
    background: #a8e6cf;
    color: #1a1a2e;
}

.restart-btn:active {
    transform: scale(0.96);
}

/* High Scores inline */
.high-scores {
    display: flex;
    align-items: center;
    gap: 8px;
}

.high-scores-title {
    font-size: 18px;
}

.high-scores-list {
    list-style: none;
    display: flex;
    gap: 12px;
    font-size: 14px;
    color: #ccc;
}

.high-scores-list li:first-child {
    color: #ffd700;
    font-weight: bold;
}

.high-scores-list li:nth-child(2) {
    color: #c0c0c0;
}

.high-scores-list li:nth-child(3) {
    color: #cd7f32;
}

/* Footer */
.footer {
    flex-shrink: 0;
    width: 100%;
    text-align: center;
    padding-top: 2px;
}

.footer p {
    font-size: 10px;
    color: #555;
    letter-spacing: 0.5px;
}