/* 1. Base Variables & Reset */
:root {
    --bg-dark: #03050a; /* Deep, solid institutional black/slate */
    --text-main: #f8fafc; /* Professional clean off-white */
    --text-muted: #8a99ad; /* Premium visible slate gray */
    --accent: #34d399; /* Soft institutional green */
    --accent-hover: #a7f3d0;
    --font-main: 'Plus Jakarta Sans', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-dark);
    background-image: none !important;
    color: var(--text-main);
    font-family: var(--font-main);
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

/* Ensure structural container backgrounds are transparent to allow the canvas through */
.hero, .products-showcase, .main-content {
    background: transparent !important;
}

h1, h2, h3, h4, h5, h6, .main-heading, .pre-heading {
    font-family: var(--font-main);
    font-weight: 700;
    letter-spacing: -0.02em; /* Modern tight letter-spacing for comfortable reading */
}

/* 2. Interactive Mouse Glow (The Wave Effect) */
.mouse-glow {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 0;
    background: radial-gradient(
        600px circle at var(--x, 50%) var(--y, 50%), 
        rgba(52, 211, 153, 0.08), 
        transparent 40%
    );
    transition: background 0.1s ease;
}

/* 3. Subtle Background Grid */
.grid-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 40px 40px;
}

#quant-constellation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -3;
    background-color: var(--bg-dark);
    pointer-events: none;
}

/* 4. Modern Header & Logo */
header {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 0.9rem 2%; /* Reduced height/padding by 40% for a cleaner look */
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    background: rgba(22, 28, 39, 0.35); /* Made it semi-transparent to match EA cards */
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-main);
    cursor: pointer;
    z-index: 105;
}

/* Custom Brand Logo Integration */
.brand-logo {
    height: 48px;
    width: auto;
    border-radius: 8px;
    box-shadow: 0 0 12px rgba(212, 175, 55, 0.15); /* Subtle gold glow */
    transition: all 0.4s ease;
    cursor: pointer;
}

.brand-logo:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 5px 20px rgba(52, 211, 153, 0.4); /* Mint green glow on hover */
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 2;
}

.logo h1 {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 1px;
    margin-top: 2px;
}

.logo span {
    color: var(--text-muted);
    font-weight: 400;
}

nav {
    flex-grow: 1;
    display: flex;
    justify-content: center;
    z-index: 2;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 4rem; /* Separate the buttons evenly in a clean, non-cluttered way */
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    padding-bottom: 5px;
}

.vip-label {
    color: var(--accent);
    font-weight: 800;
    letter-spacing: 0.5px;
    margin-right: 2px;
}

.nav-links a:hover {
    color: var(--text-main);
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--accent);
    box-shadow: 0 0 10px var(--accent);
    transition: all 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

/* VIP Dropdown Menu */
.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(15px);
    background: rgba(10, 15, 26, 0.95);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    list-style: none;
    min-width: 180px;
    white-space: nowrap;
    padding: 0.5rem 0;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6), 0 0 15px rgba(52, 211, 153, 0.05);
    z-index: 101;
}

/* Custom width for language selector */
.lang-menu {
    min-width: 140px;
}

/* Invisible bridge to keep hover active between link and menu */
.dropdown-menu::before {
    content: '';
    position: absolute;
    top: -20px;
    left: 0;
    width: 100%;
    height: 20px;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(5px);
}

.dropdown-menu li a {
    display: block;
    padding: 0.8rem 1.5rem;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
    text-align: left;
    color: var(--text-muted);
    text-decoration: none;
    position: relative;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Re-disable default nav links underline on dropdown anchors */
.dropdown-menu li a::after {
    display: none !important;
}

/* Centered, symmetric hover underline for dropdown links */
.ea-name-wrap {
    position: relative;
    display: inline-block;
}

.ea-name-wrap::after {
    content: '';
    position: absolute;
    bottom: -3px; /* Sits perfectly below text */
    left: 50%;
    transform: translateX(-50%) scaleX(0); /* Start at center, scale 0 */
    width: calc(100% - 2ch); /* Leaves exactly 1 character gap on left & right */
    height: 1.5px;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    transform-origin: center; /* Animates outwards symmetrically from the middle */
}

.dropdown-menu li a:hover {
    padding-left: 2rem;
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-main) !important;
}

.dropdown-menu li a:hover .ea-name-wrap::after {
    transform: translateX(-50%) scaleX(1); /* Symmetrical expansion */
}

/* Specific Underline Colors for Tiers on Hover */
.dropdown-menu li a[data-target="vip"]:hover .ea-name-wrap::after {
    background: #fbbf24;
    box-shadow: 0 0 8px #fbbf24;
}

.dropdown-menu li a[data-target="premium"]:hover .ea-name-wrap::after {
    background: #a1a1aa;
    box-shadow: 0 0 8px #a1a1aa;
}

.dropdown-menu li a[data-target="pro"]:hover .ea-name-wrap::after {
    background: var(--accent);
    box-shadow: 0 0 8px var(--accent);
}

.dropdown-menu li a[data-target="standard"]:hover .ea-name-wrap::after {
    background: #ffffff;
    box-shadow: 0 0 8px #ffffff;
}

/* Premium Header Login Button */
.header-login-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-main);
    padding: 0.5rem 1.4rem;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    border-radius: 50px; /* Modern pill shape */
    border: 1px solid rgba(52, 211, 153, 0.35); /* Subtle glowing brand border */
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    text-decoration: none;
    cursor: pointer;
}

