/* Caprizar NextGen - Ultra-Responsive Mobile & Desktop Multi-Page View Engine */
:root {
    --bg-black: #0A0E17;
    --bg-surface: #111723;
    --bg-card: rgba(26, 32, 44, 0.82);
    --bg-card-hover: rgba(38, 47, 63, 0.95);
    --border-glass: rgba(255, 107, 0, 0.22);
    --brand-orange: #FF6B00;
    --brand-orange-light: #FF8533;
    --neon-gold: #F59E0B;
    --neon-cyan: #00F0FF;
    --neon-emerald: #10B981;
    --text-white: #FFFFFF;
    --text-body: #E2E8F0;
    --text-muted: #94A3B8;
    --gradient-brand: linear-gradient(135deg, #FF6B00, #FF8533, #F59E0B);
    --shadow-orange: 0 0 25px rgba(255, 107, 0, 0.35);
    --shadow-gold: 0 0 25px rgba(245, 158, 11, 0.3);
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 22px;
}

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

html, body {
    width: 100%;
    min-height: 100vh;
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-black);
    color: var(--text-white);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .font-heading {
    font-family: 'Outfit', sans-serif;
    letter-spacing: -0.5px;
}

/* Background Animated Canvas */
#particleCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    pointer-events: none;
}

/* Faded Frosted Glass Navigation Header */
.nav-nextgen {
    position: fixed;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 96%;
    max-width: 1420px;
    height: 52px;
    z-index: 1000;
    background: rgba(17, 23, 35, 0.92);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 107, 0, 0.35);
    border-radius: 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 14px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.9);
}

/* Prominent Logo Badge Container */
.brand-nextgen {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    cursor: pointer;
    background: rgba(255, 107, 0, 0.14);
    border: 1px solid rgba(255, 107, 0, 0.4);
    padding: 4px 14px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    transition: all 0.25s ease;
    height: 38px;
    flex-shrink: 0;
}

.brand-nextgen:hover {
    background: rgba(255, 107, 0, 0.25);
    box-shadow: var(--shadow-orange);
    transform: scale(1.03);
}

.brand-logo-img {
    height: 32px;
    width: auto;
    max-width: 160px;
    object-fit: contain;
    filter: drop-shadow(0 0 8px rgba(255, 107, 0, 0.8));
    display: block;
}

.nav-nextgen-links {
    display: flex;
    gap: 4px;
    list-style: none;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
    padding: 2px 0;
}

.nav-nextgen-links::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

.page-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 700;
    padding: 6px 13px;
    border-radius: 18px;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.page-btn:hover {
    color: var(--brand-orange);
    background: rgba(255, 107, 0, 0.14);
}

.page-btn.active {
    background: linear-gradient(135deg, var(--brand-orange), var(--brand-orange-light));
    color: #000;
    box-shadow: var(--shadow-orange);
    font-weight: 800;
}

.btn-neon {
    background: linear-gradient(135deg, var(--brand-orange), var(--brand-orange-light));
    color: #000;
    font-weight: 800;
    padding: 7px 16px;
    border-radius: 22px;
    text-decoration: none;
    font-size: 12.5px;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-orange);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.btn-neon:hover {
    transform: scale(1.04);
    box-shadow: 0 0 30px rgba(255, 107, 0, 0.7);
}

/* Main Viewport Container */
.main-viewport {
    position: relative;
    z-index: 10;
    width: 100vw;
    min-height: 100vh;
    padding-top: 68px;
    padding-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.page-view {
    display: none;
    width: 96vw;
    max-width: 1360px;
    min-height: calc(100vh - 78px);
    margin: 0 auto;
    padding: 10px 14px;
    box-sizing: border-box;
    flex-direction: column;
    justify-content: space-between;
    animation: pageSlideIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.page-view.active {
    display: flex;
}

@keyframes pageSlideIn {
    from { opacity: 0; transform: translateY(8px) scale(0.99); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.nextgen-tag {
    display: inline-block;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding: 4px 12px;
    border-radius: 16px;
    background: rgba(255, 107, 0, 0.12);
    border: 1px solid var(--brand-orange);
    color: var(--brand-orange);
    margin-bottom: 6px;
    box-shadow: 0 0 12px rgba(255, 107, 0, 0.25);
}

.nextgen-title {
    font-size: clamp(20px, 2.8vw, 32px);
    font-weight: 900;
    color: var(--text-white);
    line-height: 1.18;
    margin-bottom: 6px;
}

.nextgen-title .gradient-text {
    background: linear-gradient(135deg, var(--brand-orange), #FF9E4A, var(--neon-gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nextgen-desc {
    font-size: clamp(11.5px, 1.15vw, 13.5px);
    color: var(--text-muted);
    max-width: 800px;
    margin-bottom: 12px;
    line-height: 1.5;
}

/* Glass Cards Fitted */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    padding: 14px 18px;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--gradient-brand);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.glass-card:hover {
    border-color: rgba(255, 107, 0, 0.5);
    transform: translateY(-3px);
    box-shadow: var(--shadow-orange);
}

.glass-card:hover::before {
    opacity: 1;
}

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }

/* Hero Page Layout */
.hero-nextgen-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 20px;
    align-items: center;
    flex: 1;
}

.hero-nextgen-image {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-glass);
    box-shadow: 0 0 35px rgba(255, 107, 0, 0.25);
    height: 100%;
    min-height: 200px;
    max-height: 360px;
}

.hero-nextgen-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* HUD Ticker */
.hud-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-top: 10px;
}

