body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: url('slw.jpg') no-repeat center center fixed;
    background-size: cover;
    overflow-x: hidden;
    color: yellow;
}

/* Scrollbars */
::-webkit-scrollbar { width: 12px; }
::-webkit-scrollbar-track { background: #001133; }
::-webkit-scrollbar-thumb { background: #00aaff; border-radius: 6px; }

/* Particles */
#particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

/* Header */
.top-header {
    text-align: center;
    padding: 10px;
    background: rgba(0,0,80,0.7);
    border-bottom: 3px solid yellow;
    position: relative;
    z-index: 5;
}
.header-img {
    width: 300px;
    border: 3px solid yellow;
    border-radius: 10px;
    transition: 0.3s;
}
.header-img:hover {
    filter: drop-shadow(0 0 15px #00ffff);
    transform: scale(1.05);
}

/* Home Button */
.home-btn-container {
    text-align: center;
    margin: 10px;
    position: relative;
    z-index: 5;
}
.home-btn {
    color: yellow;
    font-size: 20px;
    text-decoration: none;
    padding: 8px 20px;
    border: 2px solid yellow;
    border-radius: 8px;
    transition: 0.3s;
}
.home-btn:hover {
    background: yellow;
    color: blue;
    box-shadow: 0 0 15px yellow;
}

/* Floating Logo */
#logo-floating {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 6px 12px;
    border-radius: 10px;
    border: 2px solid yellow;
    background: rgba(0,0,60,0.7);
    box-shadow: 0 0 15px #00ffff;
    color: yellow;
    font-weight: bold;
    letter-spacing: 2px;
    z-index: 15;
    animation: floatLogo 4s ease-in-out infinite;
}
@keyframes floatLogo {
    0%,100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

/* Map */
#map {
    width: 90%;
    height: 500px;
    margin: 20px auto 120px auto;
    border: 4px solid yellow;
    border-radius: 10px;
    box-shadow: 0 0 25px #00ccff, 0 0 50px #0066ff inset;
    position: relative;
    z-index: 5;
    background: linear-gradient(135deg, #001133, #002266, #001133);
}

/* Glass Panels */
.glass-panel {
    position: absolute;
    top: 130px;
    left: 20px;
    width: 280px;
    padding: 15px;
    background: rgba(0, 0, 50, 0.5);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255,255,0,0.6);
    border-radius: 12px;
    box-shadow: 0 0 20px #00ffff;
    color: yellow;
    z-index: 10;
}
.glass-panel h2, .glass-panel h3 {
    margin-top: 0;
}

/* Settings panel */
.settings-panel {
    top: 130px;
    left: 320px;
    width: 220px;
}
.hidden { display: none; }

.toggle-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 6px 0;
}

/* Inputs */
.input-field {
    width: 100%;
    padding: 8px;
    margin: 8px 0;
    border-radius: 6px;
    border: 2px solid yellow;
    background: rgba(0,0,50,0.7);
    color: yellow;
}
.label-small {
    font-size: 12px;
}

/* Buttons */
.neon-btn {
    width: 100%;
    padding: 10px;
    margin: 6px 0;
    background: blue;
    color: yellow;
    border: 2px solid yellow;
    border-radius: 6px;
    cursor: pointer;
    transition: 0.3s;
    font-size: 14px;
}
.neon-btn:hover {
    background: yellow;
    color: blue;
    box-shadow: 0 0 15px yellow;
}
.neon-btn.secondary {
    background: #002266;
}
.neon-btn.tiny {
    width: auto;
    padding: 4px 10px;
    font-size: 12px;
}

/* Category buttons */
.category-row {
    display: flex;
    justify-content: space-between;
    margin: 6px 0;
}
.cat-btn {
    width: 18%;
    padding: 6px 0;
    border-radius: 6px;
    border: 2px solid yellow;
    background: #001a4d;
    color: yellow;
    cursor: pointer;
    transition: 0.3s;
}
.cat-btn.active,
.cat-btn:hover {
    background: yellow;
    color: blue;
    box-shadow: 0 0 10px yellow;
}

/* Recent searches */
.recent-searches {
    font-size: 11px;
    margin-bottom: 4px;
    color: #ffeb7a;
}
.recent-searches span {
    cursor: pointer;
    margin-right: 6px;
    text-decoration: underline;
}

/* Bottom Drawer */
#bottomDrawer {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: 220px;
    background: rgba(0,0,40,0.9);
    border-top: 3px solid yellow;
    box-shadow: 0 -5px 20px #00ffff;
    z-index: 12;
    transition: transform 0.3s;
    transform: translateY(0);
}
#drawerHandle {
    width: 60px;
    height: 6px;
    background: yellow;
    border-radius: 3px;
    margin: 6px auto;
}
#drawerHeader {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 12px;
    color: yellow;
    font-weight: bold;
}
.store-list {
    height: 170px;
    overflow-y: auto;
    padding: 6px 10px 10px 10px;
}