.header-login-btn:hover {
    background: linear-gradient(135deg, #0d261b, #06130d);
    color: #34d399 !important;
    border-color: #065f46;
    box-shadow: 0 0 15px rgba(52, 211, 153, 0.3);
    transform: translateY(-1px);
}

/* Header Action Button */
.header-btn {
    background: linear-gradient(135deg, #0d261b, #06130d);
    border: 1px solid #065f46;
    color: #34d399;
    padding: 0.6rem 1.2rem;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 5px;
}

.header-btn:hover {
    background: linear-gradient(135deg, #133827, #081c13);
    color: #a7f3d0;
    border-color: #34d399;
    box-shadow: 0 0 20px rgba(52, 211, 153, 0.3);
}

/* Header Actions Container */
.header-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    z-index: 2;
}

.lang-btn {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.lang-btn:hover {
    color: var(--text-main);
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
}

.dropdown-menu.dropdown-right {
    left: auto;
    right: -10px;
    transform: translateY(15px);
}

.dropdown:hover .dropdown-menu.dropdown-right {
    transform: translateY(5px);
}

/* Submenu positioning in profile dropdown */
.dropdown-submenu {
    position: relative;
}

.dropdown-submenu-menu {
    position: absolute;
    right: 100%; /* Opens to the left of the main menu */
    top: 0;
    background: rgba(10, 15, 26, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    list-style: none;
    min-width: 160px;
    padding: 0.5rem 0;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-10px);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6);
    z-index: 102;
}

.dropdown-submenu:hover .dropdown-submenu-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

.dropdown-submenu-menu li a {
    padding: 0.6rem 1.2rem;
    font-size: 0.75rem !important;
}

.dropdown-submenu-menu li a:hover {
    color: var(--accent) !important;
    background: rgba(52, 211, 153, 0.05) !important;
    padding-left: 1.5rem !important;
}

/* Floating Action Button (Sticky CTA) */
.floating-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: linear-gradient(135deg, #0d261b, #06130d);
    border: 1px solid #065f46;
    color: #34d399;
    padding: 1rem 1.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    box-shadow: 0 10px 25px rgba(52, 211, 153, 0.2);
    z-index: 999;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.floating-btn:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 15px 35px rgba(52, 211, 153, 0.4);
    background: linear-gradient(135deg, #133827, #081c13);
    border-color: #34d399;
    color: #a7f3d0;
}

/* First Page: Products Showcase (Empty for now) */
.products-showcase {
    min-height: 100vh;
    padding-top: 100px;
    padding-bottom: 60px;
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* 5. Hero Section */
.hero {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: 100px;
    position: relative;
    z-index: 1;
}

.hero-content {
    max-width: 800px;
    padding: 0 20px;
}

.pre-heading {
    font-size: 2.2rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

.main-heading {
    font-size: 3.5rem;
    font-weight: 700;
    background: linear-gradient(to right, #ffffff, #a1a1aa);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

/* Primary CTA */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #0d261b, #06130d);
    border: 1px solid #065f46;
    color: #34d399;
    padding: 1rem 2.5rem;
    border-radius: 6px;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-bottom: 1rem;
    cursor: pointer;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #133827, #081c13);
    color: #a7f3d0;
    border-color: #34d399;
    transform: translateY(-2px);
    box-shadow: 0 0 25px rgba(52, 211, 153, 0.3);
}

/* Premium Institutional Buttons */
.btn-institutional-green {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0.8rem 1.5rem;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: all 0.3s ease;
    cursor: pointer;
    text-align: center;
    width: 100%;
    background: linear-gradient(135deg, #0d261b, #06130d);
    border: 1px solid #065f46;
    color: #34d399;
}

.btn-institutional-green:hover {
    background: linear-gradient(135deg, #133827, #081c13);
    color: #a7f3d0;
    border-color: #34d399;
    box-shadow: 0 0 20px rgba(52, 211, 153, 0.3);
    transform: translateY(-2px);
}

/* Small features under CTA */
.cta-features {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.cta-features .dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    background-color: var(--accent);
    border-radius: 50%;
    margin-right: 4px;
    vertical-align: middle;
}

/* 6. Stats Section (Trust Indicators) */
.stats-section {
    display: flex;
    justify-content: center;
    gap: 2.8rem;
    padding: 0.9rem 20px; /* Match the vertical spacing of the header (0.9rem) */
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    background: linear-gradient(to bottom, rgba(0,0,0,0.2), transparent);
    position: relative;
    z-index: 1;
}

.stat-item {
    text-align: center;
}

.stat-item h4 {
    font-size: 1.05rem; /* Reduced by 30% (from 1.5rem) */
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.2rem;
}

.stat-item p {
    font-size: 0.53rem; /* Reduced by 30% (from 0.75rem) */
    color: var(--text-muted);
    letter-spacing: 1px;
    font-weight: 500;
}

.myfxbook-logo h4 {
    font-family: 'Arial', sans-serif;
    letter-spacing: -1px;
}

.myfxbook-logo h4 span {
    font-weight: 300;
}

/* 7. Authentication Modal (Demo) */
.auth-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    z-index: 20000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.auth-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.auth-modal {
    background: rgba(10, 15, 26, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    width: 100%;
    max-width: 400px;
    padding: 2.5rem;
    position: relative;
    transform: translateY(20px);
    transition: all 0.3s ease;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.6), 0 0 20px rgba(52, 211, 153, 0.1);
    max-height: 90vh;
    overflow-y: auto;
}

.auth-modal-overlay.active .auth-modal {
    transform: translateY(0);
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.3s;
}

.close-modal:hover {
    color: var(--text-main);
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header h2 {
    font-size: 1.8rem;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

.auth-header p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.8rem 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.95rem;
    transition: all 0.3s;
}

.form-group select {
    cursor: pointer;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    background: rgba(52, 211, 153, 0.05);
    box-shadow: 0 0 10px rgba(52, 211, 153, 0.2);
}

.form-group select option {
    background: var(--bg-dark);
    color: var(--text-main);
}

.auth-switch {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.auth-switch a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    margin-left: 5px;
    transition: text-shadow 0.3s;
}

.auth-switch a:hover {
    text-shadow: 0 0 8px rgba(52, 211, 153, 0.5);
}

/* 8. Products Section */
.section-title {
    text-align: center;
    margin-bottom: 4rem;
    padding: 0 20px;
}

.section-title h2 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.section-title p {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.product-card {
    background: rgba(22, 28, 39, 0.3);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 2.5rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
    z-index: 1;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-10px);
    border-color: rgba(52, 211, 153, 0.4);
}

.card-border-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(
        400px circle at var(--x, 50%) var(--y, 50%), 
        rgba(255, 255, 255, 0.08), 
        transparent 60%
    );
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: -1;
}

.product-card:hover .card-border-glow {
    opacity: 1;
}

.product-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

/* Tier Styling */
.tier-vip { color: #fbbf24; font-weight: 600; } /* Bright Gold */
.tier-premium { color: #a1a1aa; font-weight: 600; } /* Metallic Silver */
.tier-pro { color: var(--accent); font-weight: 600; } /* Mint Green */
.tier-standard { color: #94a3b8; font-weight: 600; } /* Standard Muted */
.tier-lite { color: #94a3b8; } /* Muted/Gray */

.product-description {
    color: var(--text-muted);
    font-size: 0.9rem;
    min-height: 40px;
    margin-bottom: 2rem;
}

.product-features {
    list-style: none;
    margin-bottom: 2.5rem;
    text-align: left;
    font-size: 0.95rem;
    flex-grow: 1; /* Pushes button to the bottom */
}

.product-features li {
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
}

.product-features li::before {
    content: '✓';
    color: var(--accent);
    font-weight: bold;
    margin-right: 10px;
    font-size: 1.1rem;
}

.product-btn {
    width: 100%;
    justify-content: center;
}

/* Recommended Badge */
.product-card.recommended {
    border-color: var(--accent);
    box-shadow: 0 0 30px rgba(52, 211, 153, 0.15);
}

.recommend-badge {
    position: absolute;
    top: -1px;
    right: 20px;
    background: var(--accent);
    color: #000;
    padding: 5px 15px;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 0 0 6px 6px;
    box-shadow: 0 5px 10px rgba(52, 211, 153, 0.2);
}

/* 9. User Profile (Logged In State) */
.user-profile {
    display: flex !important;
    align-items: center;
    gap: 10px;
    padding-bottom: 0 !important;
}

.user-profile::after {
    display: none !important; /* Disable wave line for profile */
}

.avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.15); /* Clean, subtle border that doesn't cover image colors */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.user-profile:hover .avatar {
    transform: scale(1.1);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

/* 10. Responsive Design (Media Queries) */

/* Large Screens (Desktop - Using Wasted Space) */
@media (min-width: 1400px) {
    .products-grid {
        max-width: 1400px;
        gap: 3rem;
    }
    .hero-content {
        max-width: 1000px;
    }
    .main-heading {
        font-size: 4rem;
        font-size: 3.2rem;
    }
}

/* Tablets */
@media (max-width: 1024px) {
    .main-heading {
        font-size: 2.8rem;
        font-size: 2.4rem;
    }
    .products-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
    .stats-section {
        flex-wrap: wrap;
        gap: 3rem;
    }
    /* Maintain alignment on tablet screens */
    .nav-links {
        gap: 2rem;
    }
}

/* Mobile Devices (Phones) */
@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
        order: 3;
    }

    .header-actions {
        order: 2;
        margin-left: auto;
        margin-right: 15px;
        gap: 1rem;
    }

    nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 75%;
        max-width: 300px;
        height: 100vh;
        background: rgba(7, 11, 20, 0.98);
        backdrop-filter: blur(15px);
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: right 0.4s ease;
        border-left: 1px solid rgba(255, 255, 255, 0.05);
    }

    nav.active {
        right: 0;
    }

    .nav-links {
        flex-direction: column;
        gap: 2rem;
        width: 100%;
        text-align: center;
    }

    /* Fix Dropdown for Mobile */
    nav .dropdown-menu {
        position: static;
        transform: none;
        opacity: 1;
        visibility: visible;
        display: none;
        background: rgba(255, 255, 255, 0.03);
        box-shadow: none;
        margin-top: 1rem;
        min-width: 100%;
    }

    nav .dropdown:hover .dropdown-menu,
    nav .dropdown:active .dropdown-menu {
        display: block;
        transform: none;
    }

    nav .dropdown-menu li a {
        text-align: center;
        padding: 0.8rem;
    }

    /* Adjust Typography & Spacing */
    .pre-heading {
        font-size: 1.5rem;
        font-size: 1.1rem;
    }
    
    .main-heading {
        font-size: 2.2rem;
        font-size: 1.8rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    .cta-features {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }

    .stats-section {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 1.5rem;
        padding: 1.5rem 20px;
    }

    .products-grid {
        grid-template-columns: 1fr;
        padding: 0 15px;
    }

    .section-title h2 {
        font-size: 2rem;
        font-size: 1.5rem;
    }

    .floating-btn {
        bottom: 20px;
        right: 20px;
        padding: 0.8rem 1.2rem;
        font-size: 0.9rem;
    }
}

/* 11. Client Dashboard */
.dashboard-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: var(--bg-dark);
    z-index: 10000;
    display: flex;
    overflow: hidden;
}

/* Sidebar */
.dashboard-sidebar {
    width: 240px;
    background: rgba(10, 15, 26, 0.95);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    padding: 2rem 0;
    backdrop-filter: blur(12px);
    transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    z-index: 100;
}
.dashboard-sidebar.collapsed {
    width: 80px;
}
.dashboard-sidebar.collapsed .profile-info,
.dashboard-sidebar.collapsed .nav-text {
    display: none;
    opacity: 0;
}
.dashboard-sidebar.collapsed .sidebar-profile {
    padding: 0 0 1.5rem 0;
}
.dashboard-sidebar.collapsed .avatar-lg {
    width: 40px;
    height: 40px;
}
.dashboard-sidebar.collapsed .sidebar-nav a,
.dashboard-sidebar.collapsed .exit-btn {
    justify-content: center;
    padding: 0.8rem;
}
.dashboard-sidebar.collapsed .sidebar-nav a svg,
.dashboard-sidebar.collapsed .exit-btn svg {
    margin: 0;
}
.sidebar-toggle-btn {
    position: absolute;
    top: 25px;
    right: -14px;
    width: 28px;
    height: 28px;
    background: var(--bg-dark);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.sidebar-toggle-btn:hover {
    color: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 0 10px rgba(52, 211, 153, 0.2);
}
.dashboard-sidebar.collapsed .sidebar-toggle-btn svg {
    transform: rotate(180deg);
}
.sidebar-profile {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 1.5rem 1.2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: 0.5rem; /* Significantly reduced the bottom gap */
}
.avatar-lg {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.15); /* Clean border for dashboard profile */
    margin-bottom: 0.8rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    object-fit: cover;
    transition: all 0.3s ease;
}
.profile-info {
    text-align: center;
}
.profile-info h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}
.tier-badge {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    background: rgba(52, 211, 153, 0.1);
    color: var(--accent);
    border: 1px solid rgba(52, 211, 153, 0.3);
}
.sidebar-nav {
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* Forces buttons to start from the top */
    gap: 8px;
    padding: 0 1rem;
    flex-grow: 1;
    margin-top: 0.5rem;
    overflow-y: auto; /* Adds scrollbar if many buttons are added later */
}

/* Custom Sleek Scrollbar for Sidebar Nav */
.sidebar-nav::-webkit-scrollbar {
    width: 4px;
}
.sidebar-nav::-webkit-scrollbar-track {
    background: transparent;
}
.sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
}
.sidebar-nav::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.15);
}
.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0.75rem 1rem;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid rgba(255, 255, 255, 0.03);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    font-size: 0.85rem;
    font-weight: 500;
}
.sidebar-nav a:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.08);
    color: var(--text-main);
    transform: translateX(2px);
}
.sidebar-nav a.active {
    background: rgba(52, 211, 153, 0.08);
    color: var(--accent);
    border: 1px solid rgba(52, 211, 153, 0.2);
    box-shadow: inset 2px 0 0 var(--accent);
    transform: none;
}
.exit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.sidebar-footer {
    padding: 0 1rem;
}

/* Main Content Area */
.dashboard-main {
    flex-grow: 1;
    overflow-y: auto;
    padding: 1.5rem 2.5rem;
    background: radial-gradient(circle at top right, rgba(52, 211, 153, 0.05), transparent 40%);
}

.dashboard-header {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    gap: 1.5rem;
    flex-wrap: wrap;
    width: 100%;
}

.greeting h2 {
    font-size: 1.3rem;
    margin-bottom: 0.1rem;
}

.greeting p {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.system-status {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(52, 211, 153, 0.1);
    padding: 0.6rem 1.2rem;
    border-radius: 50px;
    border: 1px solid rgba(52, 211, 153, 0.2);
    font-size: 0.85rem;
    color: var(--accent);
    font-weight: 600;
}

.status-dot {
    width: 8px;
    height: 8px;
    background-color: var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(52, 211, 153, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}

/* Grid Layout */
.dashboard-content-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.full-width {
    grid-column: 1 / -1;
}

.dashboard-card {
    background: rgba(10, 15, 26, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 1.5rem;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3), inset 0 1px 1px rgba(255, 255, 255, 0.05);
}

.dashboard-card:hover {
    border-color: rgba(52, 211, 153, 0.25);
    transform: translateY(-4px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.45), 0 0 15px rgba(52, 211, 153, 0.05), inset 0 1px 1px rgba(255, 255, 255, 0.1);
}

.dashboard-card h3 {
    font-size: 1.05rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 0.8rem;
}

.card-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 0.8rem;
    margin-bottom: 1rem;
}
.card-header-flex h3 {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
}

/* Stat Cards Row */
.stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.stat-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 1.2rem;
}

.stat-card .label {
    color: var(--text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.4rem;
}

.stat-card .value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-main);
}

.stat-card .value.accent { color: var(--accent); }

.badge-active {
    background: rgba(52, 211, 153, 0.1);
    color: var(--accent);
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.75rem;
    border: 1px solid rgba(52, 211, 153, 0.2);
    width: fit-content;
}

/* License Management */
.bind-license-form {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1.2rem;
}

.bind-license-form input,
.bind-license-form select {
    flex: 1;
    height: 34px;
    padding: 0 0.7rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.8rem;
}

.bind-license-form input:focus,
.bind-license-form select:focus {
    outline: none;
    border-color: var(--accent);
    background: rgba(52, 211, 153, 0.05);
}
.bind-license-form select option { background: var(--bg-dark); }

.bind-license-form .btn-primary {
    height: 34px;
    padding: 0 1rem;
    font-size: 0.8rem;
    margin-bottom: 0;
    display: inline-flex;
    align-items: center;
}

.license-management .dashboard-table th,
.license-management .dashboard-table td {
    padding: 0.55rem 0.75rem;
}

.license-management .dashboard-table td {
    font-size: 0.8rem;
}

.license-management .dashboard-table th {
    font-size: 0.7rem;
}

.table-responsive {
    overflow-x: auto;
}

.dashboard-table {
    width: 100%;
    border-collapse: collapse;
}

.dashboard-table th,
.dashboard-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.dashboard-table th {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dashboard-table td {
    font-size: 0.85rem;
}

.btn-text {
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-weight: 600;
    color: var(--text-main);
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.btn-text:hover {
    color: var(--accent);
    opacity: 0.9;
}
.text-danger { color: #ef4444; }

#backToSignals {
    color: var(--text-muted);
    font-size: 0.9rem;
    padding: 0.5rem 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
#backToSignals:hover {
    color: var(--accent);
    transform: translateX(-4px);
    text-shadow: 0 0 8px rgba(52, 211, 153, 0.3);
}

/* Downloads Hub */
.downloads-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.download-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 1.2rem;
    text-align: left;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1.2rem;
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.02);
}

.download-card:hover {
    background: rgba(52, 211, 153, 0.05);
    border-color: rgba(52, 211, 153, 0.25);
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3), inset 0 1px 1px rgba(255, 255, 255, 0.05);
}

