:root {
    --bg-primary: #060b18;
    --bg-secondary: #0d1526;
    --text-primary: #f0f6ff;
    --text-secondary: #8ba3c7;
    --text-muted: #4d6a8a;
    --accent-primary: #38bdf8;
    --accent-secondary: #818cf8;
    --accent-gradient: linear-gradient(135deg, #38bdf8, #818cf8);
    --border-color: rgba(56, 189, 248, 0.08);
    --card-bg: #0d1526;
    --card-radius: 16px;
    --btn-radius: 10px;
    --glass-border: rgba(56, 189, 248, 0.1);
    --shadow-glow: 0 0 30px rgba(56, 189, 248, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
}

body {
    background-color: var(--bg-primary);
    background-image: radial-gradient(ellipse 80% 50% at 50% -10%, rgba(56, 189, 248, 0.07) 0%, transparent 60%);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

.layout-wrapper {
    display: flex;
    min-height: 100vh;
}

main {
    flex: 1;
    padding: 30px;
    margin-left: 260px;
    transition: margin-left 0.3s ease;
}

.card {
    background: rgba(13, 21, 38, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: var(--card-radius);
    padding: 22px;
    border: 1px solid rgba(56, 189, 248, 0.1);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
    transition: border-color 0.3s, box-shadow 0.3s;
}

.card:hover {
    border-color: rgba(56, 189, 248, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(56, 189, 248, 0.06);
}


.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--btn-radius);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, #38bdf8, #6366f1);
    color: #fff;
    box-shadow: 0 4px 16px rgba(56, 189, 248, 0.25);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(56, 189, 248, 0.4);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.05);
}

input,
select,
textarea {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: var(--btn-radius);
    outline: none;
    transition: all 0.2s;
}

input:focus,
select:focus,
textarea:focus {
    border-color: rgba(56, 189, 248, 0.5);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.12);
    background: rgba(56, 189, 248, 0.03);
}

/* Sidebar */
aside {
    background: rgba(6, 11, 24, 0.95);
    border-right: 1px solid rgba(56, 189, 248, 0.08);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.nav-link {
    margin: 3px 12px;
    border-radius: 12px;
    opacity: 0.75;
    transition: all 0.22s;
}

.nav-link:hover {
    opacity: 1;
    background: rgba(56, 189, 248, 0.07);
    color: #fff;
}

.nav-link.active {
    opacity: 1;
    background: linear-gradient(90deg, rgba(56, 189, 248, 0.15), rgba(99, 102, 241, 0.08));
    color: var(--accent-primary) !important;
    border: 1px solid rgba(56, 189, 248, 0.2);
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.06);
}

/* Table */
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 8px;
}

th {
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.85rem;
    padding: 0 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

td {
    background: rgba(13, 21, 38, 0.6);
    padding: 18px 20px;
    border-top: 1px solid rgba(56, 189, 248, 0.04);
    border-bottom: 1px solid rgba(56, 189, 248, 0.04);
}

tr td:first-child {
    border-radius: 12px 0 0 12px;
    border-left: 1px solid rgba(56, 189, 248, 0.04);
}

tr td:last-child {
    border-radius: 0 12px 12px 0;
    border-right: 1px solid rgba(56, 189, 248, 0.04);
}

tr:hover td {
    background: rgba(56, 189, 248, 0.04);
    transition: background 0.2s;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* main>* {
    animation: fadeInUp 0.6s ease-out forwards;
} */

main>*:nth-child(2) {
    animation-delay: 0.1s;
}

main>*:nth-child(3) {
    animation-delay: 0.2s;
}

/* Responsive Grids */
.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
}

.grid-2-1 {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 25px;
}

.grid-1-5-1 {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 25px;
}

.grid-responsive {
    display: grid;
    gap: 25px;
}

@media (max-width: 1024px) {

    .grid-4,
    .grid-3,
    .grid-2,
    .grid-2-1,
    .grid-1-5-1,
    .grid-responsive {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 1024px) {

    html,
    body {
        max-width: 100vw;
        overflow-x: hidden;
    }

    .layout-wrapper {
        flex-direction: column;
    }

    main {
        margin-left: 0 !important;
        padding: 20px !important;
        width: 100% !important;
        min-width: 100% !important;
        flex: 1 1 auto;
    }

    aside {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 1000 !important;
    }

    aside.active {
        transform: translateX(0);
        box-shadow: 4px 0 40px rgba(0, 0, 0, 0.8);
    }

    .hide-mobile {
        display: none !important;
    }
}

@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }

    .stat-value {
        font-size: 1.8rem;
    }

    .card {
        padding: 20px;
    }

    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}

/* Table Responsiveness */
.table-container {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 20px;
}

/* Mobile Header Styles */
.mobile-header {
    display: none;
    position: sticky;
    top: 0;
    z-index: 900;
    padding: 15px 20px;
    background: rgba(6, 11, 24, 0.92);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(56, 189, 248, 0.08);
    justify-content: space-between;
    align-items: center;
}

