/* =========================================
   SEASONAL WEATHER EFFECTS
   ========================================= */

/* ❄️ UPGRADED SNOWSTORM (Pure CSS Parallax) */
.weather-snow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60'%3E%3Ccircle cx='15' cy='15' r='2.5' fill='white' opacity='0.9'/%3E%3Ccircle cx='45' cy='45' r='1.5' fill='white' opacity='0.6'/%3E%3C/svg%3E");
    background-color: rgba(255, 255, 255, 0.1); /* Slight white haze */
    animation: snowFall 2.5s linear infinite;
    z-index: 9999;
    pointer-events: none;
}

/* Ensure the animation has enough "room" to tile */
@keyframes snowFall {
    0% { background-position: 0px 0px; }
    100% { background-position: 60px 200px; } 
}

/* 🔥 UPGRADED HEAT WAVE (Soft Mirage) */
.weather-heat {
    background-image: linear-gradient(
        0deg,
        rgba(255, 140, 0, 0.0) 0%,
        rgba(255, 80, 0, 0.15) 50%,
        rgba(255, 140, 0, 0.0) 100%
    );
    background-size: 100% 200%;
    background-color: rgba(255, 140, 0, 0.08); /* Soft ambient heat */
    animation: heatRise 3s linear infinite;
    z-index: 9999;
    pointer-events: none;
}

@keyframes heatRise {
    0% { background-position: 0% 200%; }
    100% { background-position: 0% 0%; } /* Rolls smoothly upwards */
}
/* 🎆 FIREWORKS PARTICLE */
.firework-burst {
    position: absolute;
    width: 5px; height: 5px;
    border-radius: 50%;
    animation: explode 0.8s ease-out forwards;
    pointer-events: none;
    z-index: 10000;
    mix-blend-mode: screen;
}
@keyframes explode {
    0% { transform: scale(0.1); opacity: 1; }
    50% { transform: scale(3); opacity: 0.8; }
    100% { transform: scale(6); opacity: 0; }
}
.weather-overlay {
    position: absolute; 
    top: 0; left: 0; right: 0; bottom: 0;
    pointer-events: none; /* CRITICAL: Lets you click through it! */
    z-index: 9999; /* Keeps it above the junk, but below the dragged item */
}

.weather-frost {
    box-shadow: inset 0 0 100px rgba(255,255,255,0.8), inset 0 0 40px rgba(173,216,230,0.6);
    background: radial-gradient(circle, transparent 40%, rgba(255,255,255,0.15) 100%);
}


/* =========================================
   SPECIAL ANIMATIONS & EFFECTS
   ========================================= */
