/* ============================================================
   Vulcan Design System — Lucky Draw
   Dark Mode Only
   ============================================================ */

/* ── CSS Variables ─────────────────────────────────────────── */
:root {
    --bg-void: #080504;
    --bg-deep: #120b08;
    --bg-panel: #1d120d;
    --bg-surface: #2a1910;
    --bg-surface-alt: #3a2113;

    --accent-cyan: #ff5a1f;
    --anim-highlight: #ff5a1f;
    --accent-cyan-dim: #b93613;
    --accent-cyan-faint: rgba(255, 90, 31, 0.1);
    --accent-gold: #ffd166;
    --accent-purple: #c47a2c;
    --accent-blue: #7f5539;
    --accent-green: #b5c267;
    --accent-red: #ff3b1f;

    --text-primary: #fff1df;
    --text-secondary: #d5a36d;
    --text-dim: #8a5a36;

    --border-glow: rgba(255, 90, 31, 0.25);
    --border-bright: rgba(255, 132, 48, 0.68);
    --border-subtle: rgba(255, 255, 255, 0.06);

    /* Rarity colours */
    --rarity-legendary: #ffd166;
    --rarity-epic: #ff7a2f;
    --rarity-rare: #c47a2c;
    --rarity-common: #b5c267;
}

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

/* ── Base ──────────────────────────────────────────────────── */
html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-void);
    background-image:
        radial-gradient(ellipse 65% 42% at 50% -10%, rgba(255, 90, 31, 0.16) 0%, transparent 68%),
        radial-gradient(ellipse 45% 28% at 20% 100%, rgba(255, 209, 102, 0.08) 0%, transparent 70%),
        linear-gradient(135deg, rgba(255, 90, 31, 0.04) 0 25%, transparent 25% 50%, rgba(255, 90, 31, 0.025) 50% 75%, transparent 75%);
    background-size: auto, auto, 72px 72px;
    color: var(--text-primary);
    font-family: "Share Tech Mono", "Courier New", monospace;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Scanline overlay */
body::after {
    content: "";
    position: fixed;
    inset: 0;
    background: repeating-linear-gradient(
        to bottom,
        transparent,
        transparent 3px,
        rgba(0, 0, 0, 0.06) 3px,
        rgba(0, 0, 0, 0.06) 4px
    );
    pointer-events: none;
    z-index: 9999;
}

/* ── Starfield canvas ──────────────────────────────────────── */
.starfield-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

/* ── Layout container ──────────────────────────────────────── */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px 40px;
}

/* ── Navigation ────────────────────────────────────────────── */
nav {
    background: rgba(18, 11, 8, 0.86);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-glow);
    margin: 15px auto 30px;
    max-width: 1160px;
    padding: 0 10px;
    position: sticky;
    top: 15px;
    z-index: 200;
    border-radius: 6px;
    clip-path: polygon(14px 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%, 0 14px);
    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.5),
        inset 0 0 18px rgba(255, 90, 31, 0.08);
    transition: all 0.3s ease;
}

.nav-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
    padding: 0 15px;
}

/* Logo */
.logo {
    font-family: "Orbitron", sans-serif;
    font-weight: 700;
    font-size: 20px;
    color: var(--accent-cyan);
    text-decoration: none;
    text-shadow: 0 0 18px rgba(255, 90, 31, 0.7);
    letter-spacing: 2px;
    transition: text-shadow 0.3s;
}
.logo::before {
    content: "▲ ";
    color: var(--text-dim);
}
.logo::after {
    content: " ▲";
    color: var(--text-dim);
}
.logo:hover {
    text-shadow: 0 0 30px rgba(255, 132, 48, 1);
}

/* Nav links */
.nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-link {
    font-family: "Orbitron", sans-serif;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1.5px;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 8px 20px;
    border-radius: 8px;
    transition: all 0.25s;
    text-transform: uppercase;
    position: relative;
}
.nav-link:hover {
    color: var(--text-primary);
    background: var(--accent-cyan-faint);
}
.nav-link.active {
    color: var(--accent-cyan);
    background: var(--accent-cyan-faint);
    text-shadow: 0 0 10px rgba(255, 90, 31, 0.45);
}
.nav-link.active::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 20%;
    right: 20%;
    height: 2px;
    background: var(--accent-cyan);
    box-shadow: 0 0 10px var(--accent-cyan);
    border-radius: 2px;
}

