/* --- 1. DESIGN TOKENS --- */
:root {
    --purple: #6c5ce7;
    --purple-dark: #4834d4;
    --mint: #00d2d3;
    --indigo: #1e1b2e;
    --danger: #ff7675;
    --white: #ffffff;
    --gray-light: #f4f7f6;
    --text-dark: #2d3436;
    --radius: 16px;
    --radius-sm: 8px;
    --shadow: 0 10px 30px rgba(0,0,0,0.08);
}

/* --- 2. GLOBAL RESET & UTILITIES --- */
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Segoe UI', Inter, sans-serif; background: var(--white); color: var(--text-dark); line-height: 1.6; overflow-x: hidden; }

/* VISIBILITY UTILITY - CRITICAL FOR SPA FUNCTIONALITY */
.hidden { display: none !important; }

/* LAYOUT HELPERS */
.container-std { max-width: 1200px; margin: 0 auto; padding: 0 20px; width: 100%; }
.section-padding { padding: 80px 0; }
.center-text { text-align: center; }
.full-width { width: 100%; }
.bg-light { background: var(--gray-light); }
.mt-auto { margin-top: auto; }

/* RESPONSIVE GRIDS */
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 30px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 30px; }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 20px; }

/* --- 3. NAVIGATION --- */
.navbar { background: var(--white); height: 80px; border-bottom: 1px solid #eee; position: sticky; top: 0; z-index: 1000; display: flex; align-items: center; }
.nav-inner { display: flex; justify-content: space-between; align-items: center; width: 100%; }
.logo { font-size: 24px; font-weight: 900; color: var(--purple); cursor: pointer; }
.logo span { color: var(--mint); }
.nav-links { display: flex; list-style: none; gap: 30px; }
.nav-links a { text-decoration: none; color: var(--text-dark); font-weight: 600; font-size: 15px; transition: color 0.2s; }
.nav-links a:hover { color: var(--purple); }

.nav-actions { display: flex; align-items: center; gap: 15px; }
.hamburger { display: none; font-size: 28px; color: var(--purple); cursor: pointer; }

/* Submenu */
.nav-item { position: relative; }
.submenu { display: none; position: absolute; top: 100%; left: 0; background: var(--white); min-width: 200px; box-shadow: var(--shadow); border-radius: var(--radius-sm); list-style: none; padding: 10px 0; z-index: 1000; }
.submenu li a { display: block; padding: 10px 20px; }
.nav-item:hover .submenu { display: block; }

/* --- 4. HERO SECTION --- */
.hero-section { background: linear-gradient(135deg, var(--indigo) 0%, #2d2b4a 100%); color: var(--white); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center; }
.hero-content h1 { font-size: 3.5rem; line-height: 1.1; margin: 20px 0; }
.badge-mint { background: var(--mint); color: var(--indigo); padding: 5px 12px; border-radius: 50px; font-weight: bold; font-size: 0.9rem; }
.price-lockup { font-size: 3rem; font-weight: bold; margin: 20px 0; color: var(--mint); }
.price-lockup .month { font-size: 1.2rem; color: rgba(255,255,255,0.7); }
.hero-buttons { display: flex; gap: 20px; align-items: center; }
.phone-mockup { width: 300px; height: 500px; background: var(--text-dark); border-radius: 40px; border: 8px solid #444; margin: 0 auto; position: relative; box-shadow: 0 20px 50px rgba(0,0,0,0.5); }
.screen { width: 100%; height: 100%; background: #6c5ce7; border-radius: 32px; opacity: 0.8; }

/* --- 5. CARDS & PLANS --- */
.section-header { margin-bottom: 40px; }
.card { background: var(--white); border-radius: var(--radius); padding: 30px; border: 1px solid #eee; transition: transform 0.2s; }
.card:hover { transform: translateY(-5px); border-color: var(--mint); box-shadow: var(--shadow); }
.plan-card { display: flex; flex-direction: column; align-items: center; text-align: center; position: relative; }
.featured { border: 2px solid var(--purple); transform: scale(1.05); z-index: 2; }
.best-value-tag { position: absolute; top: -14px; background: var(--purple); color: white; padding: 4px 16px; border-radius: 20px; font-size: 12px; font-weight: bold; }
.data-badge { font-size: 2rem; font-weight: 800; color: var(--text-dark); margin: 15px 0; }
.data-badge.purple { color: var(--purple); }
.benefit-list { list-style: none; margin: 20px 0; flex-grow: 1; text-align: left; width: 100%; }
.benefit-list li { margin-bottom: 10px; border-bottom: 1px solid #f9f9f9; padding-bottom: 5px; }
.price-row { font-size: 1.2rem; margin-bottom: 20px; }
.price-row strong { font-size: 1.8rem; color: var(--purple); }

/* --- 6. DEVICES --- */
.device-card { display: flex; align-items: center; gap: 30px; text-align: left; }
.device-preview { font-size: 80px; background: var(--gray-light); padding: 20px; border-radius: var(--radius-sm); }
.device-info { display: flex; flex-direction: column; height: 100%; }
.price-tag { display: block; font-size: 1.2rem; font-weight: bold; color: var(--purple); margin: 10px 0; }

/* --- 7. VALUES (Dark) --- */
.dark-mode { background: var(--indigo); color: white; }
.stat-box { background: rgba(255,255,255,0.1); padding: 30px; border-radius: var(--radius); text-align: center; }
.big-stat { display: block; font-size: 3rem; font-weight: 900; color: var(--mint); }

/* --- 8. PARTNERS --- */
.partner-tile { border: 1px solid #ddd; border-radius: var(--radius); padding: 30px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; background: white; }
.partner-tile .emoji { font-size: 40px; }

/* --- 9. ACCOUNT DASHBOARD --- */
.dashboard-layout { display: grid; grid-template-columns: 280px 1fr; min-height: calc(100vh - 80px); }
.sidebar { background: var(--gray-light); padding: 40px 20px; border-right: 1px solid #ddd; }
.dash-content { padding: 60px 40px; }
.avatar-circle { width: 60px; height: 60px; background: var(--purple); color: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: bold; margin-bottom: 20px; }
.dash-nav a { display: block; padding: 15px; color: var(--text-dark); text-decoration: none; border-radius: var(--radius-sm); margin-bottom: 5px; font-weight: 600; }
.dash-nav a.active { background: var(--purple); color: white; }
.usage-header { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 10px; }
.progress-track { background: #eee; height: 16px; border-radius: 10px; overflow: hidden; margin-bottom: 20px; }
.progress-fill { width: 92%; height: 100%; background: linear-gradient(90deg, var(--purple), var(--danger)); }
.alert-box { background: #fff5f5; border: 1px solid #ffcccc; padding: 20px; border-radius: var(--radius); display: flex; align-items: center; gap: 15px; }
.big-price { font-size: 2.5rem; font-weight: bold; color: var(--purple); margin: 15px 0; }

/* --- 10. BUTTONS --- */
.btn-primary { background: var(--purple); color: white; border: none; padding: 12px 24px; border-radius: var(--radius-sm); font-weight: bold; cursor: pointer; transition: 0.2s; }
.btn-primary:hover { background: var(--purple-dark); }
.btn-secondary-sm { border: 2px solid var(--purple); color: var(--purple); background: white; padding: 8px 16px; border-radius: var(--radius-sm); cursor: pointer; font-weight: bold; }
.btn-outline { border: 2px solid var(--purple); color: var(--purple); background: transparent; padding: 12px 24px; border-radius: var(--radius-sm); font-weight: bold; cursor: pointer; }
.btn-mint { background: var(--mint); color: var(--text-dark); border: none; padding: 12px 24px; border-radius: var(--radius-sm); font-weight: bold; cursor: pointer; }
.btn-text-light { background: none; border: none; color: white; text-decoration: underline; cursor: pointer; }
.btn-text { background: none; border: none; color: #666; cursor: pointer; text-decoration: underline; }
.btn-white { background: white; color: var(--purple); border: none; padding: 12px; font-weight: bold; border-radius: var(--radius-sm); cursor: pointer; }

/* --- 11. ICONS BAR --- */
.icons-section { padding: 40px 0; border-bottom: 1px solid #eee; }
.icon-flex { display: flex; justify-content: center; gap: 40px; flex-wrap: wrap; }
.icon-box { display: flex; flex-direction: column; align-items: center; gap: 10px; font-weight: 600; cursor: pointer; }
.icon-box span { font-size: 32px; background: var(--gray-light); padding: 15px; border-radius: 50%; }

/* --- 12. MODAL --- */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.8); z-index: 2000; align-items: center; justify-content: center; display: flex; }
.modal-box { background: white; padding: 40px; border-radius: var(--radius); width: 90%; max-width: 400px; text-align: center; }
.input-field { width: 100%; padding: 15px; border: 2px solid #eee; border-radius: var(--radius-sm); margin: 20px 0; font-size: 16px; }

/* =========================================
   13. RESPONSIVE DESIGN (MOBILE FIXES)
   ========================================= */
@media (max-width: 768px) {
    .section-padding { padding: 40px 0; }
    
    /* Navbar & Mobile Menu */
    .hamburger { display: block; }
    .nav-links { 
        display: none; 
        flex-direction: column; 
        position: absolute; 
        top: 80px; 
        left: 0; 
        width: 100%; 
        background: var(--white); 
        padding: 20px; 
        box-shadow: 0 10px 10px rgba(0,0,0,0.1); 
    }
    .nav-links.active { display: flex; }
    .submenu { position: static; box-shadow: none; padding-left: 20px; display: none; }
    .nav-item:hover .submenu { display: block; }

    /* Hero Section */
    .hero-grid { grid-template-columns: 1fr; text-align: center; gap: 30px; }
    .hero-content h1 { font-size: 2.5rem; }
    .hero-buttons { justify-content: center; flex-direction: column; width: 100%; }
    .hero-buttons button { width: 100%; }
    .phone-mockup { width: 250px; height: 400px; }

    /* Fix overlapping text on plan cards */
    .pricing-grid { gap: 40px; }
    .plans-section .section-header { margin-bottom: 50px; }
    .featured { transform: scale(1); border-width: 3px; }

    /* Bestsellers */
    .device-card { flex-direction: column; text-align: center; }
    .center-text-mobile { text-align: center; }

    /* Dashboard fixes */
    .dashboard-layout { grid-template-columns: 1fr; }
    .sidebar { border-right: none; border-bottom: 1px solid #ddd; padding: 20px; display: flex; flex-direction: column; align-items: center; }
    .dash-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; width: 100%; }
    .dash-nav a { padding: 10px 15px; margin: 0; }
    .dash-content { padding: 30px 20px; }
    
    /* Alert Box Fix */
    .alert-box { flex-direction: column; text-align: center; }
    .alert-btn { width: 100%; margin-top: 10px; }

    /* Icon Nav */
    .icon-flex { gap: 20px; }
}