body {
    margin: 0;
    background: #1a1a2e;
    color: #fff;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    overflow: hidden;
    user-select: none;
    touch-action: none;
}

#ui {
    display: flex;
    justify-content: space-between;
    width: 480px;
    max-width: 95vw;
    margin-bottom: 12px;
    font-size: 22px;
    font-weight: bold;
    background: #16213e;
    padding: 12px 20px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    box-sizing: border-box;
}

#combo {
    color: #e94560;
}

canvas {
    background: #0f3460;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    cursor: pointer;
    max-width: 95vw;
    height: auto;
}

.hint {
    margin-top: 14px;
    font-size: 13px;
    color: #a2a8d3;
    text-align: center;
    max-width: 480px;
    line-height: 1.5;
}

#ui { font-size: 17px; gap: 10px; flex-wrap: wrap; }
#moves { color: #ffa502; }
#ice-left { color: #70a1ff; }
#modal {
    position: fixed; inset: 0; background: rgba(0, 0, 0, 0.75);
    display: flex; align-items: center; justify-content: center; z-index: 10;
}
#modal.hidden { display: none; }
.modal-box {
    background: #16213e; padding: 28px 36px; border-radius: 16px;
    text-align: center; box-shadow: 0 10px 30px rgba(0,0,0,0.8);
    border: 2px solid #0f3460;
}
.modal-box h2 { margin: 0 0 10px; font-size: 28px; }
.modal-box p { margin: 0 0 20px; color: #a2a8d3; }
#modal-btn {
    background: #e94560; color: #fff; border: none; padding: 12px 28px;
    font-size: 18px; font-weight: bold; border-radius: 10px; cursor: pointer;
}
#modal-btn:hover { background: #ff5e78; }

.nav-btn {
    background: #0f3460; color: #fff; border: 1px solid #2f5585; padding: 3px 9px;
    border-radius: 6px; font-size: 14px; font-weight: bold; cursor: pointer; text-decoration: none;
}
.nav-edit { border-color: #2ed573; color: #2ed573; }
#levels-modal {
    position: fixed; inset: 0; background: rgba(0, 0, 0, 0.8);
    display: flex; align-items: center; justify-content: center; z-index: 20;
}
#levels-modal.hidden { display: none; }
.levels-box { width: 420px; max-width: 92vw; max-height: 80vh; display: flex; flex-direction: column; padding: 20px; }
.levels-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.levels-header h2 { margin: 0; font-size: 22px; }
#close-levels-btn { background: transparent; border: none; color: #a2a8d3; font-size: 20px; cursor: pointer; }
#levels-list { overflow-y: auto; display: flex; flex-direction: column; gap: 8px; text-align: left; padding-right: 4px; }
.lvl-card {
    background: #0f3460; padding: 10px 14px; border-radius: 10px; cursor: pointer;
    display: flex; justify-content: space-between; align-items: center; border: 1px solid transparent;
}
.lvl-card:hover { border-color: #2ed573; background: #164278; }
.lvl-card .lvl-title { font-weight: bold; font-size: 15px; color: #fff; }
.lvl-card .lvl-meta { font-size: 12px; color: #a2a8d3; }
.lvl-badge { background: #2ed573; color: #111; font-size: 11px; font-weight: bold; padding: 2px 6px; border-radius: 4px; }

#goals-bar { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.goal-badge {
    background: #0f3460; border: 1px solid #2f5585; padding: 2px 8px;
    border-radius: 8px; font-size: 14px; display: flex; align-items: center; gap: 4px;
}
.goal-badge.done { border-color: #2ed573; background: rgba(46, 213, 115, 0.2); color: #7bed9f; }