/* Reset storage button */
.reset-storage-btn {
    font-family: "Orbitron", sans-serif;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 1px;
    color: var(--accent-red);
    background: transparent;
    border: 1px solid var(--accent-red);
    padding: 6px 14px;
    border-radius: 3px;
    cursor: pointer;
    text-transform: uppercase;
    transition: all 0.25s;
    margin-left: 12px;
}
.reset-storage-btn:hover {
    background: rgba(239, 68, 68, 0.12);
    box-shadow: 0 0 14px rgba(239, 68, 68, 0.4);
}

/* ── Generic Button System ─────────────────────────────────── */
.btn {
    font-family: "Orbitron", sans-serif;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    padding: 10px 22px;
    border: 1px solid;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.25s;
}

.btn--primary {
    background: var(--accent-cyan);
    border-color: var(--accent-cyan);
    color: #1a0802;
}
.btn--primary:hover {
    background: #ff7a2f;
    box-shadow: 0 0 22px rgba(255, 90, 31, 0.55);
}

.btn--danger {
    background: transparent;
    border-color: var(--accent-red);
    color: var(--accent-red);
}
.btn--danger:hover {
    background: rgba(239, 68, 68, 0.1);
    box-shadow: 0 0 16px rgba(239, 68, 68, 0.4);
}

.btn--purple {
    background: transparent;
    border-color: var(--accent-purple);
    color: var(--accent-purple);
}
.btn--purple:hover {
    background: rgba(168, 85, 247, 0.1);
    box-shadow: 0 0 16px rgba(168, 85, 247, 0.4);
}

.btn--green {
    background: transparent;
    border-color: var(--accent-green);
    color: var(--accent-green);
}
.btn--green:hover {
    background: rgba(34, 197, 94, 0.1);
    box-shadow: 0 0 16px rgba(34, 197, 94, 0.4);
}

/* ── Game Layout ───────────────────────────────────────────── */
.game-layout {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 24px;
    align-items: start;
    padding-top: 28px;
}

.game-controls {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

/* ── Box Grid ──────────────────────────────────────────────── */
.boxes-container {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
}

/* Wrapper for box + toggle button */
.box-wrapper {
    position: relative;
}

/* ── Box ───────────────────────────────────────────────────── */
.box {
    aspect-ratio: 1;
    width: 100%;
    background: var(--bg-panel);
    border: 1px solid var(--border-glow);
    border-radius: 4px;
    clip-path: polygon(10% 0, 100% 0, 100% 90%, 90% 100%, 0 100%, 0 10%);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 6px;
    transition:
        border-color 0.25s,
        box-shadow 0.25s,
        transform 0.2s;
    position: relative;
}

/* Question mark idle state */
.box-question {
    font-family: "Orbitron", sans-serif;
    font-size: 28px;
    font-weight: 700;
    color: var(--accent-cyan);
    text-shadow: 0 0 14px var(--accent-cyan);
}

.box:hover:not(.disabled) {
    border-color: var(--border-bright);
    box-shadow: 0 0 18px rgba(255, 90, 31, 0.24);
    transform: scale(1.04);
}

/* Disabled */
.box.disabled {
    opacity: 0.18;
    cursor: not-allowed;
    filter: grayscale(1);
}

/* Revealed content layout */
.box-media {
    width: 100%;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.box.text-only .box-title {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-align: center;
    padding: 20px 10px;
    line-height: 1.4;
}
.box-media img,
.box-media video {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
.box-title {
    font-family: "Orbitron", sans-serif;
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.8px;
    text-align: center;
    padding: 3px 2px 1px;
    word-break: break-word;
    line-height: 1.3;
}

/* ── Rarity glow on revealed boxes ─────────────────────────── */
.box.revealed {
    animation: boxReveal 0.4s ease-out;
}
.box.revealed[data-rarity="Legendary"] {
    border-color: var(--rarity-legendary);
    box-shadow:
        0 0 26px rgba(255, 209, 102, 0.6),
        inset 0 0 16px rgba(255, 209, 102, 0.12);
}
.box.revealed[data-rarity="Epic"] {
    border-color: var(--rarity-epic);
    box-shadow:
        0 0 22px rgba(255, 122, 47, 0.55),
        inset 0 0 12px rgba(255, 122, 47, 0.1);
}
.box.revealed[data-rarity="Rare"] {
    border-color: var(--rarity-rare);
    box-shadow:
        0 0 18px rgba(196, 122, 44, 0.45),
        inset 0 0 8px rgba(196, 122, 44, 0.09);
}
.box.revealed[data-rarity="Common"] {
    border-color: var(--rarity-common);
    box-shadow: 0 0 10px rgba(181, 194, 103, 0.3);
}

/* ── Highlight (spinning animation) ────────────────────────── */
.box.highlight {
    border-color: var(--accent-cyan) !important;
    box-shadow: 0 0 22px var(--accent-cyan) !important;
    transform: scale(1.08);
    z-index: 2;
    animation: scanPulse 0.35s ease-in-out;
}

/* Final selection custom highlight - only used for the winning box blink */
.box.custom-highlight {
    border-color: var(--anim-highlight) !important;
    box-shadow: 0 0 36px var(--anim-highlight) !important;
}

/* ── Final selection ────────────────────────────────────────── */
.box.final-select {
    animation: rarityGlow 0.9s ease-in-out infinite !important;
    z-index: 3;
    transform: scale(1.12);
}

/* ── Toggle button ─────────────────────────────────────────── */
.toggle-box {
    position: absolute;
    bottom: 4px;
    right: 4px;
    font-family: "Share Tech Mono", monospace;
    font-size: 9px;
    padding: 2px 6px;
    border-radius: 2px;
    background: rgba(0, 0, 0, 0.55);
    border: 1px solid var(--text-dim);
    color: var(--text-secondary);
    cursor: pointer;
    opacity: 0;
    transition:
        opacity 0.2s,
        background 0.2s;
    z-index: 5;
}
.box-wrapper:hover .toggle-box {
    opacity: 1;
}
.toggle-box:hover {
    background: var(--accent-red);
    color: white;
    border-color: var(--accent-red);
}
.toggle-box.is-disabled {
    background: var(--accent-red);
    color: white;
    border-color: var(--accent-red);
    opacity: 1;
}

/* ── Side Panel ─────────────────────────────────────────────── */
.side-panel {
    background: var(--bg-deep);
    border: 1px solid var(--border-glow);
    border-radius: 4px;
    padding: 20px 16px;
    position: sticky;
    top: 76px;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--border-glow) transparent;
}
.side-panel::-webkit-scrollbar {
    width: 4px;
}
.side-panel::-webkit-scrollbar-thumb {
    background: var(--border-glow);
    border-radius: 4px;
}

.side-panel h2 {
    font-family: "Orbitron", sans-serif;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--accent-cyan);
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-glow);
}
.side-panel h2::before {
    content: "◆  ";
    font-size: 9px;
    opacity: 0.7;
}