@media (min-width: 1025px) {
    .mobile-header {
        display: none !important;
    }
}

@media (max-width: 1024px) {
    .mobile-header {
        display: flex;
    }

    #mobileMenuClose {
        display: block !important;
    }
}

.hide-desktop {
    display: none;
}

/* Overlay for mobile sidebar */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 950;
}

.sidebar-overlay.active {
    display: block;
}

/* Hero Responsiveness */
.hero-title {
    font-size: 4rem;
}

.hero-subtitle {
    font-size: 1.25rem;
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1rem;
        padding: 0 15px;
    }

    .hero-buttons {
        flex-direction: column;
        padding: 0 20px;
    }

    .hero-buttons .btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 1024px) {
    .hide-desktop {
        display: block;
    }

    /* Mobile Interaction Improvements */
    .responsive-stack {
        flex-direction: column !important;
        gap: 20px !important;
    }

    .w-full-mobile {
        width: 100% !important;
        min-width: 100% !important;
        max-width: 100% !important;
    }

    .border-b-mobile {
        border-right: none !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
        padding-bottom: 20px !important;
        margin-bottom: 20px !important;
    }

    .no-border-last-mobile:last-child {
        border-bottom: none !important;
        margin-bottom: 0 !important;
        padding-bottom: 0 !important;
    }

    .p-mobile-sm {
        padding: 15px !important;
    }
}

/* Landing Page Specific Blue Theme Override */
.landing-wrapper {
    /* Deep Sea to Midnight Blue Gradient */
    --bg-primary: #020617;
    --bg-secondary: #0f172a;
    --bg-tertiary: #1e293b;

    --bg-gradient: radial-gradient(circle at 10% 10%, #0c1a3b 0%, #020617 40%),
        radial-gradient(circle at 90% 90%, #082f49 0%, #020617 40%);

    /* Electric Blue Accents */
    --accent-primary: #38bdf8;
    /* Light Blue / Cyan */
    --accent-secondary: #3b82f6;
    /* Classic Blue */
    --accent-tertiary: #6366f1;
    /* Indigo */

    --accent-gradient: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));

    /* Specific Landing Page Utilities */
    --landing-glass: rgba(15, 23, 42, 0.7);
    --landing-border: rgba(56, 189, 248, 0.15);
}

