/* ==========================================================================
   Snake.app — Retro macOS Arcade Edition
   ========================================================================== */

#snake-window {
    width: 620px;
    height: 620px;
    min-width: 500px;
    min-height: 500px;
    border-radius: 12px;
    overflow: hidden;
    background: #11141a;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.snake-container {
    display: flex;
    flex-direction: column;
    height: calc(100% - 38px);
    background: #0d1017;
    color: #fff;
    user-select: none;
    position: relative;
    overflow: hidden;
}

/* Header bar */
.snake-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 18px;
    background: linear-gradient(180deg, #181c24 0%, #11151c 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.snake-stat-group {
    display: flex;
    align-items: center;
    gap: 16px;
}

.snake-stat {
    display: flex;
    flex-direction: column;
}

.snake-stat-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.45);
    font-weight: 600;
}

.snake-stat-val {
    font-size: 18px;
    font-weight: 700;
    font-family: 'SF Pro Display', -apple-system, sans-serif;
    color: #30d158;
    letter-spacing: -0.02em;
}

.snake-btn {
    border: none;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.snake-btn:hover {
    background: rgba(255, 255, 255, 0.18);
}

/* Stage */
.snake-stage {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 50% 50%, #151a24 0%, #090c12 100%);
    overflow: hidden;
    padding: 12px;
}

#snake-canvas {
    display: block;
    background: #0a0d14;
    border-radius: 8px;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.08);
}

/* On-screen D-pad for easy controls */
.snake-dpad {
    display: grid;
    grid-template-columns: repeat(3, 44px);
    grid-template-rows: repeat(2, 40px);
    gap: 4px;
    justify-content: center;
    padding: 8px 0;
    background: #11141a;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.snake-dpad-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.1s ease, color 0.1s ease, transform 0.1s ease;
}

.snake-dpad-btn:active {
    background: #30d158;
    color: #000;
    transform: scale(0.95);
}

.snake-dpad-up { grid-column: 2; grid-row: 1; }
.snake-dpad-left { grid-column: 1; grid-row: 2; }
.snake-dpad-down { grid-column: 2; grid-row: 2; }
.snake-dpad-right { grid-column: 3; grid-row: 2; }

/* Overlays */
.snake-overlay {
    position: absolute;
    inset: 0;
    background: rgba(9, 12, 18, 0.88);
    backdrop-filter: blur(8px);
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 20;
    text-align: center;
    padding: 20px;
}

.snake-overlay.open {
    display: flex;
}

.snake-overlay-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(48, 209, 88, 0.15);
    border: 1px solid rgba(48, 209, 88, 0.3);
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 11px;
    color: #30d158;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.snake-overlay-title {
    font-size: 32px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.snake-overlay-desc {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    max-width: 300px;
    margin-bottom: 24px;
    line-height: 1.4;
}

.snake-play-btn {
    padding: 10px 24px;
    background: #30d158;
    color: #000;
    font-weight: 700;
    font-size: 14px;
    border: none;
    border-radius: 999px;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(48, 209, 88, 0.4);
    transition: background-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.snake-play-btn:hover {
    background: #28b84d;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(48, 209, 88, 0.5);
}

.snake-tip {
    margin-top: 18px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.35);
}