/* Prize preview cards */
.prize-preview {
    margin-bottom: 12px;
    padding: 10px;
    background: var(--bg-panel);
    border-radius: 6px;
    border-left: 3px solid var(--border-glow);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition:
        border-color 0.2s,
        box-shadow 0.2s;
}
.prize-preview[data-rarity="Legendary"] {
    border-left-color: var(--rarity-legendary);
    box-shadow: 2px 0 14px rgba(255, 200, 68, 0.18);
}
.prize-preview[data-rarity="Epic"] {
    border-left-color: var(--rarity-epic);
    box-shadow: 2px 0 12px rgba(168, 85, 247, 0.18);
}
.prize-preview[data-rarity="Rare"] {
    border-left-color: var(--rarity-rare);
    box-shadow: 2px 0 12px rgba(59, 130, 246, 0.18);
}
.prize-preview[data-rarity="Common"] {
    border-left-color: var(--rarity-common);
}

.prize-preview-media {
    width: 100%;
    display: flex;
    justify-content: center;
}
.prize-preview-media img,
.prize-preview-media video {
    max-width: 100%;
    height: 120px;
    object-fit: contain;
    border-radius: 4px;
}
.prize-preview-name {
    font-family: "Orbitron", sans-serif;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-align: center;
}
.prize-preview-rarity {
    font-size: 9px;
    color: var(--text-dim);
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* Prize Preview Modal */
.prize-preview-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(8, 5, 4, 0.84);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.prize-preview-modal--visible {
    opacity: 1;
}

.prize-preview-modal-content {
    background: var(--bg-panel);
    border-radius: 8px;
    padding: 20px;
    max-width: 80%;
    max-height: 80%;
    display: flex;
    flex-direction: column;
    position: relative;
    border: 1px solid var(--border-glow);
}

.prize-preview-modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 24px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.2s;
}

.prize-preview-modal-close:hover {
    color: var(--text-primary);
}