.landing-wrapper .hero-title {
    background: linear-gradient(135deg, #e0f2fe, #38bdf8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.landing-wrapper .card {
    background: var(--landing-glass);
    border: 1px solid var(--landing-border);
}

.landing-wrapper .card:hover {
    border-color: rgba(56, 189, 248, 0.4);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 30px rgba(56, 189, 248, 0.1);
}

.landing-step-icon {
    width: 60px;
    height: 60px;
    background: rgba(56, 189, 248, 0.1);
    border: 1px solid rgba(56, 189, 248, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: var(--accent-primary);
    position: relative;
    z-index: 2;
}

.landing-connector {
    position: relative;
}

@media (min-width: 769px) {
    .landing-connector::after {
        content: '';
        position: absolute;
        top: 30px;
        left: calc(50% + 40px);
        width: calc(100% - 80px);
        height: 2px;
        background: repeating-linear-gradient(90deg, var(--landing-border) 0, var(--landing-border) 10px, transparent 10px, transparent 20px);
        z-index: 1;
    }
}

/* ===== CONTAINER ===== */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ===== GLASS BORDER VARIABLE ===== */
:root {
    --glass-border: rgba(255, 255, 255, 0.06);
}

/* ===== COMPREHENSIVE MOBILE RESPONSIVE ===== */

/* --- Tablet (769px – 1024px) --- */
@media (max-width: 1024px) {
    .container {
        padding: 0 20px;
    }
}

/* --- Mobile (max 768px) --- */
@media (max-width: 768px) {

    .container {
        padding: 0 16px;
    }

    /* Typography scaling */
    h2 {
        font-size: 1.8rem !important;
    }

    /* ===== HERO SECTIONS ===== */
    .hero-section {
        padding: 100px 0 60px !important;
        min-height: auto !important;
    }

    .hero-title-main {
        font-size: 2.4rem !important;
        letter-spacing: -1px !important;
    }

    .hero-subtitle {
        font-size: 1rem !important;
        padding: 0;
    }

    .hero-actions {
        flex-direction: column;
        gap: 12px;
    }

    .hero-actions a,
    .hero-actions button {
        width: 100%;
        justify-content: center;
        text-align: center;
    }

    .btn-hero,
    .btn-hero-fill {
        padding: 15px 30px !important;
        font-size: 1rem !important;
        width: 100%;
        justify-content: center;
    }

    /* Trust bar stacking */
    .trust-bar {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 15px !important;
    }

    .trust-bar>div:last-child {
        margin-left: 0 !important;
        flex-wrap: wrap;
    }

    /* ===== ABOUT / CONTACT HEROES ===== */
    .about-hero,
    .contact-hero,
    .forex-hero {
        padding: 100px 0 60px !important;
    }

    /* ===== CHART FRAME ===== */
    .chart-frame {
        border-radius: 14px !important;
    }

    .chart-section {
        padding: 50px 0 60px !important;
    }

    .tradingview-widget-container {
        min-height: 300px;
    }

    #mainChart {
        height: 400px !important;
    }

    /* ===== STATS STRIP ===== */
    .stats-section .grid-4,
    .stat-item {
        border-left: none !important;
    }

    .stats-section .grid-4 {
        grid-template-columns: 1fr 1fr !important;
        gap: 0 !important;
    }

    .stat-value {
        font-size: 2rem !important;
    }

    /* ===== STEP CARDS ===== */
    .step-card {
        padding: 30px 24px !important;
    }

    /* ===== PAIR CARDS (FOREX) ===== */
    .pair-card {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 15px;
    }

    .pair-card>div:last-child {
        margin-left: 0 !important;
        width: 100%;
    }

    .pair-card>div:last-child a {
        width: 100%;
        justify-content: center;
        text-align: center;
        display: flex !important;
    }

    /* ===== TRADING PAGE ===== */
    .trading-hero-bar .container {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 10px !important;
    }

    #symbolBtns {
        flex-wrap: wrap !important;
        gap: 6px !important;
    }

    .symbol-btn {
        padding: 6px 12px !important;
        font-size: 0.78rem !important;
    }

    #intervalBtns {
        margin-left: 0 !important;
    }

    .interval-btn {
        padding: 5px 10px !important;
        font-size: 0.75rem !important;
    }

    /* ===== MINI TICKER CARDS ===== */
    #miniTickers {
        grid-template-columns: 1fr 1fr !important;
    }

    .mini-ticker-card {
        padding: 14px 16px !important;
    }

    /* ===== CONTACT FORM ===== */
    .form-input {
        padding: 12px 14px !important;
        font-size: 0.9rem !important;
    }

    /* ===== FAQ ===== */
    .faq-question {
        padding: 14px 18px !important;
        font-size: 0.9rem;
    }

    .faq-answer {
        padding: 0 18px 14px !important;
        font-size: 0.9rem;
    }

    /* ===== TEAM CARDS ===== */
    .team-card {
        padding: 25px 20px !important;
    }

    .team-avatar {
        width: 65px !important;
        height: 65px !important;
        font-size: 1.4rem !important;
    }

    /* ===== MILESTONES ===== */
    .milestone {
        padding: 22px 18px !important;
    }

    .milestone-year {
        font-size: 1.1rem !important;
        min-width: 60px !important;
    }

    /* ===== CTA SECTIONS ===== */
    .cta-section {
        padding: 80px 0 !important;
    }

    /* ===== VALUE CARDS ===== */
    .value-card {
        padding: 25px 20px !important;
    }

    /* ===== CONTACT METHOD CARDS ===== */
    .contact-method {
        padding: 30px 22px !important;
    }
}

/* --- Small Phone (max 480px) --- */
@media (max-width: 480px) {

    .container {
        padding: 0 14px;
    }

    h2 {
        font-size: 1.5rem !important;
    }

    .hero-title-main {
        font-size: 2rem !important;
    }

    .hero-badge {
        font-size: 0.78rem !important;
        padding: 8px 16px !important;
    }

    /* Stats 2x2 grid */
    .stats-section .grid-4 {
        grid-template-columns: 1fr 1fr !important;
    }

    .stat-value {
        font-size: 1.6rem !important;
    }

    .stat-label {
        font-size: 0.72rem !important;
    }

    /* Mini tickers single column */
    #miniTickers {
        grid-template-columns: 1fr !important;
    }

    /* Milestones single column */
    .milestone {
        flex-direction: column !important;
        gap: 10px !important;
    }
}

/* ===== FOOTER RESPONSIVE ===== */
@media (max-width: 768px) {
    footer .container>div:first-child {
        grid-template-columns: 1fr !important;
        gap: 35px !important;
    }

    footer .container>div:last-child {
        flex-direction: column !important;
        text-align: center;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    footer .container>div:first-child {
        grid-template-columns: 1fr 1fr !important;
        gap: 30px !important;
    }
}

/* ===== INLINE GRID OVERRIDES (for grids defined via style attr) ===== */
@media (max-width: 768px) {
    [style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }

    [style*="grid-template-columns:1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }

    [style*="grid-template-columns: repeat(auto-fill"] {
        grid-template-columns: 1fr 1fr !important;
    }

    [style*="grid-template-columns:repeat(auto-fill"] {
        grid-template-columns: 1fr 1fr !important;
    }

    [style*="grid-template-columns:2fr 1fr 1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }

    [style*="grid-template-columns: 2fr 1fr 1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }
}