.dl-icon {
    font-size: 1.8rem;
}

.dl-info {
    flex-grow: 1;
}

.download-card h4 {
    font-size: 0.9rem;
    margin-bottom: 0.2rem;
}

.download-card p {
    color: var(--text-muted);
    font-size: 0.75rem;
}

.btn-outline {
    display: inline-block;
    background: linear-gradient(135deg, #0d261b, #06130d);
    padding: 0.6rem 1.2rem;
    border: 1px solid #065f46;
    color: #34d399;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
    transition: all 0.3s;
}

.btn-outline:hover {
    background: linear-gradient(135deg, #133827, #081c13);
    border-color: #34d399;
    color: #a7f3d0;
    box-shadow: 0 0 15px rgba(52, 211, 153, 0.3);
}

.btn-secondary-outline {
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--text-muted);
}
.btn-secondary-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: none;
}

/* Analytics & Performance Section */
.performance-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.perf-stat-box {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.perf-label {
    color: var(--text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.4rem;
}

.perf-value {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-main);
}

.perf-value.text-green { color: var(--accent); }
.perf-value.text-red { color: #ef4444; }

.chart-container {
    width: 100%;
    min-height: 300px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px dashed rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-muted);
}

/* EA Store Section */
.store-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.store-item-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.02);
}

