:root {
    --bg: #000;
    --card: #0f0f0f;
    --border: #1a1a1a;
    --green: #4caf50;
    --best-yellow: #f39c12;
}

html, body { 
    background-color: var(--bg); 
    color: white; 
    font-family: -apple-system, sans-serif; 
    margin: 0; padding: 0; width: 100%; min-height: 100vh;
}

body { padding: 15px; box-sizing: border-box; display: flex; justify-content: center; }

/* Background Mesh */
.bg-wrapper { position: fixed; inset: 0; z-index: -1; }
.mesh-layer { position: absolute; width: 200%; height: 200%; top: -50%; left: -50%; opacity: 0.4; }
.layer-1 { background: radial-gradient(circle at 20% 30%, rgba(76, 175, 80, 0.08) 0%, transparent 50%); animation: rotateMesh 30s linear infinite; }
.layer-2 { background: radial-gradient(circle at 80% 70%, rgba(163, 73, 255, 0.05) 0%, transparent 50%); animation: rotateMesh 45s linear infinite reverse; }

@keyframes rotateMesh { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

/* Star System */
.star-container { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.star-icon { position: absolute; width: 14px; height: 14px; filter: invert(88%) sepia(85%) saturate(2361%) hue-rotate(358deg) brightness(108%) contrast(105%); animation: fallingStar linear infinite; opacity: 0; }

/* Modal Specific Star Styling */
.modal-star-layer { z-index: 1; }
.modal-star-layer .star-icon { opacity: 0.12 !important; }

@keyframes fallingStar {
    0% { transform: translate(0, -50px) rotate(0deg); opacity: 0; }
    15% { opacity: 1; }
    85% { opacity: 1; }
    100% { transform: translate(-100px, 450px) rotate(360deg); opacity: 0; }
}

/* Header & Tabs */
.window-container { width: 100%; max-width: 1000px; position: relative; z-index: 10; display: flex; flex-direction: column; padding-top: 60px; }
.main-header { background: rgba(13, 13, 13, 0.75); backdrop-filter: blur(20px); border: 1px solid var(--border); border-radius: 20px; padding: 14px; margin-bottom: 20px; position: sticky; top: 15px; z-index: 100; }
.top-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.main-logo-img { height: 22px; }

.tabs-nav { display: flex; gap: 6px; background: #050505; padding: 4px; border-radius: 12px; }
.tab-btn { flex: 1; background: transparent; border: none; color: #555; padding: 10px; border-radius: 10px; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 13px; font-weight: 700; transition: 0.4s; }
.tab-btn.active { color: var(--green); background: #0a0a0a; border: 1px solid #1a331a; }
.tab-svg { width: 16px; height: 16px; filter: invert(0.4); }
.tab-btn.active .tab-svg { filter: invert(48%) sepia(79%) saturate(2476%) hue-rotate(86deg); }

/* Grid and Cards */
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding-bottom: 100px; }

.item-card { 
    background: var(--card); 
    border: 1px solid var(--border); 
    border-radius: 24px; 
    padding: 40px 10px 20px; 
    text-align: center; 
    position: relative; 
    cursor: pointer; 
    transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
    box-shadow: 0 0 15px -5px var(--glow-color);
}

.item-card:hover {
    transform: translateY(-5px);
    border-color: var(--glow-color);
    box-shadow: 0 0 25px -5px var(--glow-color);
}

/* Card Specific Glows */
.glow-matcha { --glow-color: rgba(255, 182, 193, 0.4); }
.glow-serotonin { --glow-color: rgba(64, 224, 208, 0.4); }
.glow-yerba { --glow-color: rgba(0, 128, 128, 0.4); }
.glow-seliware { --glow-color: rgba(255, 255, 255, 0.4); }
.glow-volt { --glow-color: rgba(163, 73, 255, 0.4); }
.glow-wave { --glow-color: rgba(0, 212, 255, 0.4); }
.glow-bunni { --glow-color: rgba(255, 215, 0, 0.4); }
.glow-potassium { --glow-color: rgba(136, 136, 136, 0.4); }

.card-header-stats { position: absolute; top: 12px; left: 12px; right: 12px; display: flex; justify-content: space-between; align-items: center; }
.stat-badge { font-size: 8px; background: #1a1a1a; padding: 3px 6px; border-radius: 5px; color: #888; font-weight: 800; display: flex; align-items: center; gap: 3px; }
.mini-svg { width: 11px; height: 11px; }
.gray-icon { filter: grayscale(1) opacity(0.5); }
.green-shield-icon { filter: invert(48%) sepia(79%) saturate(2476%) hue-rotate(86deg); }

.price-container { background: #141414; border: 1px solid #222; border-radius: 10px; padding: 6px 10px; display: inline-block; margin-top: 10px; color: #555; font-size: 11px; font-weight: 600; }
.white-price { color: #fff; font-weight: 700; margin-left: 2px; }

.vfx-container { position: relative; width: 70px; height: 70px; margin: 10px auto; display: flex; align-items: center; justify-content: center; }
.vfx-asset { width: 100%; z-index: 2; }
.vfx-glow { 
    position: absolute; 
    width: 65px; 
    height: 65px; 
    border-radius: 50%; 
    filter: blur(25px); 
    opacity: 0.6; 
    background: var(--glow-color);
}

h4 { margin: 8px 0 2px; font-size: 15px; font-weight: 800; text-transform: lowercase; }

/* Modal System */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.85); backdrop-filter: blur(10px); z-index: 9999; align-items: center; justify-content: center; }
.modal-content { 
    background: #0d0d0d; 
    width: 90%; 
    max-width: 350px; 
    border-radius: 20px; 
    border: 1px solid #222; 
    padding: 30px 10px 10px; 
    position: relative; 
    max-height: 450px; 
    display: flex; 
    flex-direction: column;
    overflow: hidden; /* Important for the star container */
}

.providers-scroll-area { flex: 1; overflow-y: auto; scrollbar-width: none; margin-top: 10px; padding: 5px; }
.providers-scroll-area::-webkit-scrollbar { display: none; }

.provider-card { 
    background: #111; 
    border: 1px solid #1a1a1a; 
    border-radius: 12px; 
    padding: 12px 10px; 
    margin-bottom: 15px; 
    position: relative; 
    max-height: 140px; 
    display: flex; 
    flex-direction: column;
}
.provider-card.featured { border: 1.5px solid var(--best-yellow); }

.provider-best-tag { 
    position: absolute; 
    top: -9px; 
    left: 50%; 
    transform: translateX(-50%); 
    background: var(--best-yellow); 
    padding: 3px 10px; 
    border-radius: 50px; 
    display: flex; 
    align-items: center; 
    gap: 4px; 
    font-size: 8px; 
    font-weight: 900; 
    color: #000; 
    white-space: nowrap;
    z-index: 5;
}

.provider-top-info { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; flex-shrink: 0; }
.provider-logo-img { width: 18px; height: 18px; border-radius: 4px; }
.provider-name-txt { font-weight: 800; font-size: 11px; color: #fff; text-transform: uppercase; }

.prices-list-container { 
    flex: 1;
    overflow-y: auto;
    scrollbar-width: none;
    border-top: 1px solid #1a1a1a;
    padding-top: 5px;
}
.prices-list-container::-webkit-scrollbar { display: none; }

.price-row { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    padding: 6px 0; 
}

.price-text { font-size: 13px; font-weight: 800; color: #fff; }
.duration-text { font-size: 8px; color: #444; margin-left: 3px; font-weight: 700; }

.buy-btn { background: var(--best-yellow); color: #000; padding: 4px 10px; border-radius: 5px; font-weight: 800; text-decoration: none; font-size: 10px; }

.top-right-close { position: absolute; top: 8px; right: 12px; color: #333; font-size: 18px; background: none; border: none; cursor: pointer; z-index: 20; }
.modal-footer { display: flex; align-items: center; justify-content: center; gap: 5px; margin-top: 5px; padding-top: 5px; border-top: 1px solid #161616; flex-shrink: 0; }
.footer-gray-shield { width: 8px; filter: grayscale(1) brightness(0.2); }
.footer-gray-text { color: #222; font-size: 8px; font-weight: 700; }

.tab-view { display: none; }
.tab-view.active-view { display: block; }