/* Store item */
.store-item {
    padding: 6px 0;
    border-bottom: 1px solid rgba(255,255,0,0.3);
    cursor: pointer;
}
.store-item:hover {
    background: rgba(255,255,0,0.1);
}
.store-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.store-meta {
    font-size: 11px;
    color: #ffeb7a;
}
.badge-open {
    color: #00ff88;
    font-weight: bold;
}
.badge-closed {
    color: #ff5555;
    font-weight: bold;
}
.price-level {
    color: #ffd966;
}
.store-actions {
    margin-top: 4px;
    display: flex;
    gap: 6px;
}
.store-actions button {
    font-size: 11px;
    padding: 3px 6px;
}

/* Watermark */
#watermark {
    position: fixed;
    bottom: 10px;
    right: 10px;
    color: rgba(255,255,0,0.7);
    font-size: 14px;
    text-shadow: 0 0 5px blue;
    z-index: 20;
    animation: pulseWatermark 3s infinite;
}
@keyframes pulseWatermark {
    0%,100% { opacity: 0.7; }
    50% { opacity: 1; }
}

/* Preloader */
#preloader {
    position: fixed;
    inset: 0;
    background: rgba(0,0,40,0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 30;
}
.spinner {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 4px solid #00ffff;
    border-top-color: yellow;
    animation: spin 1s linear infinite;
}
.spinner-text {
    margin-top: 10px;
    color: yellow;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Toasts */
#toast-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 25;
}
.toast {
    background: rgba(0,0,60,0.9);
    color: yellow;
    padding: 8px 12px;
    margin-bottom: 6px;
    border-radius: 8px;
    border: 1px solid yellow;
    box-shadow: 0 0 10px #00ffff;
    font-size: 12px;
}

/* Responsive */
@media (max-width: 768px) {
    .glass-panel {
        position: fixed;
        top: 90px;
        left: 10px;
        right: 10px;
        width: auto;
    }
    .settings-panel {
        top: 260px;
        left: 10px;
        right: 10px;
        width: auto;
    }
    #map {
        width: 96%;
        height: 380px;
        margin-bottom: 260px;
    }
    #bottomDrawer {
        height: 260px;
    }
}
@media (max-width: 768px) {

    /* Control panel becomes full-width and moves above the map */
    #controlPanel {
        position: relative;
        top: 0;
        left: 0;
        right: 0;
        width: calc(100% - 20px);
        margin: 10px auto;
        z-index: 10;
    }

    /* Settings panel also becomes full-width */
    #settingsPanel {
        position: relative;
        top: 0;
        left: 0;
        right: 0;
        width: calc(100% - 20px);
        margin: 10px auto;
        z-index: 10;
    }

    /* Map moves down so it is not covered */
    #map {
        width: 96%;
        height: 380px;
        margin: 20px auto 260px auto;
        position: relative;
        z-index: 5;
    }

    /* Bottom drawer stays on top of everything */
    #bottomDrawer {
        height: 260px;
        z-index: 20;
    }

    /* Floating logo moves to top-left to avoid overlap */
    #logo-floating {
        top: 10px;
        right: 10px;
        font-size: 14px;
        padding: 4px 8px;
    }
}
/* --- MOBILE FIX: FORCE PANELS ABOVE MAP --- */
@media (max-width: 768px) {

    /* Control panel becomes normal flow (NOT absolute) */
    #controlPanel {
        position: relative !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: calc(100% - 20px) !important;
        margin: 10px auto !important;
        z-index: 10 !important;
    }

    /* Settings panel also becomes normal flow */
    #settingsPanel {
        position: relative !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: calc(100% - 20px) !important;
        margin: 10px auto !important;
        z-index: 10 !important;
    }

    /* Map moves DOWN so it is fully visible */
    #map {
        position: relative !important;
        top: 0 !important;
        margin-top: 20px !important;
        width: 96% !important;
        height: 380px !important;
        z-index: 5 !important;
    }

    /* Bottom drawer stays on top */
    #bottomDrawer {
        z-index: 20 !important;
    }

    /* Floating logo moves to avoid overlap */
    #logo-floating {
        top: 5px !important;
        right: 5px !important;
    }
}