.store-item-card:hover {
    border-color: rgba(52, 211, 153, 0.2);
    background: rgba(255, 255, 255, 0.04);
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3), inset 0 1px 1px rgba(255, 255, 255, 0.05);
}

.store-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.store-item-header h4 {
    font-size: 0.9rem;
    font-weight: 600;
}

.tier-badge-store {
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 700;
    border: 1px solid;
}
.tier-badge-store.tier-vip { color: #fbbf24; border-color: rgba(251, 191, 36, 0.3); background: rgba(251, 191, 36, 0.1); }
.tier-badge-store.tier-premium { color: #a1a1aa; border-color: rgba(161, 161, 170, 0.3); background: rgba(161, 161, 170, 0.1); }
.tier-badge-store.tier-pro { color: var(--accent); border-color: rgba(52, 211, 153, 0.3); background: rgba(52, 211, 153, 0.1); }
.tier-badge-store.tier-standard { color: var(--text-muted); border-color: rgba(148, 163, 184, 0.3); background: rgba(148, 163, 184, 0.1); }

.store-item-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
    flex-grow: 1;
    margin-bottom: 1rem;
}

.store-item-footer {
    display: flex;
    flex-direction: column;
    gap: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 1rem;
    margin-top: auto;
}

.store-footer-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.store-item-footer .price {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-main);
}