.prize-preview-modal-media {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    margin-bottom: 20px;
    overflow: hidden;
    border-radius: 4px;
}

.prize-preview-modal-media img,
.prize-preview-modal-media video {
    max-width: 100%;
    max-height: 400px;
    object-fit: contain;
}

.prize-preview-modal-text {
    font-family: "Orbitron", sans-serif;
    font-size: 36px;
    font-weight: 700;
    letter-spacing: 2px;
    text-align: center;
    padding: 40px 20px;
    border-radius: 8px;
    text-transform: uppercase;
}

.prize-preview-modal-info {
    text-align: center;
}

.prize-preview-modal-name {
    font-family: "Orbitron", sans-serif;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 10px;
}

.prize-preview-modal-rarity {
    font-size: 14px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* No Prize Settings */
.no-prize-item {
    margin-bottom: 12px;
    padding: 10px;
    background: var(--bg-panel);
    border-radius: 6px;
    border-left: 3px solid var(--border-glow);
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition:
        border-color 0.2s,
        box-shadow 0.2s;
}

.no-prize-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.no-prize-item-name {
    font-family: "Orbitron", sans-serif;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.8px;
}

/* ── Rarity text colours ────────────────────────────────────── */
.rarity-legendary {
    color: var(--rarity-legendary);
}
.rarity-epic {
    color: var(--rarity-epic);
}
.rarity-rare {
    color: var(--rarity-rare);
}
.rarity-common {
    color: var(--rarity-common);
}

/* ── Settings Page ─────────────────────────────────────────── */
.settings-container {
    background: var(--bg-deep);
    border: 1px solid var(--border-glow);
    border-radius: 4px;
    padding: 32px 28px;
    margin-top: 28px;
}

.settings-section h2 {
    font-family: "Orbitron", sans-serif;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--accent-cyan);
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-glow);
}
.settings-section h2::before {
    content: "▲  ";
    font-size: 10px;
}

/* Prize list */
.prize-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* Prize item card */
.prize-item {
    background: var(--bg-panel);
    border: 1px solid var(--border-subtle);
    border-left: 3px solid var(--border-glow);
    border-radius: 6px;
    padding: 16px 18px;
    transition: border-color 0.3s;
}
.prize-item[data-rarity="Legendary"] {
    border-left-color: var(--rarity-legendary);
}
.prize-item[data-rarity="Epic"] {
    border-left-color: var(--rarity-epic);
}
.prize-item[data-rarity="Rare"] {
    border-left-color: var(--rarity-rare);
}
.prize-item[data-rarity="Common"] {
    border-left-color: var(--rarity-common);
}

/* Prize item header */
.prize-item-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}
.prize-item-index {
    font-family: "Orbitron", sans-serif;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-dim);
}
.rarity-badge {
    font-family: "Orbitron", sans-serif;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 2px;
    border: 1px solid currentColor;
}
.rarity-badge.rarity-legendary {
    color: var(--rarity-legendary);
    background: rgba(255, 200, 68, 0.07);
}
.rarity-badge.rarity-epic {
    color: var(--rarity-epic);
    background: rgba(168, 85, 247, 0.07);
}
.rarity-badge.rarity-rare {
    color: var(--rarity-rare);
    background: rgba(59, 130, 246, 0.07);
}
.rarity-badge.rarity-common {
    color: var(--rarity-common);
    background: rgba(34, 197, 94, 0.07);
}

/* Prize item fields grid */
.prize-item-fields {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-end;
}

/* Field group */
.field-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 110px;
}
.field-group--color {
    min-width: 70px;
}
.field-group--narrow {
    min-width: 65px;
}
.field-group--url {
    flex: 1;
    min-width: 200px;
}

.field-group label {
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-dim);
}

/* ── Inputs & Selects ──────────────────────────────────────── */
input[type="text"],
input[type="number"],
input[type="url"],
select {
    background: var(--bg-surface);
    border: 1px solid var(--border-glow);
    border-radius: 4px;
    color: var(--text-primary);
    font-family: "Share Tech Mono", monospace;
    font-size: 13px;
    padding: 7px 10px;
    width: 100%;
    outline: none;
    transition:
        border-color 0.2s,
        box-shadow 0.2s;
}
input[type="text"]:focus,
input[type="number"]:focus,
input[type="url"]:focus,
select:focus {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 10px rgba(255, 90, 31, 0.24);
}

input[type="color"] {
    width: 48px;
    height: 34px;
    border: 1px solid var(--border-glow);
    border-radius: 4px;
    background: var(--bg-surface);
    cursor: pointer;
    padding: 2px;
}

