:root {
    /* تم پیش‌فرض (تیره) */
    --bg: #050505;
    --card-bg: rgba(20, 20, 30, 0.9);
    --neon-blue: #00f3ff;
    --neon-purple: #bd00ff;
    --neon-green: #00ff9d;
    --neon-pink: #ff007a;
    --neon-yellow: #facc15;
    --text: #ffffff;
    --text-muted: #aaa;
    --border: rgba(255, 255, 255, 0.15);
    --input-bg: rgba(255, 255, 255, 0.05);
}

/* تم روشن (Light Mode) */
body.light-mode {
    --bg: #eef2f5;
    --card-bg: rgba(255, 255, 255, 0.85);
    --text: #1a1a1a;
    --text-muted: #555;
    --border: rgba(0, 0, 0, 0.1);
    --input-bg: rgba(0, 0, 0, 0.05);
    background: linear-gradient(135deg, #eef2f5 0%, #d9e2ec 100%);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    background: radial-gradient(circle at top, #1a0b2e 0%, #050505 100%);
    color: var(--text); font-family: 'Vazirmatn', sans-serif;
    min-height: 100vh; display: flex; flex-direction: column;
    overflow-x: hidden; transition: background 0.3s, color 0.3s;
}

.main-wrapper { display: flex; flex-direction: column; height: 100%; width: 100%; }

/* --- Header (Desktop Only) --- */
header {
    padding: 1rem 3rem;
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    display: flex; justify-content: space-between; align-items: center;
    position: sticky; top: 0; z-index: 100;
}
.logo { font-size: 1.8rem; font-weight: 900; letter-spacing: 1px; }
.logo span { color: var(--neon-blue); text-shadow: 0 0 10px var(--neon-blue); }
nav { display: flex; gap: 10px; }

/* --- Container --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    flex: 1; width: 100%;
    display: flex; flex-direction: column; justify-content: center;
    padding-bottom: 80px; /* فضای خالی برای منوی موبایل */
}

.hero { text-align: center; margin-bottom: 2.5rem; }
.hero h1 { font-size: 2.5rem; color: var(--text); }
.hero span.yellow { color: var(--neon-yellow); text-shadow: 0 0 20px var(--neon-yellow); }
.hero p { color: var(--text-muted); margin-top: 5px; }

/* --- Grid System --- */
.product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    align-items: stretch;
}

.product-box {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 30px;
    padding: 2rem;
    text-align: center;
    backdrop-filter: blur(15px);
    display: flex; flex-direction: column; justify-content: space-between;
    transition: 0.4s;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}
.product-box:hover { transform: translateY(-8px); }

/* آیکون‌ها وسط چین */
.box-icon { 
    font-size: 3.5rem; margin: 0 auto 1rem auto; display: block; 
    filter: drop-shadow(0 0 10px rgba(255,255,255,0.3));
}
h2 { font-size: 1.5rem; margin-bottom: 1.5rem; color: var(--text); }

/* --- BOX 1: Stars (کادرهای مجزا) --- */
.box-stars:hover { border-color: var(--neon-blue); box-shadow: 0 0 30px rgba(0, 243, 255, 0.2); }
.box-stars .box-icon { color: var(--neon-blue); }

#star-slider { 
    width: 100%; height: 8px; background: var(--input-bg); 
    border-radius: 5px; appearance: none; cursor: pointer; margin: 20px 0; 
}
#star-slider::-webkit-slider-thumb { 
    appearance: none; width: 22px; height: 22px; 
    background: var(--neon-blue); border-radius: 50%; 
    box-shadow: 0 0 10px var(--neon-blue); 
}

