:root {
    --bg-dark: #0f111a;
    --panel-bg: rgba(22, 28, 45, 0.7);
    --border-color: rgba(255, 255, 255, 0.1);
    
    --primary: #f59e0b;      /* Gold/Amber */
    --primary-glow: rgba(245, 158, 11, 0.4);
    --secondary: #6366f1;    /* Indigo */
    --danger: #ef4444;       /* Red */
    --danger-glow: rgba(239, 68, 68, 0.4);
    --success: #10b981;      /* Green */
    --success-glow: rgba(16, 185, 129, 0.4);
    
    /* Tier Colors */
    --tier-wood: #8b5a2b;
    --tier-stone: #78716c;
    --tier-iron: #cbd5e1;
    --tier-gold: #fbbf24;
    --tier-diamond: #22d3ee;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    user-select: none;
    -webkit-user-select: none;
}

body {
    background-color: #050508;
    color: #f8fafc;
    font-family: 'Outfit', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow: hidden;
    margin: 0;
    padding: 0;
}

/* 9:16 Aspect Ratio Phone Simulation Frame */
#game-container {
    width: 100vw;
    height: 100vh;
    max-width: 460px;
    max-height: 820px;
    aspect-ratio: 9/16;
    background: radial-gradient(circle at center, #1b2035 0%, #0d0f1b 100%);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8), 
                0 0 40px rgba(99, 102, 241, 0.15);
    border: 4px solid #232742;
    border-radius: 24px;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Ambient Dust Particles background */
#ambient-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    opacity: 0.3;
    background-image: radial-gradient(circle, rgba(255,255,255,0.15) 1px, transparent 1px);
    background-size: 24px 24px;
}

/* FX Floating Text Layer */
#fx-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 100;
}

/* SCREENS SYSTEM */
.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 24px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s cubic-bezier(0.25, 1, 0.5, 1), transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    transform: scale(0.96);
    z-index: 5;
}

.screen.active {
    opacity: 1;
    pointer-events: all;
    transform: scale(1);
    z-index: 10;
}

/* TYPOGRAPHY */
h1.game-title {
    font-size: 3rem;
    font-weight: 800;
    text-align: center;
    line-height: 0.9;
    letter-spacing: -1px;
    margin-top: 40px;
    margin-bottom: 20px;
    text-shadow: 0 0 20px rgba(245, 158, 11, 0.3);
}

h1.game-title span.accent {
    font-family: 'Pixelify Sans', sans-serif;
    color: var(--primary);
    font-size: 3.5rem;
    display: block;
    background: linear-gradient(45deg, #f59e0b, #fbbf24);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 10px var(--primary-glow));
}

.accent {
    color: var(--primary);
}

.pixel-font {
    font-family: 'Pixelify Sans', monospace;
}

/* BUTTONS */
.btn {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 1.1rem;
    padding: 16px 28px;
    border: none;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2);
}

.btn-primary {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #0f111a;
    border-bottom: 4px solid #b45309;
}

.btn-primary:active {
    transform: translateY(2px);
    border-bottom-width: 2px;
}

.btn-secondary {
    background: rgba(99, 102, 241, 0.2);
    color: #e0e7ff;
    border: 1px solid rgba(99, 102, 241, 0.4);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(99, 102, 241, 0.35);
}

.btn-secondary:active {
    transform: scale(0.98);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    border-bottom: 4px solid #b91c1c;
    padding: 10px 18px;
    font-size: 0.9rem;
    border-radius: 12px;
}

.btn-danger:active {
    transform: translateY(2px);
    border-bottom-width: 2px;
}

.btn-pulse {
    animation: pulseGlow 2s infinite;
}

@keyframes pulseGlow {
    0% {
        box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.5);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(245, 158, 11, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(245, 158, 11, 0);
    }
}

/* MASCOT SPOTLIGHT */
.mascot-spotlight {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 20px 0;
    position: relative;
}

.avatar-wrapper {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    border: 4px solid var(--primary);
    box-shadow: 0 0 25px var(--primary-glow);
    position: relative;
    background-color: #1e293b;
    overflow: visible; /* To let the helmet stick out */
    transition: transform 0.15s ease, filter 0.3s ease;
}

.mascot-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