.btn-purchase {
    padding: 0.5rem 1rem !important;
    font-size: 0.8rem !important;
    height: auto !important;
}

/* Recommended Brokers Section */
.brokers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    align-items: center;
}

.broker-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.02);
    padding: 0.75rem 1rem;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.broker-logo {
    height: 25px;
    width: auto;
    filter: grayscale(1) brightness(1.5);
    opacity: 0.8;
    object-fit: contain;
}

#dashboardTrialBtn {
    padding: 0.6rem 1.2rem;
    font-size: 0.85rem;
    height: auto;
}

.text-sm { font-size: 0.85rem; }
.text-muted { color: var(--text-muted); }
.mb-3 { margin-bottom: 1rem; }

/* Dashboard Responsive */
@media (max-width: 1024px) {
    .dashboard-content-grid {
        grid-template-columns: 1fr;
    }
    .downloads-grid {
        grid-template-columns: 1fr;
    }
    .performance-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.license-hero-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(10, 15, 26, 0.75), rgba(255, 255, 255, 0.03));
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.hero-card-left h3 {
    font-size: 1.05rem;
    margin-bottom: 0.3rem;
    font-weight: 600;
}

.license-key {
    font-family: monospace;
    letter-spacing: 1px;
    color: #34d399;
    font-size: 0.72rem;
    background: rgba(0, 0, 0, 0.35);
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    display: inline-block;
}

.hero-card-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.25rem;
}

.btn-disabled,
.btn-disabled:hover {
    background: transparent !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #94a3b8 !important;
    cursor: not-allowed !important;
    box-shadow: none !important;
    transform: none !important;
}

@media (max-width: 768px) {
    .dashboard-container {
        flex-direction: column;
        overflow-y: auto;
    }
    .license-hero-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        padding: 1.25rem;
    }
    .hero-card-right {
        align-items: flex-start;
        gap: 0.5rem;
    }
    .store-grid, .brokers-grid {
        grid-template-columns: 1fr;
    }
    .performance-stats-grid {
        grid-template-columns: 1fr;
    }
    .dashboard-sidebar {
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        padding: 1.5rem;
    }
    .dashboard-main {
        padding: 1.5rem;
        overflow-y: visible;
    }
    .bind-license-form {
        flex-direction: column;
    }
    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
}

/* Dashboard Tabs & Master-Detail Analytics */
.dashboard-tab {
    display: none;
    flex-direction: column;
    gap: 2rem;
    width: 100%;
}

.dashboard-tab.active-tab {
    display: flex;
}

.signals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.signal-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 1.5rem;
    border-radius: 8px;
    transition: 0.3s;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 1.2rem;
}

.signal-card:hover {
    border-color: rgba(52, 211, 153, 0.3);
    background: rgba(52, 211, 153, 0.05);
}