.calc-container {
    display: flex; gap: 10px; margin-bottom: 15px;
}
.calc-box {
    flex: 1; background: var(--input-bg); border: 1px solid var(--border);
    border-radius: 12px; padding: 10px;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.calc-label { font-size: 0.8rem; color: var(--text-muted); }
.calc-val { font-size: 1.2rem; font-weight: bold; color: var(--neon-blue); }

/* --- BOX 2: Premium (List) --- */
.box-premium:hover { border-color: var(--neon-purple); box-shadow: 0 0 30px rgba(189, 0, 255, 0.2); }
.box-premium .box-icon { color: var(--neon-purple); }

.premium-options { display: flex; flex-direction: column; gap: 12px; }
.option { 
    background: var(--input-bg); border: 1px solid var(--border); 
    padding: 15px; border-radius: 12px; cursor: pointer; transition: 0.3s;
    display: flex; justify-content: space-between; align-items: center;
}
.option:hover { background: rgba(189, 0, 255, 0.15); border-color: var(--neon-purple); transform: scale(1.02); }
.option strong { color: var(--neon-purple); }

/* --- BOX 3: Gifts (6 Grid) --- */
.box-gifts:hover { border-color: var(--neon-green); box-shadow: 0 0 30px rgba(0, 255, 157, 0.2); }
.box-gifts .box-icon { color: var(--neon-green); }

.gift-grid { 
    display: grid; grid-template-columns: repeat(3, 1fr); /* 3 ستون = 6 گیفت */
    gap: 10px; 
}
.gift-item { 
    aspect-ratio: 1/1; background: var(--input-bg); border: 1px solid var(--border); 
    border-radius: 15px; cursor: pointer; transition: 0.3s;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.gift-item:hover { background: rgba(0, 255, 157, 0.15); border-color: var(--neon-green); transform: scale(1.05); }
.ge { font-size: 2rem; margin-bottom: 5px; }
.gp { font-weight: bold; font-size: 1rem; color: var(--text); }

/* --- Buttons --- */
.btn { 
    background: linear-gradient(45deg, #2563eb, #7c3aed); color: #fff; 
    border: none; padding: 14px; border-radius: 15px; font-weight: bold; 
    font-size: 1.1rem; cursor: pointer; width: 100%; transition: 0.3s;
    text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.btn:hover { transform: scale(1.02); box-shadow: 0 5px 20px rgba(37,99,235,0.4); }

/* --- Footer --- */
footer { 
    background: linear-gradient(to right, #000, #1e1b4b, #000); 
    padding: 1rem 3rem; border-top: 1px solid var(--border); 
    display: flex; justify-content: space-between; align-items: center;
    margin-top: auto;
}
.footer-text { color: var(--text-muted); }
.zarin-tag { color: var(--neon-yellow); }

/* --- Mobile Bottom Nav (Sticky) --- */
.mobile-nav {
    display: none; position: fixed; bottom: 0; left: 0; right: 0;
    background: var(--card-bg); backdrop-filter: blur(20px);
    border-top: 1px solid var(--border); padding: 10px 0;
    justify-content: space-around; z-index: 2000;
    box-shadow: 0 -5px 20px rgba(0,0,0,0.5);
}
.nav-item {
    display: flex; flex-direction: column; align-items: center;
    text-decoration: none; color: var(--text-muted); font-size: 0.75rem; gap: 4px;
}
.nav-item i { font-size: 1.4rem; }
.nav-item.active { color: var(--neon-blue); }

/* --- Modals --- */
.modal { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.9); z-index: 3000; backdrop-filter: blur(10px); align-items: center; justify-content: center; padding: 1rem; }
.glass-card { background: var(--card-bg); border: 2px solid var(--neon-blue); width: 100%; max-width: 500px; border-radius: 35px; padding: 2.5rem; text-align: center; box-shadow: 0 0 60px rgba(0, 243, 255, 0.2); }
.form-group input { width: 100%; padding: 14px; margin-bottom: 12px; background: var(--input-bg); border: 1px solid #444; border-radius: 12px; color: var(--text); outline: none; transition: 0.3s; }
.form-group input:focus { border-color: var(--neon-blue); }
.invoice-item { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--border); color: var(--text); }

/* --- Responsive --- */
@media (max-width: 768px) {
    header { display: none; } /* مخفی کردن هدر در موبایل */
    .product-grid { grid-template-columns: 1fr; height: auto; }
    footer { display: none; } /* فوتر در موبایل حذف و به نویگیشن منتقل شد */
    .mobile-nav { display: flex; }
    .gift-grid { grid-template-columns: repeat(3, 1fr); } /* در موبایل هم 3 تایی بماند چون ریز هستند */
    .product-box { min-height: auto; }
}