.hud-card {
    background: rgba(17, 23, 35, 0.92);
    border: 1px solid rgba(255, 107, 0, 0.28);
    border-radius: var(--radius-md);
    padding: 12px;
    text-align: center;
}

.hud-value {
    font-size: clamp(18px, 2vw, 26px);
    font-weight: 900;
    font-family: 'Outfit', sans-serif;
    color: var(--brand-orange);
    text-shadow: 0 0 12px rgba(255, 107, 0, 0.4);
}

.hud-label {
    font-size: 10.5px;
    color: var(--text-muted);
    margin-top: 2px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Sub-Tabs */
.nextgen-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
    overflow-x: auto;
    white-space: nowrap;
    padding-bottom: 4px;
}

.nextgen-tab-btn {
    background: rgba(26, 32, 44, 0.8);
    border: 1px solid var(--border-glass);
    color: var(--text-muted);
    font-size: 11.5px;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 18px;
    cursor: pointer;
    transition: all 0.25s;
    flex-shrink: 0;
}

.nextgen-tab-btn.active {
    background: linear-gradient(135deg, var(--brand-orange), var(--brand-orange-light));
    color: #000;
    border-color: transparent;
    box-shadow: var(--shadow-orange);
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
    animation: pageSlideIn 0.35s ease;
}

/* Table Responsive Wrappers */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.hud-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 540px; /* Ensures tables don't squash on mobile */
}

.hud-table th {
    background: rgba(255, 107, 0, 0.12);
    color: var(--brand-orange);
    font-size: 11.5px;
    font-weight: 800;
    padding: 7px 10px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 107, 0, 0.3);
}

.hud-table td {
    padding: 7px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 12px;
    color: var(--text-body);
}

.hud-table tr:hover td {
    background: rgba(255, 107, 0, 0.08);
    color: #FFF;
}

/* Terminal Simulator */
.terminal-box {
    background: rgba(17, 23, 35, 0.95);
    border: 1px solid var(--brand-orange);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: 0 0 35px rgba(255, 107, 0, 0.25);
    flex: 1;
}

input[type=range] {
    width: 100%;
    height: 6px;
    background: #1A202C;
    border-radius: 3px;
    outline: none;
    accent-color: var(--brand-orange);
    cursor: pointer;
}

/* FAQ */
.faq-box {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    margin-bottom: 8px;
    overflow: hidden;
}

.faq-q {
    padding: 12px 16px;
    font-weight: 700;
    color: var(--text-white);
    font-size: 13px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-q:hover {
    color: var(--brand-orange);
}

.faq-a {
    padding: 0 16px 12px 16px;
    font-size: 12.5px;
    color: var(--text-body);
    display: none;
    line-height: 1.45;
}

/* Inputs */
.nextgen-input, .nextgen-select, .nextgen-textarea {
    width: 100%;
    padding: 8px 12px;
    background: rgba(17, 23, 35, 0.9);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    color: var(--text-white);
    font-size: 12.5px;
    outline: none;
    transition: all 0.25s;
}

.nextgen-input:focus, .nextgen-select:focus, .nextgen-textarea:focus {
    border-color: var(--brand-orange);
    box-shadow: var(--shadow-orange);
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(10, 14, 23, 0.92);
    backdrop-filter: blur(16px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal.active { display: flex; }

.modal-content-box {
    background: var(--bg-surface);
    border: 1px solid var(--brand-orange);
    border-radius: var(--radius-lg);
    max-width: 560px;
    width: 92%;
    padding: 22px;
    position: relative;
    box-shadow: 0 0 45px rgba(255, 107, 0, 0.35);
}

/* Page Navigation Footer Bar */
.page-nav-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 10px;
    border-top: 1px solid var(--border-glass);
    margin-top: 10px;
}

/* 📱 MOBILE & TABLET OPTIMIZATIONS (Max-Width 900px) */
@media (max-width: 900px) {
    html, body {
        overflow-y: auto !important; /* Allow natural mobile scrolling */
        height: auto;
    }

    .nav-nextgen {
        width: 98%;
        height: 50px;
        padding: 0 8px;
        gap: 6px;
    }

    .brand-logo-img {
        height: 26px;
    }

    .brand-nextgen {
        padding: 2px 10px;
        height: 34px;
    }

    .nav-nextgen-links {
        display: flex;
        flex: 1;
        overflow-x: auto;
        gap: 2px;
        margin: 0 4px;
    }

    .page-btn {
        font-size: 11.5px;
        padding: 4px 9px;
    }

    .btn-neon {
        font-size: 10.5px;
        padding: 5px 11px;
    }

    .main-viewport {
        height: auto;
        min-height: auto;
        padding-top: 64px;
        padding-bottom: 24px;
    }

    .page-view {
        width: 95vw;
        height: auto;
        min-height: auto;
        padding: 8px;
    }

    .hero-nextgen-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .hero-nextgen-image {
        max-height: 240px;
    }

    .grid-2, .grid-3, .grid-4 {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .hud-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .hud-value {
        font-size: 20px;
    }

    .nextgen-title {
        font-size: 22px;
    }

    .nextgen-desc {
        font-size: 12px;
    }

    .glass-card {
        padding: 12px 14px;
    }

    .page-nav-bar {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }

    .page-nav-bar button {
        width: 100%;
        justify-content: center;
    }
}
