* {
    box-sizing: border-box;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
}

body {
    margin: 0;
    padding: 15px;
    background-color: #121214;
    color: #ffffff;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-height: 100vh;
    overflow: hidden;
}

#menu-overlay {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background: #121214; display: flex; flex-direction: column;
    align-items: center; justify-content: center; z-index: 3000;
}
#menu-overlay h1 { font-size: 42px; color: #f1c40f; margin-bottom: 5px; }
#menu-overlay p { font-size: 16px; color: #aaa; margin: 15px 0 10px 0; }

.menu-btn {
    padding: 15px 30px; font-size: 18px; margin: 10px; width: 220px;
    border: none; border-radius: 8px; background: #3498db; color: white;
    cursor: pointer; font-weight: bold; transition: background 0.2s;
}
.menu-btn:active { background: #2980b9; }

.skin-btn {
    padding: 8px 16px; font-size: 14px; margin: 5px; border: 2px solid #555;
    border-radius: 6px; background: #1a1a1e; color: white; cursor: pointer;
}
.skin-btn.active { border-color: #f1c40f; background: #2c2c35; color: #f1c40f; }

#score-board { font-size: 26px; font-weight: bold; margin-top: 15px; margin-bottom: 15px; color: #f1c40f; text-align: center; }

#grid {
    display: grid; gap: 4px; background-color: #202024; padding: 6px; border-radius: 12px;
    width: 90vw; height: 90vw; max-width: 380px; max-height: 380px; box-shadow: 0 10px 25px rgba(0,0,0,0.4);
}

.cell { background-color: #2a2a30; border-radius: 5px; transition: all 0.1s ease; }
.cell.filled { box-shadow: inset 0 0 10px rgba(255,255,255,0.25); }

/* --- HINDERNIS BLOCK --- */
.cell.obstacle {
    background: #55555e !important;
    border: 2px solid #33333a;
    box-shadow: inset 0 0 6px rgba(0,0,0,0.5) !important;
}

/* --- SKIN: RETRO WOOD --- */
body.skin-retro .cell.filled, body.skin-retro .preview-cell {
    border: 3px solid rgba(0,0,0,0.15);
    border-radius: 2px !important;
    box-shadow: inset 2px 2px 0 rgba(255,255,255,0.2), inset -2px -2px 0 rgba(0,0,0,0.2) !important;
}

/* --- BOMBEN BLOCK --- */
.cell.bomb, .preview-cell.bomb {
    background: radial-gradient(circle, #e74c3c 30%, #c0392b 90%) !important;
    animation: pulseBomb 0.8s infinite alternate;
    box-shadow: 0 0 12px #e74c3c, inset 0 0 8px rgba(255,255,255,0.6) !important;
}
@keyframes pulseBomb { 0% { transform: scale(1); } 100% { transform: scale(0.95); } }

#dock { display: flex; justify-content: space-around; align-items: center; width: 90vw; max-width: 380px; margin-top: 30px; height: 110px; background-color: #1a1a1e; border-radius: 12px; padding: 10px; }
.preview-shape { position: relative; cursor: grab; }
.preview-cell { position: absolute; border-radius: 3px; box-shadow: inset 0 0 6px rgba(255,255,255,0.3); }
.dragging { opacity: 0.85; transform: scale(1.1); z-index: 1000; }

.diff-btn {
    padding: 8px 16px; font-size: 14px; margin: 5px; border: 2px solid #555;
    border-radius: 6px; background: #1a1a1e; color: white; cursor: pointer; font-weight: bold;
}
.diff-btn.active { border-color: #2ecc71; background: #1e3a27; color: #2ecc71; }

/* Animation für das Bildschirmwackeln */
@keyframes shake {
    0% { transform: translate(1px, 1px) rotate(0deg); }
    10% { transform: translate(-1px, -2px) rotate(-1deg); }
    20% { transform: translate(-3px, 0px) rotate(1deg); }
    30% { transform: translate(0px, 2px) rotate(0deg); }
    40% { transform: translate(1px, -1px) rotate(1deg); }
    50% { transform: translate(-1px, 2px) rotate(-1deg); }
    60% { transform: translate(-3px, 1px) rotate(0deg); }
    70% { transform: translate(2px, 1px) rotate(-1deg); }
    80% { transform: translate(-1px, -1px) rotate(1deg); }
    90% { transform: translate(2px, 2px) rotate(0deg); }
    100% { transform: translate(1px, -2px) rotate(0deg); }
}
.shake {
    animation: shake 0.4s ease-in-out;
}

/* Pulsierender Glüh-Hinweis für Blöcke, die gedreht werden müssen */
@keyframes pulseRotateHint {
    0% { filter: drop-shadow(0 0 2px #f1c40f) brightness(1); }
    100% { filter: drop-shadow(0 0 12px #f1c40f) brightness(1.3); }
}
.rotate-hint {
    animation: pulseRotateHint 0.8s infinite alternate ease-in-out;
}
