/**
 * Snake Game – WordPress Plugin
 * Styles für Spielcontainer, Canvas und UI-Elemente
 */

/* ── Wrapper ───────────────────────────────────────────────── */
.snake-game-wrapper {
    display:         flex;
    flex-direction:  column;
    align-items:     center;
    margin:          24px auto;
    font-family:     'Courier New', Courier, monospace;
    max-width:       100%;
    box-sizing:      border-box;
}

/* ── Score-Kopfzeile ───────────────────────────────────────── */
.snake-game-header {
    display:         flex;
    align-items:     baseline;
    gap:             10px;
    font-size:       1.5em;
    font-weight:     bold;
    margin-bottom:   10px;
    letter-spacing:  0.05em;
}

.snake-score-label {
    color: #cccccc;
    font-size: 0.85em;
    text-transform: uppercase;
}

.snake-score-value {
    color:      #2ecc71;
    min-width:  40px;
    text-align: right;
}

/* ── Canvas ────────────────────────────────────────────────── */
.snake-canvas {
    display:    block;
    max-width:  100%;
    height:     auto;
    background: #0f0f23;
    border:     3px solid #1a1a40;
    box-shadow:
        0 0 0   2px #0f0f23,
        0 0 18px rgba(46, 204, 113, 0.25),
        0 4px  24px rgba(0, 0, 0, 0.6);
    cursor: default;
    outline: none;
}

/* ── Bedienfeld unterhalb des Canvas ───────────────────────── */
.snake-game-ui {
    display:         flex;
    align-items:     center;
    gap:             24px;
    margin-top:      14px;
    flex-wrap:       wrap;
    justify-content: center;
}

/* ── Geschwindigkeits-Regler ───────────────────────────────── */
.snake-speed-control {
    display:     flex;
    align-items: center;
    gap:         8px;
    color:       #cccccc;
    font-size:   0.9em;
    white-space: nowrap;
}

.snake-speed-control label {
    color:  #cccccc;
    cursor: pointer;
}

.snake-speed-slider {
    width:         130px;
    height:        5px;
    accent-color:  #2ecc71;
    cursor:        pointer;
    vertical-align: middle;
}

.snake-speed-value {
    color:       #2ecc71;
    font-weight: bold;
    min-width:   20px;
    text-align:  center;
}

/* ── Start-/Neustart-Schaltfläche ──────────────────────────── */
.snake-start-btn {
    padding:      9px 28px;
    background:   #2ecc71;
    color:        #0f0f23;
    border:       none;
    border-radius: 4px;
    font-family:  'Courier New', Courier, monospace;
    font-size:    0.95em;
    font-weight:  bold;
    letter-spacing: 0.04em;
    cursor:       pointer;
    transition:   background 0.18s ease, transform 0.1s ease, box-shadow 0.18s ease;
    box-shadow:   0 2px 8px rgba(46, 204, 113, 0.35);
}

.snake-start-btn:hover {
    background: #27ae60;
    transform:  translateY(-2px);
    box-shadow: 0 4px 14px rgba(46, 204, 113, 0.45);
}

.snake-start-btn:active {
    transform:  translateY(0);
    box-shadow: 0 1px 4px rgba(46, 204, 113, 0.25);
}

/* ── Tastatur-Hinweis ──────────────────────────────────────── */
.snake-instructions {
    color:      #666666;
    font-size:  0.8em;
    margin-top: 8px;
    text-align: center;
}

/* ── Responsiv ─────────────────────────────────────────────── */
@media (max-width: 480px) {
    .snake-game-ui {
        flex-direction: column;
        gap: 12px;
    }

    .snake-speed-control {
        flex-wrap: wrap;
        justify-content: center;
    }

    .snake-start-btn {
        width: 100%;
        max-width: 280px;
    }
}