/* Custom CSS miner helmet overlay */
.helmet-overlay {
    position: absolute;
    top: -22px;
    left: 50%;
    transform: translateX(-50%);
    width: 90px;
    height: 38px;
    background: linear-gradient(180deg, #facc15, #ca8a04);
    border-radius: 40px 40px 10px 10px;
    box-shadow: 0 -3px 0 #854d0e inset;
    pointer-events: none;
    z-index: 5;
}

.helmet-overlay::before {
    /* Helmet Brim */
    content: '';
    position: absolute;
    bottom: -2px;
    left: -12%;
    width: 124%;
    height: 8px;
    background: #eab308;
    border-radius: 10px;
    box-shadow: 0 2px 2px rgba(0,0,0,0.3);
}

.helmet-overlay::after {
    /* Headlamp */
    content: '';
    position: absolute;
    top: 5px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 20px;
    background: #ffffff;
    border: 3px solid #ca8a04;
    border-radius: 50%;
    box-shadow: 0 0 15px #ffffff, 0 0 30px #facc15;
    animation: headlampFlicker 4s infinite alternate;
}

@keyframes headlampFlicker {
    0%, 90%, 100% { opacity: 1; box-shadow: 0 0 15px #ffffff, 0 0 30px #facc15; }
    93%, 97% { opacity: 0.7; box-shadow: 0 0 5px #ffffff, 0 0 10px #facc15; }
    95% { opacity: 0.9; box-shadow: 0 0 10px #ffffff, 0 0 20px #facc15; }
}

.small-avatar {
    width: 65px;
    height: 65px;
    border-width: 2.5px;
}

.small-helmet {
    top: -11px;
    width: 44px;
    height: 18px;
}

.small-helmet::before {
    height: 4px;
    bottom: -1px;
}

.small-helmet::after {
    width: 10px;
    height: 10px;
    border-width: 1.5px;
    top: 2px;
}

/* Mascot dialogue bubble */
.mascot-welcome-bubble {
    background: var(--panel-bg);
    border: 1px solid var(--border-color);
    padding: 12px 18px;
    border-radius: 16px;
    margin-top: 18px;
    max-width: 80%;
    text-align: center;
    font-size: 0.95rem;
    line-height: 1.4;
    position: relative;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
}

.mascot-welcome-bubble::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 0 8px 8px 8px;
    border-style: solid;
    border-color: transparent transparent var(--panel-bg) transparent;
}

.error-bubble {
    border-color: rgba(239, 68, 68, 0.3);
}

.error-bubble::before {
    border-color: transparent transparent rgba(239, 68, 68, 0.2) transparent;
}

/* MENU BUTTONS & HOW-TO-PLAY */
.menu-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
    z-index: 10;
}

.how-to-play {
    background: rgba(15, 17, 26, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 16px;
    margin-top: auto;
}

.how-to-play h3 {
    font-size: 1rem;
    font-weight: 800;
    margin-bottom: 12px;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.htp-steps {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.htp-step {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.step-num {
    background: var(--secondary);
    color: white;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    font-weight: 800;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.htp-step p {
    font-size: 0.82rem;
    color: #94a3b8;
    line-height: 1.35;
}

/* SETTINGS SCREEN */
#settings-screen h2 {
    font-size: 2.2rem;
    font-weight: 800;
    text-align: center;
    margin-top: 30px;
    margin-bottom: 40px;
    letter-spacing: 2px;
    background: linear-gradient(90deg, #fff, #6366f1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.settings-group {
    margin-bottom: 28px;
}

.settings-group label {
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    color: #94a3b8;
    display: block;
    margin-bottom: 12px;
    letter-spacing: 1px;
}

.lang-selector {
    display: flex;
    gap: 8px;
}

.lang-btn {
    flex: 1;
    background: rgba(22, 28, 45, 0.8);
    border: 1px solid var(--border-color);
    color: #94a3b8;
    font-size: 1rem;
    font-weight: 700;
    padding: 14px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.lang-btn.active {
    background: var(--secondary);
    color: white;
    border-color: var(--secondary);
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.4);
}

/* Custom range sliders */
.slider-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(22, 28, 45, 0.6);
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.volume-icon {
    font-size: 1.2rem;
}

.slider-wrapper input[type="range"] {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    border-radius: 3px;
    background: #334155;
    outline: none;
}

.slider-wrapper input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    box-shadow: 0 0 8px var(--primary-glow);
    transition: transform 0.1s ease;
}

.slider-wrapper input[type="range"]::-webkit-slider-thumb:active {
    transform: scale(1.2);
}

.slider-value {
    width: 48px;
    text-align: right;
    font-size: 0.9rem;
    font-family: 'Pixelify Sans', monospace;
    font-weight: 700;
    color: var(--primary);
}

/* GAMEPLAY HUD */
.hud {
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 10;
    margin-bottom: 8px;
}

.hud-left, .hud-right {
    flex: 1;
}

.hud-right {
    text-align: right;
}

.hud-label {
    font-size: 0.75rem;
    font-weight: 800;
    color: #64748b;
    letter-spacing: 1px;
    margin-bottom: 2px;
    text-transform: uppercase;
}

#score-display, #time-display {
    font-family: 'Pixelify Sans', sans-serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: white;
    text-shadow: 0 0 10px rgba(255,255,255,0.1);
}

#time-display {
    color: var(--primary);
}

.icon-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 1.2rem;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.icon-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: rotate(30deg);
}

/* HUD Progress Bar */
.time-bar-container {
    width: 100%;
    height: 6px;
    background: rgba(255,255,255,0.06);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 12px;
    z-index: 10;
}

#time-bar {
    height: 100%;
    width: 100%;
    background: linear-gradient(90deg, var(--success), #34d399);
    border-radius: 3px;
    transition: width 0.1s linear, background-color 0.3s ease;
}

/* ACTIVE ORDER SECTION */
.order-container {
    background: var(--panel-bg);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    padding: 10px 14px;
    backdrop-filter: blur(10px);
    z-index: 10;
    margin-bottom: 10px;
    box-shadow: 0 6px 15px -3px rgba(0, 0, 0, 0.2);
}

.order-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 1px;
    margin-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 4px;
}

#lbl-order {
    color: #94a3b8;
}

#active-order-name {
    font-family: 'Pixelify Sans', monospace;
    font-weight: 700;
    text-shadow: 0 0 8px var(--primary-glow);
}