@keyframes pulseGlow {
    0% { filter: drop-shadow(0 0 5px #f1c40f) brightness(1.1); }
    100% { filter: drop-shadow(0 0 20px #f39c12) brightness(1.4); }
}
@keyframes neuralyzerFlash {
    0% { opacity: 0; background: white; }
    10% { opacity: 1; background: red; }
    100% { opacity: 0; background: red; }
}
.flash-red {
    display: block !important;
    animation: neuralyzerFlash 2s forwards;
}
/* 🛸 ALIEN ABDUCTION ANIMATION */
@keyframes tractorBeamLift {
    0% { transform: translateY(0) scale(1); opacity: 1; filter: drop-shadow(0 0 10px #7ed6df) brightness(1.5); }
    10% { transform: translateY(-10px) scale(1.05); filter: drop-shadow(0 0 20px #7ed6df) brightness(2); }
    100% { transform: translateY(-300px) scale(0.2); opacity: 0; filter: drop-shadow(0 0 50px #7ed6df) brightness(4); }
}
/* 💥 EXPLOSION ANIMATION */
@keyframes nukeFlash {
    0% { background: transparent; opacity: 0; }
    5% { background: white; opacity: 1; }
    20% { background: #ff9f43; opacity: 1; }
    100% { background: black; opacity: 1; }
}
.flash-nuke {
    display: block !important;
    animation: nukeFlash 4s forwards !important;
    pointer-events: all !important; /* Blocks the player from clicking things during the explosion */
}

.abduct-item {
    animation: tractorBeamLift 1.5s forwards ease-in !important;
    pointer-events: none;
}
.tutorial-glow {
    animation: pulseGlow 1s infinite alternate !important;
    z-index: 10000;
}

@keyframes quake {
    0% { transform: translate(2px, 1px) rotate(0deg); }
    20% { transform: translate(-3px, 0px) rotate(1deg); }
    40% { transform: translate(1px, -1px) rotate(1deg); }
    60% { transform: translate(-3px, 1px) rotate(0deg); }
    80% { transform: translate(-1px, -1px) rotate(1deg); }
    100% { transform: translate(1px, -2px) rotate(-1deg); }
}
.earthquake-shake { animation: quake 0.4s infinite; }

@keyframes shake { 
    0% { transform: translate(1px, 1px) rotate(0deg); } 
    25% { transform: translate(-1px, -2px) rotate(-1deg); } 
    50% { transform: translate(-3px, 0px) rotate(1deg); } 
    75% { transform: translate(3px, 2px) rotate(0deg); } 
    100% { transform: translate(1px, -1px) rotate(0deg); } 
}

/* =========================================
   1. GLOBAL STYLES & TYPOGRAPHY
   ========================================= */
body { 
    margin: 0; 
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; 
    background: #2c3e50; 
    color: white; 
    overflow: hidden; /* Prevents scrollbars from breaking the 2D view */
    user-select: none; /* Prevents accidentally highlighting text while clicking fast */
}

#game-container { 
    display: flex; 
    flex-direction: column; 
    height: 100vh; 
}

button { 
    cursor: pointer; 
    padding: 8px 15px; 
    background: #3498db; 
    color: white; 
    border: none; 
    border-radius: 5px; 
    font-weight: bold; 
    transition: background-color 0.2s, transform 0.1s; 
}

button:hover { background: #2980b9; transform: scale(1.02); }
button:active { transform: scale(0.95); }

/* Grayed out buttons */
.action-btn:disabled {
    background: #7f8c8d !important;
    color: #bdc3c7;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none;
}

/* =========================================
   2. TOP UI BAR & ROOM TABS
   ========================================= */
#top-bar { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    background: #1a252f; 
    padding: 10px 20px; 
    box-shadow: 0 2px 5px rgba(0,0,0,0.5); 
    z-index: 1000; 
}

.stat { font-size: 1.2rem; font-weight: bold; color: #f1c40f; }

#room-tabs {
    display: flex;
    background: #34495e;
    overflow-x: auto;
    overflow-y: hidden;
    border-bottom: 3px solid #f1c40f;
    scrollbar-width: none; /* Firefox: hides scrollbar */
}

/* WebKit/Chrome: hides the horizontal scrollbar visually but still lets you swipe/scroll */
#room-tabs::-webkit-scrollbar {
    display: none; 
}

.room-tab {
    flex: 1;
    padding: 12px 15px;
    background: #2c3e50;
    color: #bdc3c7;
    border: none;
    border-right: 1px solid #1a252f;
    cursor: pointer;
    font-weight: bold;
    transition: 0.2s;
    white-space: nowrap; /* Forces names like "Living Room" to stay on one line! */
    display: flex;
    align-items: center;
    justify-content: center;
}

.room-tab.active {
    background: #f1c40f;
    color: #2c3e50;
}

.room-tab:hover:not(.active) {
    background: #3b536a;
}

/* =========================================
   3. THE 2D GARAGE AREA & ITEMS
   ========================================= */
#garage-area { 
    flex-grow: 1; 
    position: relative; 
    z-index: 1; 
    background-color: #bdc3c7; 
    background-size: cover;      
    background-position: center; 
    overflow: visible; 
    border-bottom: 5px solid #1a252f; 
    cursor: crosshair; 
}

.junk-item { 
    position: absolute; 
    border: 2px solid #2c3e50; 
    border-radius: 4px; 
    padding: 10px; 
    font-size: 0.9rem; 
    font-weight: bold; 
    text-align: center;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.4); 
    transition: transform 0.1s, outline 0.1s, filter 0.3s ease; 
    cursor: pointer;
    color: white;
    text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000, 0px 2px 2px rgba(0,0,0,0.8);
    
    /* Image handling for items */
    background-size: contain;      
    background-repeat: no-repeat;  
    background-position: center;   
    background-blend-mode: multiply; 
}

.has-art {
    border: none !important;
    box-shadow: none !important;
    background-color: transparent !important;
}

/* Dynamic Hover Outlines based on Layer Depth */
.junk-item.outline-safe:hover { outline: 3px solid white; transform: scale(1.05); }
.junk-item.outline-warn:hover { outline: 3px solid #f1c40f; transform: scale(1.05); }
.junk-item.outline-danger:hover { 
    outline: 3px solid #e74c3c; 
    transform: scale(1.05); 
    cursor: not-allowed; /* 🛑 NEW: Changes the mouse pointer to a slashed circle! */
}

/* The Broken Hash Overlay */
.broken-hashes {
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: repeating-linear-gradient(45deg, rgba(0,0,0,0.1), rgba(0,0,0,0.1) 5px, rgba(0,0,0,0.6) 5px, rgba(0,0,0,0.6) 10px);
    pointer-events: none; /* Lets clicks pass through to the image underneath */
    border-radius: inherit;
}

/* The Hover Tooltip */
#hover-tooltip {
    display: none; position: absolute; background: rgba(0, 0, 0, 0.9); color: white;
    padding: 8px 12px; border-radius: 5px; font-weight: bold; font-size: 0.9rem;
    pointer-events: none; z-index: 10000; border: 2px solid #f1c40f; text-align: center;
}

/* ITEM SHAPES */
.shape-circle { 
    border-radius: 50% !important; 
    display: flex; align-items: center; justify-content: center; 
}
.shape-pill { 
    border-radius: 50px !important; 
    display: flex; align-items: center; justify-content: center; 
}
.shape-blob { 
    border-radius: 40% 70% 60% 40% / 50% 40% 60% 50% !important; 
    display: flex; align-items: center; justify-content: center; 
}
/* Add to style.css */
.bin-buffed { border-color: #2ecc71 !important; box-shadow: inset 0 0 15px rgba(46, 204, 113, 0.3) !important; }
.bin-nerfed { background: #7f8c8d !important; opacity: 0.7; pointer-events: none; }

/* =========================================
   4. BOTTOM INVENTORY BINS
   ========================================= */
#bottom-bar { 
    display: flex; 
    justify-content: space-around; 
    background: #34495e; 
    padding: 15px; 
    position: relative;
    z-index: 1000; 
}
.bin { 
    background: #ecf0f1; 
    color: #2c3e50; 
    padding: 15px; 
    border-radius: 5px; 
    width: 18%; 
    text-align: center; 
    font-weight: bold; 
    box-shadow: inset 0 0 10px rgba(0,0,0,0.2); 
    border: 2px solid #2c3e50; 
    cursor: pointer; 
    transition: transform 0.1s, border-color 0.1s; 
}

.bin:hover { transform: scale(1.05); border-color: #f1c40f; }

/* Hover highlight for bins during drag & drop */
.bin.bin-hover {
    transform: scale(1.1) !important;
    border-color: #2ecc71 !important;
    box-shadow: 0 0 20px rgba(46, 204, 113, 0.6) inset, 0 0 10px rgba(46, 204, 113, 0.8) !important;
    background: #fff !important;
}
.bin span { display: block; font-size: 1.5rem; color: #e74c3c; margin-top: 5px; }

/* =========================================
   5. MODALS & POP-UPS
   ========================================= */

/* Action / Context Menu */
#action-menu { 
    display: none; 
    position: absolute; 
    background: rgba(255, 255, 255, 0.95); 
    color: black; 
    border: 3px solid #2c3e50; 
    border-radius: 8px; 
    padding: 15px; 
    z-index: 2000; 
    box-shadow: 0 5px 15px rgba(0,0,0,0.5); 
    min-width: 160px; 
}

#action-menu h3 { margin: 0 0 5px 0; font-size: 1.1rem; }
#action-menu p { margin: 0 0 10px 0; font-size: 0.85rem; font-weight: bold; }
.action-btn { display: block; width: 100%; margin-bottom: 5px; background: #2ecc71; }
.action-btn.cancel { background: #e74c3c; }

/* Custom Alert Modals */
#custom-alert-modal {
    display: none; position: absolute; top: 0; left: 0; width: 100%; height: 100%; 
    background: rgba(0, 0, 0, 0.8); z-index: 9999; 
    align-items: center; justify-content: center;
}
#custom-alert-box {
    background: #ecf0f1; color: #2c3e50; padding: 20px; border-radius: 8px; 
    width: 350px; text-align: center; box-shadow: 0 5px 20px rgba(0,0,0,0.8);
    border: 3px solid #34495e;
    max-height: 80vh; /* Prevents it from going off-screen */
    display: flex; flex-direction: column; 
}
#custom-alert-msg { 
    font-size: 1.1rem; font-weight: bold; margin-bottom: 20px; white-space: pre-wrap; 
    overflow-y: auto; /* Allows long text to scroll */
    padding-right: 10px;
    text-align: left; /* Makes lists easier to read */
}
/* Risk Indicator Colors */
.risk-safe { color: #27ae60; }
.risk-warn { color: #d35400; }
.risk-danger { color: #c0392b; animation: shake 0.5s infinite; }

/* Full Screen Generic Modals */
.modal-overlay {
    display: none; 
    position: absolute; 
    top: 50%; left: 50%; transform: translate(-50%, -50%); 
    background: white; color: black; 
    border: 4px solid #1a252f; border-radius: 10px; 
    padding: 20px; width: 350px; max-height: 80vh; 
    overflow-y: auto; 
    z-index: 8000; /* 🛑 FIX: Elevated to 8000 so it sits above the Top Bar! */
    box-shadow: 0 10px 30px rgba(0,0,0,0.8);
}

.modal-item { background: #f8f9fa; border: 1px solid #ccc; padding: 10px; margin-bottom: 10px; border-radius: 5px; }

/* Dark Theme for Inventory Review Modal */
#inventory-modal { background: #2c3e50; color: white; border-color: #f1c40f; width: 400px; }
.inv-list-item { background: #34495e; border: 1px solid #1a252f; padding: 10px; margin-bottom: 10px; border-radius: 5px; display: flex; justify-content: space-between; align-items: center; }

/* Supply Catalog Styling */
.catalog-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 25px; }
.catalog-btn { background: #4a90e2; color: white; padding: 15px 10px; border-radius: 8px; border: none; font-size: 0.95rem; display: flex; flex-direction: column; align-items: center; text-align: center; cursor: pointer; transition: 0.2s; box-shadow: 0 4px 6px rgba(0,0,0,0.2); }
.catalog-btn:hover { background: #357abd; transform: translateY(-2px); }
.catalog-btn small { opacity: 0.9; margin: 5px 0; line-height: 1.2; font-size: 0.8rem;}
.catalog-btn b { font-size: 1.2rem; color: #fff; background: rgba(0,0,0,0.2); padding: 4px 12px; border-radius: 20px; margin-top: 5px; }

.catalog-sub-btn { width: 100%; background: #34495e; color: white; padding: 15px; margin-bottom: 10px; border-radius: 6px; border: none; font-size: 1rem; font-weight: bold; cursor: pointer; transition: 0.2s; }
.catalog-sub-btn:hover { background: #2c3e50; border-left: 6px solid #f1c40f; }

/* Wiki / Guide Modal */
#wiki-modal {
    display: none; 
    position: absolute; 
    top: 0; left: 0; width: 100%; height: 100%; 
    background: rgba(0, 0, 0, 0.85); 
    z-index: 9000; 
    align-items: center; justify-content: center;
}

#wiki-paper {
    background: #fdf6e3; 
    color: #2c3e50; 
    padding: 30px; 
    border-radius: 5px; 
    width: 90%; 
    max-width: 800px; 
    max-height: 85vh; 
    overflow-y: auto; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.8); 
    font-family: 'Georgia', serif; 
    line-height: 1.5;
}

#wiki-paper h2 { color: #c0392b; border-bottom: 2px solid #2c3e50; padding-bottom: 5px; margin-top: 25px;}
#wiki-paper h3 { color: #2980b9; margin-top: 20px;}
#wiki-paper ul { background: rgba(0,0,0,0.05); padding: 15px 15px 15px 35px; border-radius: 5px; }
#wiki-paper li { margin-bottom: 8px; }
#wiki-paper table { width: 100%; border-collapse: collapse; margin: 15px 0; background: white; }
#wiki-paper th, #wiki-paper td { border: 1px solid #bdc3c7; padding: 10px; text-align: left; font-family: 'Segoe UI', sans-serif;}
#wiki-paper th { background: #34495e; color: white; }

.spoiler-box {
    background: #e74c3c;
    color: white;
    padding: 15px;
    border-radius: 5px;
    text-align: center;
    font-family: 'Segoe UI', sans-serif;
    box-shadow: 0 4px 10px rgba(231, 76, 60, 0.4);
    margin-bottom: 20px;
}
/* Wiki Tab Buttons */
.wiki-tab {
    background: #34495e;
    color: white;
    padding: 10px 15px;
    border-radius: 5px;
    border: none;
    font-weight: bold;
    cursor: pointer;
    transition: 0.2s;
    font-size: 0.95rem;
}
.wiki-tab:hover { background: #2c3e50; }
.wiki-tab.active { background: #8e44ad; color: white; box-shadow: inset 0 0 10px rgba(0,0,0,0.5); }

/* Tutorial / Realtor Letter */
#tutorial-modal {
    display: flex; 
    position: absolute; 
    top: 0; left: 0; width: 100%; height: 100%; 
    background: rgba(0, 0, 0, 0.85); 
    z-index: 5000; 
    align-items: center; justify-content: center;
}

#tutorial-paper {
    background: #fdf6e3; 
    color: #2c3e50; 
    padding: 40px; 
    border-radius: 5px; 
    max-width: 550px; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.8); 
    font-family: 'Georgia', serif; 
    position: relative;
}

#tutorial-paper h1 { 
    margin-top: 0; 
    border-bottom: 2px solid #2c3e50; 
    padding-bottom: 10px; 
    color: #c0392b;
}

#tutorial-paper ul { 
    background: rgba(0,0,0,0.05); 
    padding: 15px 15px 15px 35px; 
    border-radius: 5px;
}

#tutorial-paper li { margin-bottom: 8px; }

/* Mid-Week Event Modal */
#event-modal {
    display: none; 
    position: absolute; 
    top: 0; left: 0; width: 100%; height: 100%; 
    background: rgba(0, 0, 0, 0.7); 
    z-index: 4500; 
    align-items: center; justify-content: center;
}

#event-paper {
    background: #ecf0f1; 
    color: #2c3e50; 
    padding: 25px; 
    border-radius: 8px; 
    width: 400px; 
    box-shadow: 0 5px 20px rgba(0,0,0,0.8); 
    text-align: center;
}

.event-btn { 
    margin: 5px; 
    font-size: 1.1rem; 
    padding: 10px; 
}

/* =========================================
   6. GARAGE SALE MINI-GAME UI
   ========================================= */
#garage-sale-ui { 
    display: none; 
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; 
    background: rgba(39, 174, 96, 0.95); 
    z-index: 4000; 
    flex-direction: column; align-items: center; justify-content: center; 
}

#sale-item-panel { 
    background: white; color: black; padding: 20px; 
    border-radius: 10px; width: 400px; text-align: center; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.5); 
}

/* =========================================
   7. APPRAISAL / END GAME SCREEN
   ========================================= */
#appraisal-modal {
    display: none; 
    position: absolute; 
    top: 0; left: 0; width: 100%; height: 100%; 
    background: rgba(44, 62, 80, 0.95); 
    z-index: 6000; 
    flex-direction: column; align-items: center; justify-content: center;
}

#appraisal-paper {
    background: white; 
    color: black; 
    padding: 30px; 
    border-radius: 8px; 
    width: 450px; 
    max-height: 90vh;     
    overflow-y: auto;      
    box-shadow: 0 10px 30px rgba(0,0,0,0.8); 
    font-family: 'Courier New', Courier, monospace; 
}

.receipt-line {
    display: flex; 
    justify-content: space-between; 
    margin-bottom: 8px;
    font-weight: bold;
    font-size: 1.1rem;
}

.receipt-sub {
    font-size: 0.9rem;
    color: #555;
    display: flex; 
    justify-content: space-between; 
    margin-bottom: 4px;
    padding-left: 15px;
}

.receipt-total {
    font-size: 1.4rem;
    color: #27ae60;
    border-top: 2px dashed #000;
    padding-top: 10px;
    margin-top: 10px;
}

.penalty { color: #c0392b; }

/* =========================================
   8. 3D RADIAL MENU
   ========================================= */
#radial-menu {
    display: none; position: absolute; width: 150px; height: 150px;
    border-radius: 50%; background: rgba(44, 62, 80, 0.5);
    transform: translate(-50%, -50%); z-index: 10000; 
    pointer-events: none; /* Let mouse events pass through to JS! */
}

.radial-slice {
    position: absolute; width: 50px; height: 50px;
    border-radius: 50%; background: #34495e; color: white;
    display: flex; align-items: center; justify-content: center;
    font-weight: bold; font-size: 0.8rem; border: 2px solid #2c3e50;
    transition: transform 0.1s, background 0.1s;
    text-shadow: 1px 1px 2px black;
}

.radial-slice.active {
    transform: scale(1.3); background: #f1c40f; color: #2c3e50;
    border-color: #fff; z-index: 10;
}
/* =========================================
   UNIVERSAL CLOSE "X" BUTTON
   ========================================= */
.close-x-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    background: transparent;
    color: #e74c3c;
    font-size: 1.5rem;
    border: none;
    font-weight: bold;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: transform 0.2s, color 0.2s;
    z-index: 100;
}
.close-x-btn:hover {
    color: #c0392b;
    transform: scale(1.2);
}

/* =========================================
   OVERHAULED SUPPLY CATALOG
   ========================================= */
.catalog-section-title { 
    margin: 15px 0 10px 0; 
    font-size: 1.1rem; 
    color: #2980b9; 
    border-bottom: 2px solid #ecf0f1; 
    padding-bottom: 5px; 
    text-transform: uppercase; 
    letter-spacing: 1px; 
}
.catalog-grid-new { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 10px; 
    margin-bottom: 15px; 
}
.catalog-item { 
    display: flex; 
    align-items: center; 
    background: #f8f9fa; 
    border: 1px solid #bdc3c7; 
    border-radius: 6px; 
    padding: 8px; 
    transition: 0.2s; 
}
.catalog-item:hover { 
    border-color: #3498db; 
    box-shadow: 0 2px 8px rgba(0,0,0,0.1); 
}
.cat-icon { 
    font-size: 1.8rem; 
    margin-right: 10px; 
    min-width: 35px; 
    text-align: center; 
}
.cat-info { 
    flex-grow: 1; 
    display: flex; 
    flex-direction: column; 
    text-align: left;
}
.cat-info strong { font-size: 0.95rem; color: #2c3e50; }
.cat-info small { font-size: 0.75rem; color: #7f8c8d; line-height: 1.1; margin-top: 2px;}
.cat-buy-btn { 
    background: #27ae60; 
    color: white; 
    border: none; 
    padding: 6px 12px; 
    border-radius: 4px; 
    font-weight: bold; 
    cursor: pointer; 
    transition: 0.2s; 
    min-width: 55px; 
}
.cat-buy-btn:hover { background: #2ecc71; transform: scale(1.05); }

/* Subscription Styles */
.catalog-sub-item { 
    display: flex; 
    align-items: center; 
    justify-content: space-between; 
    background: #34495e; 
    color: white; 
    padding: 12px; 
    border-radius: 6px; 
    margin-bottom: 8px; 
}
.catalog-sub-item .cat-info strong { color: white; font-size: 1rem; }
.catalog-sub-item .cat-info small { color: #bdc3c7; }
.catalog-sub-item .cat-buy-btn { background: #f1c40f; color: #2c3e50; }
.catalog-sub-item .cat-buy-btn:hover { background: #f39c12; }

/* =========================================
   RAIN & LIGHTNING EFFECTS
   ========================================= */
.weather-rain {
    /* Spaced out the drops and made them slightly angled */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='30' height='100'%3E%3Cline x1='15' y1='0' x2='0' y2='100' stroke='rgba(255,255,255,0.4)' stroke-width='1'/%3E%3C/svg%3E");
    background-color: rgba(20, 35, 60, 0.4); /* Adds the dark stormy blue hue! */
    animation: rainFall 0.4s linear infinite;
    z-index: 9999;
    pointer-events: none;
}

@keyframes rainFall {
    0% { background-position: 0px 0px; }
    100% { background-position: -60px 200px; } /* Angled fall */
}

@keyframes ambientLightning {
    0% { background: transparent; opacity: 0; }
    10% { background: white; opacity: 0.7; }
    20% { background: transparent; opacity: 0; }
    30% { background: white; opacity: 0.4; }
    100% { background: transparent; opacity: 0; }
}

.flash-lightning {
    display: block !important;
    animation: ambientLightning 0.5s forwards !important;
    pointer-events: none !important;
}
/* 👻 SÉANCE ANIMATION */
@keyframes paranormalFloat {
    0% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-40px) rotate(5deg) scale(1.05); }
    100% { transform: translateY(0px) rotate(-5deg); }
}
.ghost-float {
    animation: paranormalFloat 2.5s ease-in-out infinite;
    pointer-events: none;
    box-shadow: 0 0 25px 10px rgba(142, 68, 173, 0.8) !important;
    transition: all 0.5s;
    z-index: 9999;
}
/* 🕯️ THE HAUNTING */
.lights-out {
    filter: brightness(0.3) contrast(1.4) sepia(0.4) hue-rotate(240deg) !important;
    transition: filter 2s ease-in-out;
}
.room-btn-disabled {
    opacity: 0.3;
    pointer-events: none;
    text-decoration: line-through;
}
@keyframes spookyTypewriter {
    0% { opacity: 0; transform: translateY(10px) scale(0.9); }
    100% { opacity: 1; transform: translateY(0px) scale(1); }
}
.spooky-dialogue {
    position: absolute;
    color: #e74c3c;
    font-family: 'Courier New', Courier, monospace;
    font-weight: bold;
    font-size: 1.5rem;
    text-shadow: 0 0 10px black, 0 0 20px darkred;
    pointer-events: none;
    z-index: 100000;
    text-align: center;
    width: 300px;
    margin-left: -150px;
    animation: spookyTypewriter 2s ease-out forwards;
}
/* 🔥 FIREWORKS DISASTER INCINERATION */
@keyframes incinerate {
    0% { transform: scale(1); opacity: 1; filter: brightness(1) drop-shadow(0 0 0 red); }
    30% { transform: scale(1.2) translateY(-20px); filter: brightness(1.5) sepia(1) hue-rotate(-50deg) saturate(5) drop-shadow(0 0 20px orange); }
    70% { transform: scale(0.8) translateY(-100px); opacity: 0.8; filter: brightness(2) drop-shadow(0 0 50px red); }
    100% { transform: scale(0.1) translateY(-250px); opacity: 0; filter: brightness(5) drop-shadow(0 0 100px yellow); }
}

.incinerate-item {
    animation: incinerate 2s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards !important;
    pointer-events: none;
}
/* 💥 YARD FIRE ANIMATION */
@keyframes fireFlash {
    0% { background: rgba(255, 255, 255, 0); }
    10% { background: rgba(255, 255, 255, 0.9); } /* Blinding white flash */
    30% { background: rgba(255, 140, 0, 0.65); }  /* Semi-transparent roaring orange fire */
    60% { background: rgba(0, 0, 0, 0.75); }      /* Thick, but translucent black smoke */
    100% { background: rgba(0, 0, 0, 0); }        /* Fades to nothing */
}

.flash-fire {
    display: block !important;
    animation: fireFlash 3s forwards !important;
    pointer-events: none !important; 
}
/* 1. Base darkness for the room (No Flashlight) */
.lights-out::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    
    /* 💡 30% Darkness: Dark enough to feel spooky, light enough to see everything! */
    background: rgba(0, 0, 0, 0.06); 
    
    z-index: 1500; 
    pointer-events: none; 
}

/* 2. Flashlight overlay (Bright beam, highly visible room) */
.lights-out.lights-out-flashlight::before {
    background: radial-gradient(
        circle 200px at var(--cursor-x, 50%) var(--cursor-y, 50%), 
        rgba(255, 255, 220, 0.50) 40%,  /* 🔦 The Bulb: A bright, warm yellowish-white glow */
        transparent 35%,               /* 🔦 The Core: Perfectly clear to see item details */
        rgba(0, 0, 0, 0.04) 80%         /* 💡 The Edge: Fades perfectly into the 0.3 room darkness */
    );
}
/* Goggle Toast Notification */
#goggle-toast {
    animation: goggleSlideIn 0.3s ease-out forwards;
}
#goggle-toast.goggle-hiding {
    animation: goggleSlideOut 0.4s ease-in forwards;
}
@keyframes goggleSlideIn {
    0% { transform: translateY(-100%); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}
@keyframes goggleSlideOut {
    0% { transform: translateY(0); opacity: 1; }
    100% { transform: translateY(-100%); opacity: 0; }
}