select option {
    background: var(--bg-deep);
    color: var(--text-primary);
}

/* Delete button in settings */
.delete-btn {
    font-family: "Orbitron", sans-serif;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 1px;
    padding: 6px 12px;
    background: transparent;
    border: 1px solid var(--accent-red);
    border-radius: 3px;
    color: var(--accent-red);
    cursor: pointer;
    margin-left: auto;
    transition: all 0.2s;
}
.delete-btn:hover {
    background: rgba(239, 68, 68, 0.12);
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.35);
}

/* ── Toast Notification ────────────────────────────────────── */
.sd-toast {
    position: fixed;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: var(--bg-panel);
    border: 1px solid var(--border-bright);
    border-radius: 4px;
    color: var(--accent-gold);
    font-family: "Orbitron", sans-serif;
    font-size: 11px;
    letter-spacing: 1px;
    padding: 12px 28px;
    box-shadow: 0 0 24px rgba(255, 90, 31, 0.28);
    opacity: 0;
    transition:
        opacity 0.3s,
        transform 0.3s;
    z-index: 5000;
}
.sd-toast--error {
    border-color: rgba(239, 68, 68, 0.6);
    color: var(--accent-red);
    box-shadow: 0 0 24px rgba(239, 68, 68, 0.25);
}
.sd-toast--visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ── Utility ───────────────────────────────────────────────── */
.hidden {
    display: none !important;
}

/* ── Animations ────────────────────────────────────────────── */

@keyframes boxReveal {
    0% {
        transform: scale(0.82);
        opacity: 0;
    }
    60% {
        transform: scale(1.06);
        opacity: 1;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}
/* Final selection custom highlight */
.box.custom-highlight {
    border-color: var(--anim-highlight) !important;
    box-shadow: 0 0 36px var(--anim-highlight) !important;
}

@keyframes scanPulse {
    0% {
        box-shadow: 0 0 10px rgba(255, 90, 31, 0.42);
    }
    50% {
        box-shadow: 0 0 34px rgba(255, 132, 48, 0.95);
    }
    100% {
        box-shadow: 0 0 10px rgba(255, 90, 31, 0.42);
    }
}

@keyframes rarityGlow {
    0% {
        box-shadow: 0 0 12px var(--anim-highlight);
        border-color: var(--anim-highlight);
        transform: scale(1.08);
    }
    50% {
        box-shadow: 0 0 36px var(--anim-highlight);
        border-color: var(--anim-highlight);
        transform: scale(1.14);
    }
    100% {
        box-shadow: 0 0 12px var(--anim-highlight);
        border-color: var(--anim-highlight);
        transform: scale(1.08);
    }
}

@keyframes shuffle {
    0% {
        transform: translateX(0) translateY(0) rotate(0deg);
    }
    25% {
        transform: translateX(8px) translateY(-8px) rotate(4deg);
    }
    75% {
        transform: translateX(-8px) translateY(8px) rotate(-4deg);
    }
    100% {
        transform: translateX(0) translateY(0) rotate(0deg);
    }
}

.box.shuffle-animation {
    animation: shuffle 0.5s ease-in-out;
}

/* ── Scrollbar (global) ────────────────────────────────────── */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg-void);
}
::-webkit-scrollbar-thumb {
    background: var(--border-glow);
    border-radius: 6px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--accent-cyan-dim);
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 900px) {
    .game-layout {
        grid-template-columns: 1fr;
    }
    .side-panel {
        position: static;
        max-height: none;
        margin-top: 0;
    }
}

@media (max-width: 600px) {
    nav {
        margin: 10px;
        border-radius: 12px;
        top: 10px;
    }
    .nav-content {
        height: auto;
        padding: 12px;
        flex-direction: column;
        gap: 12px;
    }
    .nav-links {
        width: 100%;
        justify-content: center;
        gap: 8px;
    }
    .nav-link {
        padding: 6px 12px;
        font-size: 10px;
    }
    .reset-storage-btn {
        margin-left: 0;
        width: 100%;
        text-align: center;
    }
    .boxes-container {
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
    }
    .prize-item-fields {
        gap: 10px;
    }
    .field-group {
        min-width: 90px;
    }
    .field-group--url {
        min-width: 100%;
    }
}

@media (max-width: 420px) {
    .boxes-container {
        grid-template-columns: repeat(3, 1fr);
    }
}