.order-row-content {
    display: flex;
    align-items: center;
    justify-content: space-around;
    gap: 8px;
}

.pickaxe-preview-wrapper {
    width: 60px;
    height: 60px;
    background: rgba(15, 17, 26, 0.5);
    border-radius: 12px;
    border: 1px dashed rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Pickaxe types */
.pickaxe-preview-wrapper div {
    font-size: 2.2rem;
    filter: drop-shadow(0 0 5px rgba(255,255,255,0.2));
    animation: float 2s ease-in-out infinite alternate;
}

@keyframes float {
    0% { transform: translateY(-3px) rotate(-5deg); }
    100% { transform: translateY(3px) rotate(5deg); }
}

.recipe-helper {
    flex-shrink: 0;
}

.recipe-grid-mini {
    display: grid;
    grid-template-columns: repeat(3, 20px);
    grid-template-rows: repeat(3, 20px);
    gap: 3px;
    background: rgba(15, 17, 26, 0.8);
    padding: 4px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.mini-slot {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    color: white;
}

/* PLAY AREA (FALLING items) */
#play-area {
    flex: 1;
    position: relative;
    border-radius: 18px;
    background: rgba(15, 17, 26, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.03);
    margin-bottom: 12px;
    z-index: 5;
    overflow: visible;
}

/* Falling Resource Items */
.falling-item {
    position: absolute;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    background: rgba(30, 41, 59, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3), 
                inset 0 1px 1px rgba(255, 255, 255, 0.2);
    cursor: grab;
    touch-action: none;
    z-index: 20;
    transition: transform 0.05s ease;
}

.falling-item:active {
    cursor: grabbing;
    transform: scale(1.1);
}

/* Glowing frames based on item type */
.falling-item.item-wood { border-color: var(--tier-wood); box-shadow: 0 0 8px rgba(139, 90, 43, 0.3); }
.falling-item.item-stone { border-color: var(--tier-stone); box-shadow: 0 0 8px rgba(120, 113, 110, 0.3); }
.falling-item.item-iron { border-color: var(--tier-iron); box-shadow: 0 0 10px rgba(203, 213, 225, 0.4); }
.falling-item.item-gold { border-color: var(--tier-gold); box-shadow: 0 0 12px rgba(251, 191, 36, 0.5); }
.falling-item.item-diamond { border-color: var(--tier-diamond); box-shadow: 0 0 15px rgba(34, 211, 238, 0.6); }
.falling-item.item-stick { border-color: #fca5a5; }

/* Dynamite Hazards */
.falling-item.item-dynamite {
    background: radial-gradient(circle at center, #ef4444 0%, #7f1d1d 100%);
    border-color: #f87171;
    box-shadow: 0 0 12px var(--danger-glow);
    animation: fuseFlicker 0.4s infinite alternate;
}

@keyframes fuseFlicker {
    0% { box-shadow: 0 0 8px var(--danger-glow); }
    100% { box-shadow: 0 0 18px rgba(239, 68, 68, 0.8); }
}

/* CRAFTING BOARD (3x3 grid) */
.crafting-board {
    background: var(--panel-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 16px;
    backdrop-filter: blur(10px);
    z-index: 10;
    margin-bottom: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.2);
}

.crafting-grid {
    display: grid;
    grid-template-columns: repeat(3, 76px);
    grid-template-rows: repeat(3, 76px);
    gap: 8px;
    background: rgba(15, 17, 26, 0.85);
    padding: 10px;
    border-radius: 16px;
    border: 2px solid #232742;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.6);
}

.grid-slot {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    border: 2px dashed rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.1rem;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease, border-color 0.1s ease;
}

.grid-slot:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(99, 102, 241, 0.3);
}

/* Slot highlighted when hover during drag */
.grid-slot.drag-over {
    background: rgba(99, 102, 241, 0.15);
    border-color: var(--secondary);
    border-style: solid;
    transform: scale(1.03);
}

/* Filled slot styling */
.grid-slot.filled {
    background: rgba(30, 41, 59, 0.9);
    border-style: solid;
    border-color: rgba(255,255,255,0.15);
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.1);
    animation: placeInGrid 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes placeInGrid {
    0% { transform: scale(0.85); opacity: 0.7; }
    100% { transform: scale(1); opacity: 1; }
}

.grid-actions {
    width: 100%;
    display: flex;
    justify-content: flex-end;
}

/* MASCOT GAMEPLAY FOOTER */
.game-footer {
    z-index: 10;
    margin-top: auto;
    padding: 0 4px;
}

.mascot-row {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(15, 17, 26, 0.5);
    padding: 8px 12px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.speech-bubble {
    flex: 1;
    background: rgba(255, 255, 255, 0.07);
    border-radius: 12px;
    padding: 8px 12px;
    font-size: 0.78rem;
    line-height: 1.35;
    color: #cbd5e1;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.speech-bubble::before {
    content: '';
    position: absolute;
    left: -6px;
    top: 50%;
    transform: translateY(-50%);
    border-width: 6px 6px 6px 0;
    border-style: solid;
    border-color: transparent rgba(255, 255, 255, 0.07) transparent transparent;
}

/* STATS BOX (GAME OVER) */
.stats-box {
    background: var(--panel-bg);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    padding: 16px;
    width: 100%;
    margin-bottom: 24px;
    backdrop-filter: blur(10px);
}

.stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.stat-row:last-child {
    border-bottom: none;
}

.stat-row span:first-child {
    font-size: 0.9rem;
    font-weight: 600;
    color: #94a3b8;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.stat-row span:last-child {
    font-size: 1.4rem;
    font-weight: 700;
}

/* ANIMATION UTILITIES */
.shake {
    animation: shakeAnim 0.3s infinite;
}

@keyframes shakeAnim {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    20% { transform: translate(-2px, 1px) rotate(-1deg); }
    40% { transform: translate(1px, -1px) rotate(1deg); }
    60% { transform: translate(-1px, 2px) rotate(0deg); }
    80% { transform: translate(2px, 1px) rotate(1deg); }
}

.charred {
    filter: brightness(55%) contrast(1.3) grayscale(0.2) sepia(0.4) saturate(0.8) !important;
    border-color: #ef4444 !important;
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.6) !important;
}

.charred-transition {
    transition: filter 0.2s ease;
}

.success-bounce {
    animation: bounceAnim 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes bounceAnim {
    0%, 100% { transform: scale(1); }
    40% { transform: scale(1.15) translateY(-8px); }
    70% { transform: scale(0.95) translateY(2px); }
}

/* Floating HUD Score alert */
.floating-alert {
    position: absolute;
    font-family: 'Pixelify Sans', monospace;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--success);
    pointer-events: none;
    z-index: 120;
    animation: floatUpFade 1.2s cubic-bezier(0.25, 1, 0.5, 1) forwards;
    text-shadow: 0 2px 8px rgba(16, 185, 129, 0.5);
}

.floating-alert.red-alert {
    color: var(--danger);
    text-shadow: 0 2px 8px rgba(239, 68, 68, 0.5);
}

@keyframes floatUpFade {
    0% { transform: translateY(0); opacity: 0; }
    15% { opacity: 1; }
    100% { transform: translateY(-50px); opacity: 0; }
}

/* Touch drag ghost overlay helper */
.drag-ghost {
    position: absolute;
    pointer-events: none;
    z-index: 999;
    opacity: 0.8;
    transform: scale(1.1);
}

/* Custom SVG Icon Styling & Floor Mechanics */
.falling-item svg, .grid-slot svg, .mini-slot svg, #pickaxe-preview svg {
    width: 100%;
    height: 100%;
    display: block;
}

.falling-item {
    padding: 6px;
}

.grid-slot {
    padding: 10px;
}

.mini-slot {
    padding: 2px;
}

/* Floor Landing State */
.falling-item.on-floor {
    opacity: 0.9;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
    animation: blinkFloor 1s infinite alternate;
}

@keyframes blinkFloor {
    0% { opacity: 0.9; transform: scale(1); }
    100% { opacity: 0.4; transform: scale(0.95); }
}

/* Pop-in spawn animation for crafted items */
@keyframes popSpawnAnim {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    60% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
        opacity: 0.9;
    }
}

.falling-item.pop-spawn {
    animation: popSpawnAnim 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}