.signal-card-info {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.signal-card-text h4 {
    font-size: 1.1rem;
    margin-bottom: 0.2rem;
    color: var(--text-main);
}

.signal-card-text span {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.signal-card-gain {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--accent);
}

@keyframes pulse-active {
    0% { transform: scale(0.9); opacity: 0.6; }
    50% { transform: scale(1.15); opacity: 1; }
    100% { transform: scale(0.9); opacity: 0.6; }
}

/* Tier Badge Custom Colors for Sidebar Plan */
.tier-badge.badge-vip { color: #fbbf24; border-color: rgba(251, 191, 36, 0.4); background: rgba(251, 191, 36, 0.15); }
.tier-badge.badge-premium { color: #cbd5e1; border-color: rgba(203, 213, 225, 0.4); background: rgba(203, 213, 225, 0.15); }
.tier-badge.badge-pro { color: #34d399; border-color: rgba(52, 211, 153, 0.4); background: rgba(52, 211, 153, 0.15); }
.tier-badge.badge-standard { color: #60a5fa; border-color: rgba(96, 165, 250, 0.4); background: rgba(96, 165, 250, 0.15); }
.tier-badge.badge-trial { color: #10b981; border-color: rgba(16, 185, 129, 0.4); background: rgba(16, 185, 129, 0.15); }
.tier-badge.badge-free { color: #94a3b8; border-color: rgba(148, 163, 184, 0.3); background: rgba(148, 163, 184, 0.08); }

/* 9. Light Theme System Overrides */
:root.light-theme {
    --bg-dark: #f8fafc; /* Crisp light background */
    --text-main: #0f172a; /* Slate 900 */
    --text-muted: #64748b; /* Slate 500 */
    --accent: #059669; /* Emerald 600 (Darker emerald for readability) */
    --accent-hover: #047857; /* Emerald 700 */
}

/* Specific component overrides in light theme */
:root.light-theme body {
    background-color: var(--bg-dark);
    color: var(--text-main);
}

:root.light-theme header {
    background: rgba(255, 255, 255, 0.75) !important;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08) !important;
}

:root.light-theme .nav-links a {
    color: var(--text-muted);
}

:root.light-theme .nav-links a:hover {
    color: var(--text-main);
}

:root.light-theme .product-card {
    background: rgba(255, 255, 255, 0.65) !important;
    border: 1px solid rgba(15, 23, 42, 0.08) !important;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.04) !important;
}

:root.light-theme .product-card:hover {
    box-shadow: 0 15px 35px rgba(5, 150, 105, 0.15) !important;
    border-color: var(--accent) !important;
}

:root.light-theme .product-metrics .metric-item {
    border-bottom: 1px solid rgba(15, 23, 42, 0.05) !important;
}

:root.light-theme .metric-label {
    color: var(--text-muted) !important;
}

:root.light-theme .metric-value {
    color: var(--text-main) !important;
}

:root.light-theme .highlight-placement {
    background: rgba(15, 23, 42, 0.02) !important;
    border: 1px dashed rgba(15, 23, 42, 0.1) !important;
}

:root.light-theme .logo h1 {
    color: var(--text-main);
}

:root.light-theme .logo span {
    color: var(--text-muted);
}

:root.light-theme .dropdown-menu {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 15px 35px rgba(15, 23, 42, 0.1);
}

:root.light-theme .dropdown-menu a {
    color: var(--text-muted);
}

:root.light-theme .dropdown-menu a:hover {
    color: var(--text-main);
    background: rgba(15, 23, 42, 0.02);
}

:root.light-theme .stats-section {
    border-top: 1px solid rgba(15, 23, 42, 0.08) !important;
    background: rgba(15, 23, 42, 0.01) !important;
}

:root.light-theme .auth-modal {
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(15, 23, 42, 0.08);
    color: var(--text-main);
}

:root.light-theme .form-group input,
:root.light-theme .form-group select {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(15, 23, 42, 0.1);
    color: var(--text-main);
}

:root.light-theme .form-group label {
    color: var(--text-muted);
}

:root.light-theme .form-group select option {
    background: #fff;
    color: var(--text-main);
}

:root.light-theme .btn-primary {
    background: linear-gradient(135deg, #059669, #047857) !important;
    border: 1px solid #047857 !important;
    color: #fff !important;
}

:root.light-theme .btn-primary:hover {
    background: linear-gradient(135deg, #047857, #065f46) !important;
    box-shadow: 0 0 20px rgba(5, 150, 105, 0.2) !important;
}

:root.light-theme .btn-institutional-green {
    background: linear-gradient(135deg, #059669, #047857) !important;
    border: 1px solid #047857 !important;
    color: #fff !important;
}

:root.light-theme .btn-institutional-green:hover {
    background: linear-gradient(135deg, #047857, #065f46) !important;
    box-shadow: 0 0 15px rgba(5, 150, 105, 0.2) !important;
}

/* Adaptive client dashboard support in light theme */
:root.light-theme .dashboard-container {
    background: #f1f5f9 !important;
    color: var(--text-main) !important;
}

:root.light-theme .dashboard-sidebar {
    background: rgba(255, 255, 255, 0.8) !important;
    border-right: 1px solid rgba(15, 23, 42, 0.08) !important;
}

:root.light-theme .sidebar-nav a {
    color: var(--text-muted) !important;
}

:root.light-theme .sidebar-nav a.active {
    color: var(--accent) !important;
    background: rgba(5, 150, 105, 0.05) !important;
}

:root.light-theme .dashboard-card {
    background: rgba(255, 255, 255, 0.85) !important;
    border: 1px solid rgba(15, 23, 42, 0.08) !important;
    color: var(--text-main) !important;
}

:root.light-theme .dashboard-header h2 {
    color: var(--text-main) !important;
}

:root.light-theme .system-status {
    background: rgba(15, 23, 42, 0.02) !important;
    border: 1px solid rgba(15, 23, 42, 0.06) !important;
    color: var(--text-muted) !important;
}

:root.light-theme .terminal-container {
    background: #0f172a !important; /* Keep terminal dark for authentic coder aesthetic */
    color: #34d399 !important;
}

:root.light-theme .store-item-card {
    background: rgba(15, 23, 42, 0.02) !important;
    border: 1px solid rgba(15, 23, 42, 0.08) !important;
}

:root.light-theme .store-item-card .price {
    color: var(--text-main) !important;
}

/* 10. Documentation Modal Styles */
.doc-modal {
    max-width: 850px !important;
    width: 90% !important;
    padding: 0 !important;
    overflow: hidden !important;
}

.doc-container {
    display: flex;
    min-height: 500px;
    max-height: 80vh;
}

.doc-sidebar {
    width: 230px;
    background: rgba(255, 255, 255, 0.02);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    flex-shrink: 0;
}

.doc-sidebar h3 {
    font-size: 0.95rem;
    color: var(--accent);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-weight: 700;
}

.doc-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.doc-nav-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
    padding: 0.6rem 0.8rem;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.doc-nav-link:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.03);
}

.doc-nav-link.active {
    color: var(--accent);
    background: rgba(52, 211, 153, 0.08);
    font-weight: 600;
}

.doc-content {
    flex-grow: 1;
    padding: 2.5rem;
    overflow-y: auto;
    background: transparent;
}

.doc-panel h2 {
    font-size: 1.6rem;
    margin-bottom: 1rem;
    font-weight: 700;
    color: var(--text-main);
}

.doc-panel p {
    font-size: 0.92rem;
    line-height: 1.6;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.doc-subsection {
    margin-bottom: 1.5rem;
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid rgba(255, 255, 255, 0.03);
    padding: 1.2rem;
    border-radius: 8px;
}

.doc-subsection h4 {
    font-size: 1rem;
    color: var(--text-main);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.doc-subsection p {
    margin-bottom: 0;
    font-size: 0.88rem;
}

/* Documentation Tables */
.doc-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    font-size: 0.85rem;
    text-align: left;
}

.doc-table th {
    padding: 0.8rem;
    border-bottom: 2px solid rgba(255, 255, 255, 0.08);
    color: var(--text-main);
    font-weight: 600;
}

.doc-table td {
    padding: 0.8rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    color: var(--text-muted);
    line-height: 1.5;
}

/* Light Theme support for doc modal */
:root.light-theme .doc-sidebar {
    background: rgba(15, 23, 42, 0.01) !important;
    border-right: 1px solid rgba(15, 23, 42, 0.08) !important;
}

:root.light-theme .doc-nav-link:hover {
    background: rgba(15, 23, 42, 0.02) !important;
    color: var(--text-main) !important;
}

:root.light-theme .doc-nav-link.active {
    background: rgba(5, 150, 105, 0.08) !important;
    color: var(--accent) !important;
}

:root.light-theme .doc-subsection {
    background: rgba(15, 23, 42, 0.01) !important;
    border: 1px solid rgba(15, 23, 42, 0.05) !important;
}

:root.light-theme .doc-table th {
    border-bottom: 2px solid rgba(15, 23, 42, 0.08) !important;
}

:root.light-theme .doc-table td {
    border-bottom: 1px solid rgba(15, 23, 42, 0.04) !important;
}

/* ==========================================================================
   MYSTERIOUS VIP LIGHT THEME (FROSTED SILVER / OPAL GLASS)
   ========================================================================== */
:root.light-theme {
    /* Deep Matte Silver background to kill harsh brightness */
    --bg-dark: #e2e8f0; 
    --text-main: #1e293b; /* Slate 800 - Deep charcoal instead of stark black */
    --text-muted: #64748b; /* Slate 500 */
    --accent: #047857; /* Deep institutional emerald */
    --border-color: rgba(30, 41, 59, 0.06);
}

/* Force override the blinding white JS background */
:root.light-theme body,
:root.light-theme .app-container,
:root.light-theme .dashboard-container,
:root.light-theme .main-content {
    background-color: var(--bg-dark) !important;
    /* Soft elegant glow at the top for architectural depth */
    background-image: radial-gradient(circle at 50% -20%, rgba(255,255,255, 0.8) 0%, transparent 80%) !important;
    color: var(--text-main);
}

/* The Secret to Mystery: Translucent Privacy Glass (Heavy Blur + Dual Borders) */
:root.light-theme .dashboard-sidebar,
:root.light-theme .sidebar,
:root.light-theme .dashboard-card,
:root.light-theme .metric-card,
:root.light-theme .chart-card-container,
:root.light-theme .strategy-form-card,
:root.light-theme .strategy-card,
:root.light-theme .store-item-card,
:root.light-theme .broker-item {
    background: rgba(248, 250, 252, 0.45) !important; /* Crystal clear frosted tint */
    backdrop-filter: blur(24px) !important;
    -webkit-backdrop-filter: blur(24px) !important;
    /* Luxurious 3D edge effect */
    border-top: 1px solid rgba(255, 255, 255, 0.9) !important;
    border-left: 1px solid rgba(255, 255, 255, 0.9) !important;
    border-right: 1px solid var(--border-color) !important;
    border-bottom: 1px solid var(--border-color) !important;
    box-shadow: 0 20px 40px -10px rgba(15, 23, 42, 0.06) !important; /* Soft spread shadow */
}

/* Sidebars and Navigation Refinements */
:root.light-theme .sidebar-profile,
:root.light-theme .sidebar-brand {
    border-bottom: 1px solid rgba(30, 41, 59, 0.05) !important;
}

:root.light-theme .avatar-lg {
    border: 2px solid #ffffff !important;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05) !important;
}

:root.light-theme .sidebar-nav a,
:root.light-theme .nav-tab-link,
:root.light-theme .exit-btn,
:root.light-theme .back-btn {
    color: #475569 !important;
    font-weight: 600;
}

:root.light-theme .sidebar-nav a:hover,
:root.light-theme .nav-tab-link:hover {
    background: rgba(255, 255, 255, 0.7) !important;
    color: #0f172a !important;
    border-top: 1px solid rgba(255, 255, 255, 1) !important;
    border-left: 1px solid rgba(255, 255, 255, 1) !important;
    box-shadow: 0 4px 15px rgba(15, 23, 42, 0.02) !important;
    transform: translateX(2px) !important;
}

:root.light-theme .sidebar-nav a.active,
:root.light-theme .nav-tab-link.active {
    background: rgba(4, 120, 87, 0.06) !important;
    color: var(--accent) !important;
    border: 1px solid rgba(255, 255, 255, 0.5) !important;
    box-shadow: inset 4px 0 0 var(--accent), 0 4px 15px rgba(4, 120, 87, 0.04) !important;
}

/* Headers & Text Formatting */
:root.light-theme .app-header,
:root.light-theme .dashboard-header {
    background: rgba(226, 232, 240, 0.3) !important;
    backdrop-filter: blur(16px) !important;
    border-bottom: 1px solid rgba(255,255,255,0.5) !important;
}

:root.light-theme .header-title-wrapper h1,
:root.light-theme .greeting h2,
:root.light-theme h3 {
    color: #0f172a !important;
}

:root.light-theme p, 
:root.light-theme .header-subtitle {
    color: #475569 !important;
}

/* Preserve Dark Terminal for Contrast and Authenticity */
:root.light-theme .terminal-container,
:root.light-theme .log-window,
:root.light-theme .execution-matrix {
    background: #0f172a !important; 
    border: 1px solid rgba(15, 23, 42, 0.2) !important;
    box-shadow: inset 0 4px 20px rgba(0,0,0,0.4), 0 10px 30px rgba(15, 23, 42, 0.08) !important;
    color: #10b981 !important; 
}

/* Toggle Buttons */
:root.light-theme .sidebar-toggle-btn {
    background: #f8fafc !important;
    border: 1px solid rgba(30, 41, 59, 0.1) !important;
    color: var(--text-muted) !important;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05) !important;
}

:root.light-theme .sidebar-toggle-btn:hover {
    color: var(--accent) !important;
    box-shadow: 0 4px 15px rgba(4, 120, 87, 0.15) !important;
}

/* ==========================================================================
   DROPDOWN & MOBILE MENU FIXES (VIP GLASSMORPHISM)
   ========================================================================== */

/* Desktop Dropdown Styling */
.nav-dropdown {
    position: relative;
    display: inline-block;
    padding-bottom: 15px; /* Creates a safe hover zone */
}

.dropbtn {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%; /* Position exactly at the bottom of the safe padding */
    left: 50%;
    transform: translateX(-50%);
    min-width: 220px;
    background: rgba(10, 15, 26, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
    z-index: 1000;
    padding: 0.5rem 0;
    margin-top: 0; /* Removing margin to fix the hover disconnect */
}

/* Invisible bridge to completely eliminate the hover gap */
.dropdown-content::after {
    content: '';
    position: absolute;
    top: -15px;
    left: 0;
    width: 100%;
    height: 15px;
    background: transparent;
}

.nav-dropdown:hover .dropdown-content {
    display: block;
    animation: dropFadeIn 0.3s ease forwards;
}

.dropdown-content a {
    display: block;
    padding: 0.8rem 1.5rem;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s;
    position: relative;
    z-index: 2;
}

.dropdown-content a:hover {
    background: rgba(52, 211, 153, 0.08);
    color: var(--accent);
    padding-left: 1.8rem; /* Slight indent on hover */
}

/* Mobile Menu Overrides - Fixing the 70% screen issue */
@media screen and (max-width: 768px) {
    .nav-links {
        position: absolute;
        top: 80px;
        right: 20px;
        left: 20px;
        width: auto !important;
        height: auto !important;
        background: rgba(10, 15, 26, 0.98) !important;
        backdrop-filter: blur(24px) !important;
        -webkit-backdrop-filter: blur(24px) !important;
        border: 1px solid rgba(255, 255, 255, 0.1) !important;
        border-radius: 16px !important;
        padding: 1.5rem !important;
        flex-direction: column;
        gap: 15px;
        box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6) !important;
        /* Hidden by default, toggled by JS usually with an 'active' class */
    }}

/* ==========================================================================
   MOBILE DROPDOWN STRUCTURAL FIXES
   ========================================================================== */
@media screen and (max-width: 768px) {
    /* Fix Issue 1: Force the dropdown wrapper to align perfectly with other nav links */
    .nav-links .nav-dropdown {
        width: 100% !important;
        text-align: center !important;
        margin: 0 !important;
        padding: 0 !important;
        display: block !important;
    }

    /* Make the toggle button look exactly like standard menu items */
    .nav-links .nav-dropdown .dropbtn {
        width: 100% !important;
        justify-content: center !important;
        color: var(--text-main) !important;
        font-size: 1.05rem !important;
        padding: 0.6rem 0 !important;
        border: none !important;
        background: transparent !important;
    }

    /* Fix Issue 2: Force the sub-menu to expand vertically and block horizontal scattering */
    .nav-links .dropdown-content {
        position: relative !important;
        top: 0 !important;
        left: 0 !important;
        transform: none !important;
        width: 100% !important;
        background: rgba(255, 255, 255, 0.02) !important;
        border: 1px solid rgba(255, 255, 255, 0.05) !important;
        border-radius: 8px !important;
        margin-top: 8px !important;
        padding: 0.4rem 0 !important;
        box-shadow: none !important;
        
        /* Enforce vertical stacking context */
        display: none; 
    }

    /* Force inside anchor tags to become full-width blocks (strictly stacked) */
    .nav-links .dropdown-content a {
        display: block !important;
        width: 100% !important;
        text-align: center !important;
        padding: 0.7rem 0 !important;
        margin: 0 !important;
        color: var(--text-muted) !important;
        font-size: 0.95rem !important;
        border: none !important;
    }

    /* Sleek hover state for mobile items */
    .nav-links .dropdown-content a:hover,
    .nav-links .dropdown-content a:active {
        color: var(--accent) !important;
        background: rgba(52, 211, 153, 0.05) !important;
        padding-left: 0 !important; /* Eliminate desktop indentation */
    }
}

@keyframes dropFadeIn {
    from { opacity: 0; transform: translate(-50%, -10px); }
    to { opacity: 1; transform: translate(-50%, 0); }
}

/* ==========================================================================
   COMPACT HORIZONTAL FOOTER STATS
   ========================================================================== */
.footer-bottom,
.footer-stats-container,
.footer-badges {
    display: flex !important;
    flex-direction: row !important;
    justify-content: center !important;
    align-items: center !important;
    flex-wrap: wrap !important; /* Allows wrapping on very tiny screens but keeps it horizontal */
    gap: 24px !important;
    padding: 12px 20px !important;
    width: 100% !important;
    border-top: 1px solid rgba(255, 255, 255, 0.05); /* Clean separation line */
}

/* Make the text and links small, elegant, and strictly in-line */
.footer-bottom span,
.footer-bottom a,
.footer-stats-container span,
.footer-stats-container a,
.footer-badges a {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important; /* Space between any small icon and text */
    font-size: 0.75rem !important; /* Micro-typography for a premium look */
    font-weight: 600 !important;
    color: var(--text-muted) !important;
    white-space: nowrap !important; /* Prevents text from breaking into two lines */
    text-decoration: none !important;
    margin: 0 !important;
    transition: color 0.3s ease !important;
}

.footer-bottom a:hover,
.footer-stats-container a:hover,
.footer-badges a:hover {
    color: var(--accent) !important;
}