:root {
    /* Colors */
    --bg-dark: #050505;
    --bg-card: #0F0F0F;
    --bg-card-hover: #141414;
    --primary-gold: #D4AF37;
    --primary-gold-hover: #C5A028;
    --accent-orange: #FF7F50;
    --text-main: #FFFFFF;
    --text-muted: #A3A3A3;
    --border-color: #262626;

    /* Spacing */
    --container-width: 1200px;
    --header-height: 80px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    width: 100%;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: 'Outfit', 'Inter', sans-serif;
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* Utilities */
.container {
    width: 90%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 15px;
}

.text-gold {
    color: var(--primary-gold);
}

.text-orange {
    color: var(--accent-orange);
}

.text-center {
    text-align: center;
}

.text-start {
    text-align: left;
}

.text-end {
    text-align: right;
}

.text-muted {
    color: var(--text-muted) !important;
}

.text-white {
    color: #fff !important;
}

.font-bold {
    font-weight: 700;
}

.text-4xl {
    font-size: 2.5rem;
}

.text-2xl {
    font-size: 1.5rem;
}

.text-sm {
    font-size: 0.875rem;
}

.d-block {
    display: block;
}

.d-inline-block {
    display: inline-block;
}

.d-flex,
.flex {
    display: flex;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.justify-center {
    justify-content: center;
}

.flex-column {
    flex-direction: column;
}

.flex-wrap {
    flex-wrap: wrap;
}

.w-100 {
    width: 100%;
}

/* Spacing */
.m-0 {
    margin: 0;
}

.mt-2 {
    margin-top: 0.5rem;
}

.mt-4 {
    margin-top: 1rem;
}

.mb-1 {
    margin-bottom: 0.25rem;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mb-6 {
    margin-bottom: 1.5rem;
}

.mb-8 {
    margin-bottom: 2rem;
}

.mb-12 {
    margin-bottom: 3rem;
}

.mt-8 {
    margin-top: 2rem;
}

@media (min-width: 768px) {
    .md-mt-20 {
        margin-top: 5rem;
    }
}

.py-2 {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.py-3 {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

.px-3 {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
}

.p-3 {
    padding: 1rem !important;
}

.gap-2 {
    gap: 0.5rem;
}

.gap-3 {
    gap: 0.75rem;
}

.gap-4 {
    gap: 1rem;
}

.gap-8 {
    gap: 2rem;
}

.grid {
    display: grid;
}

.grid-cols-1 {
    grid-template-columns: 1fr;
}

.grid-cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

@media (min-width: 768px) {
    .md-grid-cols-2 {
        grid-template-columns: repeat(2, 1fr);
    }

    .md-grid-cols-3 {
        grid-template-columns: repeat(3, 1fr);
    }

    .md-grid-cols-4 {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    line-height: 1.2;
    font-weight: 700;
    color: var(--text-main);
}

h1 {
    font-size: 3.5rem;
}

h2 {
    font-size: 2.5rem;
}

h3 {
    font-size: 1.75rem;
}

.section-title {
    margin-bottom: 3rem;
    text-align: center;
}

.section-title span {
    color: var(--primary-gold);
    display: block;
    font-size: 1rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
}

.form-control,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
input[type="number"],
input[type="tel"],
select,
textarea {
    width: 100%;
    padding: 12px 16px;
    background-color: #050505;
    border: 1px solid #333;
    color: white;
    border-radius: 8px;
    outline: none;
    transition: border-color 0.3s;
    font-family: inherit;
    font-size: 1rem;
}

.form-control:focus,
input:focus,
select:focus,
textarea:focus {
    border-color: var(--primary-gold);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 32px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-size: 1rem;
    text-align: center;
}

.btn-primary {
    background-color: var(--primary-gold);
    color: #000;
}

.btn-primary:hover {
    background-color: var(--primary-gold-hover);
    transform: translateY(-2px);
}

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--primary-gold);
    color: var(--primary-gold);
}

.btn-outline:hover {
    background-color: var(--primary-gold);
    color: #000;
}

/* Header & Nav */
header {
    height: var(--header-height);
    display: flex;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: rgba(5, 5, 5, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-muted);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text-main);
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo span {
    color: var(--primary-gold);
}

/* Hero Section */
.hero {
    min-height: 100vh !important;
    padding-top: calc(var(--header-height) + 40px);
    display: flex;
    overflow: hidden;
    position: relative;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -20%;
    right: -10%;
    width: 50%;
    height: 80%;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.1) 0%, rgba(0, 0, 0, 0) 70%);
    filter: blur(60px);
    z-index: -1;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.hero-title {
    margin-bottom: 1.5rem;
}

.hero-desc {
    font-size: 1.125rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
}

/* Services / Features */
.features-section {
    padding: 80px 0;
}

.feature-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 2rem;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.feature-card:hover {
    border-color: var(--primary-gold);
    transform: translateY(-5px);
}

.feature-icon {
    font-size: 2.5rem;
    color: var(--primary-gold);
    margin-bottom: 1.5rem;
}

.feature-title {
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.feature-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Pricing */
.pricing-card {
    background: var(--bg-card);
    padding: 3rem 2rem;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    text-align: center;
    transition: 0.3s;
    position: relative;
    margin-bottom: 2rem;
}

.pricing-card:hover {
    border-color: var(--primary-gold);
    background: var(--bg-card-hover);
}

.price {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-main);
    margin: 1rem 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.price-original {
    font-size: 1.2rem;
    color: #ff3333;
    text-decoration: line-through;
    font-weight: 500;
    margin-right: 5px;
}

.price span {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
    line-height: 1.2;
    text-align: left;
    display: flex;
    flex-direction: column;
}

.features-list {
    margin: 2rem 0;
    text-align: left;
    list-style: none;
    padding: 0;
}

.features-list li {
    margin-bottom: 0.8rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 10px;
}

.features-list li::before {
    content: '✓';
    color: var(--primary-gold);
}

/* Auth Layout */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    background: radial-gradient(circle at center, rgba(212, 175, 55, 0.05) 0%, var(--bg-dark) 70%);
}

.auth-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 40px;
    width: 100%;
    max-width: 450px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

/* Dashboard Layout */
.dashboard-container {
    padding: 40px 0;
    min-height: 80vh;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    background: rgba(212, 175, 55, 0.1);
    color: var(--primary-gold);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
}

/* Footer */
footer {
    padding: 80px 0 30px;
    border-top: 1px solid var(--border-color);
    margin-top: 80px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 3rem;
}

.copyright {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    color: #555;
    font-size: 0.9rem;
}

/* Mobile Nav */
.mobile-menu-btn {
    display: none;
    font-size: 1.5rem;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
}

/* ==========================================================================
   Responsive Design System
   ========================================================================== */

/* Large Tablets & Small Desktops (max-width: 1024px) */
@media (max-width: 1024px) {
    :root {
        --container-width: 95%;
    }

    h1 {
        font-size: 2.8rem;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr 1fr;
        gap: 2rem;
    }
}

/* Tablets & Below (max-width: 768px) */
@media (max-width: 768px) {
    :root {
        --header-height: 70px;
    }

    /* Typography */
    h1 {
        font-size: 2.2rem;
        margin-top: 2rem;
    }

    h2 {
        font-size: 1.8rem;
    }

    .hero-title {
        font-size: 2rem;
        line-height: 1.2;
        margin-bottom: 1rem;
        word-wrap: break-word;
    }

    .hero-desc {
        font-size: 1rem;
        margin-bottom: 1.5rem;
        padding: 0 10px;
    }

    /* Layout & Sectioning */
    .features-section {
        padding: 40px 0;
    }

    .container {
        width: 92%;
        padding: 0 10px;
    }

    /* Navigation Drawer Fix */
    header .container {
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        height: 100%;
    }

    .mobile-menu-btn {
        display: block;
        z-index: 2001;
        background: none;
        border: none;
        color: white;
        font-size: 2rem;
        cursor: pointer;
        transition: 0.3s;
        margin-left: auto;
    }

    .nav-links {
        display: none;
        position: fixed;
        top: 50%;
        left: 50%;
        width: 85%;
        max-width: 320px;
        height: auto;
        min-height: 400px;
        background: rgba(15, 15, 15, 0.95);
        backdrop-filter: blur(20px) saturate(180%);
        -webkit-backdrop-filter: blur(20px) saturate(180%);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 32px;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding: 2rem;
        z-index: 2005;
        opacity: 0;
        transform: translate(-50%, -45%) scale(0.9);
        transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
        box-shadow: 0 40px 80px -10px rgba(0, 0, 0, 0.8);
    }

    .nav-links.active {
        display: flex;
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }

    .nav-links li {
        width: 100%;
        text-align: center;
        margin: 0.8rem 0;
        opacity: 0;
        transform: translateY(10px);
        transition: 0.4s ease;
    }

    .nav-links.active li {
        opacity: 1;
        transform: translateY(0);
    }

    /* Staggered animation */
    .nav-links.active li:nth-child(1) {
        transition-delay: 0.1s;
    }

    .nav-links.active li:nth-child(2) {
        transition-delay: 0.15s;
    }

    .nav-links.active li:nth-child(3) {
        transition-delay: 0.2s;
    }

    .nav-links.active li:nth-child(4) {
        transition-delay: 0.25s;
    }

    .nav-links.active li:nth-child(5) {
        transition-delay: 0.3s;
    }

    .nav-links.active li:nth-child(6) {
        transition-delay: 0.35s;
    }

    .nav-links a {
        font-size: 1.5rem;
        font-weight: 700;
        color: rgba(255, 255, 255, 0.9);
        text-transform: none;
        letter-spacing: -0.5px;
        display: block;
        padding: 5px;
        transition: 0.3s;
    }

    .nav-links a:hover,
    .nav-links a.active {
        color: var(--primary-gold);
        background: none;
        box-shadow: none;
        transform: scale(1.1);
        border: none;
        text-shadow: 0 0 15px rgba(212, 175, 55, 0.4);
    }

    header .btn-primary {
        display: none !important;
    }

    /* Backdrop Overlay */
    body::after {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.6);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        z-index: 1500;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.4s ease;
    }

    body.nav-open::after {
        opacity: 1;
        pointer-events: all;
    }

    /* CRITICAL FIX: Break fixed positioning context */
    body.nav-open header {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        transform: none !important;
        filter: none !important;
        background: transparent !important;
        border-bottom: none !important;
        z-index: 2010 !important;
        /* Ensure header container is above backdrop */
    }

    /* Ensure button stays on top */
    body.nav-open .mobile-menu-btn {
        position: relative;
        z-index: 2011;
    }

    header .btn-primary {
        display: none;
    }

    /* Universal Stacking for Flex Containers */
    .d-flex:not(.nav-links):not(header *):not(.container):not(.filter-container) {
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
    }

    .gap-3,
    .gap-4 {
        gap: 1rem !important;
    }

    .justify-between {
        justify-content: center !important;
    }

    /* Grid Overrides for Mobile */
    .grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }

    /* Card Polish */
    .pricing-card {
        padding: 2rem 1.25rem;
        margin-bottom: 1.5rem;
    }

    .price {
        font-size: 1.8rem;
        flex-wrap: wrap;
    }

    .price-original {
        font-size: 1rem;
    }

    /* Footer Symmetry */
    .footer-grid {
        grid-template-columns: 1fr !important;
        text-align: center;
        gap: 2.5rem;
    }

    .footer-grid div {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
}

/* Specific Fix for Pricing Tables & Lists */
@media (max-width: 768px) {
    .features-grid-list {
        grid-template-columns: 1fr !important;
    }

    table {
        font-size: 0.8rem;
    }

    th,
    td {
        padding: 10px !important;
    }
}

/* Global Responsive Helpers (Desktop-First fallback) */
.grid {
    display: grid;
    gap: 2rem;
}

.grid-cols-1 {
    grid-template-columns: 1fr;
}

.grid-cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-cols-4 {
    grid-template-columns: repeat(4, 1fr);
}

@media (min-width: 769px) {
    .md-grid-cols-2 {
        grid-template-columns: repeat(2, 1fr);
    }

    .md-grid-cols-3 {
        grid-template-columns: repeat(3, 1fr);
    }

    .md-grid-cols-4 {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 1025px) {
    .lg-grid-cols-3 {
        grid-template-columns: repeat(3, 1fr);
    }

    .lg-grid-cols-4 {
        grid-template-columns: repeat(4, 1fr);
    }
}