/* ==========================================================================
   Apexsions — The Peak Civilizations. Design system: Monolithic Obsidian, Celestial Ivory & Royal Gold.
   Dual-Theme Architecture:
   Mode 1: Imperial Obsidian (Dark Mode — Default)
   Mode 2: Sovereign Ivory (Light Mode — High Legibility & Warm Aristocratic)
   ========================================================================== */

:root,
[data-bs-theme="dark"],
body[data-bs-theme="dark"] {
    /* Obsidian & Void Black Architecture (The Peak Civilizations) */
    --apx-void-black: #090A0D;      /* Background Utama / Deepest Void */
    --apx-deep-obsidian: #111318;   /* Elemen Deep Surface / Elevated Base */
    --apx-obsidian: #181A20;        /* Primary Surface / Cards / Panels */
    --apx-soft-obsidian: #222630;   /* Raised Surface / Inputs / Hover */

    --apx-bg-deep: var(--apx-void-black);
    --apx-bg-base: var(--apx-void-black);
    --apx-bg-surface: var(--apx-obsidian);
    --apx-bg-card: var(--apx-obsidian);
    --apx-bg-surface-raised: var(--apx-deep-obsidian);
    --apx-bg-surface-hover: var(--apx-soft-obsidian);
    --apx-bg-input: var(--apx-deep-obsidian);
    --apx-bg-input-focus: #141720;
    --apx-bg-navbar: rgba(9, 10, 13, 0.95);
    --apx-bg-gradient: linear-gradient(180deg, #07080a 0%, #090A0D 50%, #111318 100%);

    /* Imperial Royal & Radiant Gold Hierarchy */
    --apx-gold-radiant: #F1D58A;    /* Radiant Gold */
    --apx-gold-light: #E8C878;      /* Light Gold / Highlight & Glow */
    --apx-gold: #C9A45C;            /* Royal Gold / Primary Accent */
    --apx-gold-antique: #9E7B3E;    /* Antique Gold */
    --apx-gold-dark: #72552A;       /* Deep Gold */

    --apx-gold-glow: rgba(201, 164, 92, 0.18);
    --apx-gold-border: rgba(201, 164, 92, 0.30);
    --apx-gold-border-subtle: rgba(201, 164, 92, 0.15);

    /* Mythic Emerald / Online Status */
    --apx-emerald: #10b981;
    --apx-emerald-light: #34d399;
    --apx-emerald-dark: #047857;
    --apx-emerald-glow: rgba(16, 185, 129, 0.25);

    /* Celestial Ivory & Marble Typography (WCAG AAA High-Contrast > 17:1) */
    --apx-ivory-light: #FFFDF8;     /* Ivory Light / Pure Highlight */
    --apx-ivory-celestial: #F4EFE6; /* Celestial Ivory / Primary Headings & Brand */
    --apx-ivory-marble: #DDD7CC;    /* Marble / Primary Body Copy */
    --apx-ivory-stone: #B8B1A5;     /* Stone / Secondary Text & Muted Labels */

    --apx-text-main: var(--apx-ivory-celestial);
    --apx-text-sub: var(--apx-ivory-marble);
    --apx-text-muted: var(--apx-ivory-stone);
    --apx-text-dim: #8E877D;

    /* Borders & Shadows */
    --apx-border: rgba(244, 239, 230, 0.10);
    --apx-border-hover: rgba(201, 164, 92, 0.45);
    --apx-shadow-card: 0 10px 28px -6px rgba(0, 0, 0, 0.75);
    --apx-shadow-elevated: 0 18px 40px -8px rgba(0, 0, 0, 0.90);

    /* Radii & Timing */
    --apx-radius-lg: 12px;
    --apx-radius-md: 8px;
    --apx-radius-sm: 6px;
    --apx-radius-xs: 4px;
    --apx-transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);

    /* Bootstrap 5 Native Dark Mode Variable Overrides */
    --bs-body-bg: var(--apx-bg-base);
    --bs-body-color: var(--apx-text-main);
    --bs-card-bg: var(--apx-bg-surface);
    --bs-card-color: var(--apx-text-main);
    --bs-card-border-color: var(--apx-gold-border-subtle);
    --bs-border-color: var(--apx-border);
    --bs-tertiary-bg: var(--apx-bg-surface-raised);
    --bs-primary: var(--apx-gold);
}

[data-bs-theme="light"],
body[data-bs-theme="light"] {
    /* Sovereign Ivory Architecture (Clean, Aristocratic, High-Contrast) */
    --apx-void-black: #F6F8FA;
    --apx-deep-obsidian: #EDF2F7;
    --apx-obsidian: #FFFFFF;
    --apx-soft-obsidian: #E2E8F0;

    --apx-bg-deep: #F6F8FA;
    --apx-bg-base: #F6F8FA;
    --apx-bg-surface: #FFFFFF;
    --apx-bg-card: #FFFFFF;
    --apx-bg-surface-raised: #F8FAFC;
    --apx-bg-surface-hover: #F1F5F9;
    --apx-bg-input: #FFFFFF;
    --apx-bg-input-focus: #FFFFFF;
    --apx-bg-navbar: rgba(255, 255, 255, 0.95);
    --apx-bg-gradient: linear-gradient(180deg, #FFFFFF 0%, #F8FAFC 50%, #EDF2F7 100%);

    /* Warm Gold Accents for Light Canvas */
    --apx-gold-radiant: #8C6A2E;
    --apx-gold-light: #72552A;
    --apx-gold: #9E7B3E;
    --apx-gold-antique: #72552A;
    --apx-gold-dark: #57401C;

    --apx-gold-glow: rgba(158, 123, 62, 0.15);
    --apx-gold-border: rgba(158, 123, 62, 0.35);
    --apx-gold-border-subtle: rgba(158, 123, 62, 0.18);

    /* Mythic Emerald / Online Status */
    --apx-emerald: #059669;
    --apx-emerald-light: #10b981;
    --apx-emerald-dark: #047857;
    --apx-emerald-glow: rgba(5, 150, 105, 0.20);

    /* Rich Charcoal & Slate Typography (WCAG AAA Contrast > 14:1) */
    --apx-ivory-light: #0F172A;
    --apx-ivory-celestial: #0F172A;
    --apx-ivory-marble: #334155;
    --apx-ivory-stone: #526075;

    --apx-text-main: #0F172A;
    --apx-text-sub: #334155;
    --apx-text-muted: #526075;
    --apx-text-dim: #718096;

    /* Borders & Soft Shadows */
    --apx-border: rgba(158, 123, 62, 0.20);
    --apx-border-hover: rgba(158, 123, 62, 0.45);
    --apx-shadow-card: 0 4px 18px rgba(15, 23, 42, 0.07);
    --apx-shadow-elevated: 0 12px 36px rgba(15, 23, 42, 0.12);

    /* Radii & Timing */
    --apx-radius-lg: 12px;
    --apx-radius-md: 8px;
    --apx-radius-sm: 6px;
    --apx-radius-xs: 4px;
    --apx-transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);

    /* Bootstrap 5 Native Light Mode Overrides */
    --bs-body-bg: var(--apx-bg-base);
    --bs-body-color: var(--apx-text-main);
    --bs-card-bg: var(--apx-bg-surface);
    --bs-card-color: var(--apx-text-main);
    --bs-card-border-color: var(--apx-gold-border-subtle);
    --bs-border-color: var(--apx-border);
    --bs-tertiary-bg: var(--apx-bg-surface-raised);
    --bs-primary: var(--apx-gold);
}

/* ==============================================================================
   Base Document & Global Text Rendering
   ============================================================================== */
html {
    scroll-behavior: smooth;
}

html[data-bs-theme="dark"] {
    color-scheme: dark;
}

html[data-bs-theme="light"] {
    color-scheme: light;
}

body.apx-body {
    background-color: var(--apx-bg-deep);
    background-image: var(--apx-bg-gradient);
    background-attachment: fixed;
    color: var(--apx-text-sub);
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 1rem;
    line-height: 1.65;
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Typography Hierarchy */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    letter-spacing: -0.025em;
    color: var(--apx-text-main);
    font-weight: 800;
}

.apx-font-cinzel, .apx-brand-title {
    font-family: 'Cinzel', Georgia, serif;
    letter-spacing: 0.04em;
    font-weight: 700;
}

p, span, label, div {
    color: inherit;
}

.text-muted, .text-secondary {
    color: var(--apx-text-muted) !important;
}

.text-dim {
    color: var(--apx-text-dim) !important;
}

.text-warning, .text-gold {
    color: var(--apx-gold-light) !important;
}

a {
    color: var(--apx-gold-light);
    text-decoration: none;
    transition: var(--apx-transition);
}

a:hover {
    color: #ffffff;
}

/* Accessibility Focus Ring & Skip Link */
:focus-visible {
    outline: 2px solid var(--apx-gold);
    outline-offset: 3px;
    border-radius: var(--apx-radius-sm);
}

.apx-skip-link {
    position: fixed;
    top: -120px;
    left: 1.5rem;
    background: var(--apx-gold);
    color: #07090e !important;
    font-weight: 700;
    font-size: 0.88rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--apx-radius-sm);
    border: 1px solid var(--apx-gold-light);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.8);
    z-index: 9999;
    text-decoration: none;
    transition: top 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.apx-skip-link:focus {
    top: 1.5rem;
}

/* Container Spacing for Non-Home Views */
.container.content {
    min-height: 65vh;
}

/* ==============================================================================
   Universal Bootstrap Overrides (Cards, Forms, Tables, Modals, Alerts)
   ============================================================================== */

/* Cards */
.card {
    background: var(--apx-bg-surface) !important;
    border: 1px solid var(--apx-gold-border-subtle) !important;
    border-radius: var(--apx-radius-md) !important;
    color: var(--apx-text-main) !important;
    box-shadow: var(--apx-shadow-card) !important;
    overflow: hidden;
}

.card-header {
    background: var(--apx-bg-surface-raised) !important;
    border-bottom: 1px solid var(--apx-gold-border-subtle) !important;
    color: var(--apx-gold-light) !important;
    font-family: 'Cinzel', Georgia, serif;
    font-weight: 700;
    font-size: 1.15rem;
    padding: 1rem 1.25rem;
}

.card-body {
    padding: 1.75rem;
    color: var(--apx-text-sub) !important;
}

.card-title {
    color: var(--apx-text-main) !important;
    font-weight: 700;
}

.card-subtitle {
    color: var(--apx-gold-light) !important;
}

.card-footer {
    background: var(--apx-bg-surface-raised) !important;
    border-top: 1px solid var(--apx-border) !important;
    color: var(--apx-text-muted);
}

/* Form Inputs */
.form-label {
    color: var(--apx-text-main) !important;
    font-weight: 600;
    font-size: 0.92rem;
    margin-bottom: 0.5rem;
}

.form-control, .form-select {
    background-color: var(--apx-bg-input) !important;
    border: 1px solid var(--apx-border) !important;
    border-radius: var(--apx-radius-sm) !important;
    color: var(--apx-text-main) !important;
    padding: 0.7rem 1rem !important;
    font-size: 1rem !important; /* Enforces 16px to prevent iOS auto-zoom */
    min-height: 44px;
    transition: var(--apx-transition);
}

.form-control::placeholder {
    color: var(--apx-text-dim) !important;
    opacity: 0.85;
}

.form-control:focus, .form-select:focus {
    background-color: var(--apx-bg-input-focus) !important;
    border-color: var(--apx-gold) !important;
    box-shadow: 0 0 0 3px var(--apx-gold-glow) !important;
    color: var(--apx-text-main) !important;
}

.input-group .apx-password-toggle {
    border: 1px solid var(--apx-border) !important;
    border-left: none !important;
    background: var(--apx-bg-surface-raised) !important;
    color: var(--apx-text-muted) !important;
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--apx-transition);
}

.input-group .apx-password-toggle:hover {
    background: var(--apx-bg-surface-hover) !important;
    color: var(--apx-gold-light) !important;
}

.form-check-input {
    background-color: var(--apx-bg-input) !important;
    border: 1px solid var(--apx-border) !important;
    width: 1.15rem;
    height: 1.15rem;
}

.form-check-input:checked {
    background-color: var(--apx-gold) !important;
    border-color: var(--apx-gold) !important;
}

.form-check-label {
    color: var(--apx-text-sub) !important;
    font-size: 0.92rem;
}

/* Tables */
.table {
    --bs-table-bg: transparent;
    --bs-table-color: var(--apx-text-sub);
    border-color: var(--apx-border);
}

.table thead th {
    font-family: 'Cinzel', Georgia, serif;
    color: var(--apx-gold-light) !important;
    border-bottom: 2px solid var(--apx-gold-border) !important;
    background: var(--apx-bg-surface-raised) !important;
    padding: 0.9rem 1rem;
}

.table tbody tr {
    border-bottom: 1px solid var(--apx-border);
}

.table tbody tr:hover {
    background: var(--apx-bg-surface-raised) !important;
}

.table td {
    padding: 0.85rem 1rem;
    vertical-align: middle;
}

/* Modals */
.modal-content {
    background-color: var(--apx-bg-surface) !important;
    border: 1px solid var(--apx-gold-border) !important;
    border-radius: var(--apx-radius-lg) !important;
    box-shadow: var(--apx-shadow-elevated) !important;
    color: var(--apx-text-main) !important;
}

.modal-header {
    border-bottom: 1px solid var(--apx-gold-border-subtle) !important;
    background: var(--apx-bg-surface-raised);
    padding: 1.25rem 1.5rem;
}

.modal-title {
    color: var(--apx-gold-light) !important;
    font-family: 'Cinzel', Georgia, serif;
    font-weight: 700;
}

.modal-footer {
    border-top: 1px solid var(--apx-border) !important;
    background: var(--apx-bg-surface-raised);
    padding: 1rem 1.5rem;
}

.btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

/* Alerts */
.alert {
    border-radius: var(--apx-radius-md);
    border-width: 1px;
    font-size: 0.95rem;
    padding: 1rem 1.25rem;
}

.alert-warning {
    background-color: rgba(245, 158, 11, 0.12) !important;
    border-color: rgba(245, 158, 11, 0.35) !important;
    color: #fef08a !important;
}

.alert-info {
    background-color: rgba(59, 130, 246, 0.12) !important;
    border-color: rgba(59, 130, 246, 0.35) !important;
    color: #bfdbfe !important;
}

.alert-success {
    background-color: rgba(16, 185, 129, 0.12) !important;
    border-color: rgba(16, 185, 129, 0.35) !important;
    color: #a7f3d0 !important;
}

.alert-danger {
    background-color: rgba(239, 68, 68, 0.12) !important;
    border-color: rgba(239, 68, 68, 0.35) !important;
    color: #fecaca !important;
}

/* ==============================================================================
   Custom Action Buttons
   ============================================================================== */
.btn-apx-gold, .btn-primary {
    background: linear-gradient(135deg, var(--apx-gold-antique) 0%, var(--apx-gold) 100%) !important;
    color: #090A0D !important;
    font-weight: 700 !important;
    border: 1px solid rgba(201, 164, 92, 0.5) !important;
    border-radius: var(--apx-radius-sm) !important;
    padding: 0.75rem 1.6rem !important;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: var(--apx-transition);
    box-shadow: 0 4px 14px rgba(201, 164, 92, 0.25) !important;
    text-decoration: none;
    cursor: pointer;
}

.btn-apx-gold:hover, .btn-primary:hover {
    background: linear-gradient(135deg, var(--apx-gold) 0%, var(--apx-gold-light) 100%) !important;
    color: #090A0D !important;
    box-shadow: 0 6px 20px rgba(201, 164, 92, 0.40) !important;
}

.btn-apx-outline, .btn-outline-primary {
    background: rgba(255, 255, 255, 0.04) !important;
    color: var(--apx-text-main) !important;
    font-weight: 600 !important;
    border: 1px solid var(--apx-border) !important;
    border-radius: var(--apx-radius-sm) !important;
    padding: 0.75rem 1.5rem !important;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: var(--apx-transition);
    text-decoration: none;
}

.btn-apx-outline:hover, .btn-outline-primary:hover {
    background: rgba(201, 164, 92, 0.12) !important;
    border-color: var(--apx-gold-border) !important;
    color: var(--apx-gold-light) !important;
}

.btn-secondary {
    background: var(--apx-bg-surface-raised) !important;
    border-color: var(--apx-border) !important;
    color: var(--apx-text-main) !important;
}

.btn-secondary:hover {
    background: var(--apx-bg-surface-hover) !important;
    color: var(--apx-gold-light) !important;
}

/* ==============================================================================
   Navbar & Navigation Bar (ChatGPT Reference Floating Header)
   ============================================================================== */
.apx-navbar {
    background: var(--apx-bg-navbar) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--apx-border) !important;
    padding: 0.75rem 0;
    position: sticky;
    top: 0;
    z-index: 1030;
    box-shadow: var(--apx-shadow-card);
    transition: var(--apx-transition);
}

.apx-navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    text-decoration: none;
}

.apx-brand-logo-box {
    width: 42px;
    height: 42px;
    border-radius: var(--apx-radius-sm);
    border: 1px solid var(--apx-gold-border);
    background: var(--apx-bg-surface-raised);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 0 12px rgba(0, 0, 0, 0.4);
}

.apx-brand-logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 2px;
}

.apx-brand-title {
    font-family: 'Cinzel', Georgia, serif;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--apx-text-main);
    letter-spacing: 0.16em;
    line-height: 1.1;
    margin: 0;
}

.apx-brand-tagline {
    font-family: 'Cinzel', Georgia, serif;
    font-size: 0.58rem;
    text-transform: uppercase;
    letter-spacing: 0.26em;
    color: var(--apx-text-dim);
    font-weight: 700;
    margin-top: 2px;
}

/* Nav Links: Capsule Pill Navigation */
.apx-nav-list {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    margin: 0 auto;
}

.apx-nav-link {
    color: var(--apx-text-muted) !important;
    font-weight: 500;
    font-size: 0.92rem;
    padding: 0.42rem 0.85rem !important;
    border-radius: var(--apx-radius-sm);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    text-decoration: none;
    display: inline-flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 0.35rem;
    letter-spacing: 0.01em;
    white-space: nowrap !important;
    border: 1px solid transparent;
}

/* Eliminate duplicate dropdown carets across navbar items */
.apx-nav-link.dropdown-toggle::after,
.apx-user-box.dropdown-toggle::after,
.apx-user-pill.dropdown-toggle::after {
    display: none !important;
    content: none !important;
}

.apx-nav-link:hover {
    color: var(--apx-text-main) !important;
    background: var(--apx-bg-surface-hover);
    border-color: var(--apx-border);
}

/* Active Link Indicator: Gold Tinted Pill with Soft Glow */
.apx-nav-link.active {
    color: var(--apx-text-main) !important;
    font-weight: 600;
    background: rgba(201, 164, 92, 0.15) !important;
    border: 1px solid var(--apx-gold-border) !important;
    box-shadow: 0 0 14px var(--apx-gold-glow);
}

.apx-nav-link.active::after {
    display: none !important;
    content: none !important;
}

/* Theme Switcher Button */
.apx-theme-btn {
    width: 38px;
    height: 38px;
    min-width: 38px;
    min-height: 38px;
    border-radius: var(--apx-radius-sm);
    background: var(--apx-bg-surface-raised);
    border: 1px solid var(--apx-border);
    color: var(--apx-gold-light);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: var(--apx-transition);
    cursor: pointer;
    padding: 0;
}

.apx-theme-btn:hover {
    background: var(--apx-bg-surface-hover);
    border-color: var(--apx-gold-border);
    color: var(--apx-gold);
    transform: rotate(15deg);
}

/* Right Nav Cart Button (Uniform 38px Toolbar) */
.apx-nav-cart-btn {
    width: 38px;
    height: 38px;
    border-radius: var(--apx-radius-sm);
    background: var(--apx-bg-surface-raised);
    border: 1px solid var(--apx-border);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--apx-text-main);
    transition: var(--apx-transition);
    text-decoration: none;
    flex-shrink: 0;
}

.apx-nav-cart-btn:hover {
    background: var(--apx-bg-surface-hover);
    border-color: var(--apx-gold-border);
    color: var(--apx-gold-light);
}

/* Right Nav User Box (Uniform 38px Toolbar) */
.apx-user-box, .apx-user-pill {
    height: 38px;
    background: var(--apx-bg-surface-raised);
    border: 1px solid var(--apx-border);
    border-radius: var(--apx-radius-sm);
    padding: 0 0.75rem 0 0.45rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    color: var(--apx-text-main);
    cursor: pointer;
    transition: var(--apx-transition);
    text-decoration: none;
    box-sizing: border-box;
    flex-shrink: 0;
}

.apx-user-box:hover, .apx-user-pill:hover {
    border-color: var(--apx-gold-border);
    background: var(--apx-bg-surface-hover);
    color: var(--apx-text-main);
}

.apx-user-avatar-mini {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    object-fit: cover;
}

.apx-user-box-name, .apx-user-pill-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: #ffffff;
    letter-spacing: 0.02em;
}

.apx-user-box-chevron, .apx-user-pill-chevron {
    font-size: 0.7rem;
    color: #94a3b8;
    transition: transform 0.2s ease;
    margin-left: 2px;
}

.apx-user-box[aria-expanded="true"] .apx-user-box-chevron,
.apx-user-pill[aria-expanded="true"] .apx-user-pill-chevron {
    transform: rotate(180deg);
}

.apx-nav-dropdown {
    background: rgba(14, 17, 23, 0.98) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--apx-gold-border) !important;
    border-radius: var(--apx-radius-md) !important;
    min-width: 235px;
    margin-top: 0.65rem !important;
    box-shadow: 0 16px 36px -8px rgba(0, 0, 0, 0.85), 0 0 15px rgba(201, 164, 92, 0.12) !important;
}

.apx-nav-dropdown .dropdown-item {
    border-radius: var(--apx-radius-sm);
    margin: 2px 6px;
    width: auto;
    transition: var(--apx-transition);
}

.apx-nav-dropdown .dropdown-item:hover {
    background: rgba(201, 164, 92, 0.1) !important;
}

.apx-dropdown-icon-box {
    width: 30px;
    height: 30px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.apx-more-chevron {
    font-size: 0.72rem;
    color: #94a3b8;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    display: inline-block;
    vertical-align: middle;
}

.dropdown-toggle[aria-expanded="true"] .apx-more-chevron {
    transform: rotate(180deg);
}

/* Dedicated Discord Community CTA Button (Uniform 38px Toolbar) */
.btn-apx-discord {
    height: 38px;
    background: rgba(88, 101, 242, 0.16) !important;
    border: 1px solid rgba(88, 101, 242, 0.45) !important;
    color: #ffffff !important;
    border-radius: var(--apx-radius-sm) !important;
    padding: 0 0.85rem !important;
    font-size: 0.85rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.02em;
    box-shadow: 0 0 10px rgba(88, 101, 242, 0.2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: var(--apx-transition);
    text-decoration: none;
    box-sizing: border-box;
    flex-shrink: 0;
}

.btn-apx-discord:hover {
    background: #5865F2 !important;
    border-color: #5865F2 !important;
    color: #ffffff !important;
    box-shadow: 0 0 18px rgba(88, 101, 242, 0.55), 0 4px 12px rgba(0, 0, 0, 0.4);
    transform: translateY(-1px);
}

.apx-navbar .btn-apx-outline,
.apx-navbar .btn-apx-gold {
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 0.95rem;
    border-radius: var(--apx-radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    box-sizing: border-box;
}

/* ==============================================================================
   ChatGPT Concept Panoramic Hero & Horizontal Dark Glass Telemetry Strip
   ============================================================================== */
.apx-hero-panoramic {
    position: relative;
    min-height: calc(100vh - 78px);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 3rem 0 2rem;
    overflow: hidden;
}

@media (min-width: 992px) {
    .apx-hero-panoramic {
        min-height: calc(100vh - 78px);
        padding: 3.5rem 0 2.5rem;
    }
}

.apx-hero-panoramic-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center 36%;
    background-repeat: no-repeat;
    z-index: 1;
    pointer-events: none;
    transition: background-position 0.3s ease;
    background-image: linear-gradient(90deg, rgba(5, 7, 10, 0.96) 0%, rgba(5, 7, 10, 0.85) 35%, rgba(5, 7, 10, 0.3) 70%, rgba(5, 7, 10, 0.5) 100%), linear-gradient(180deg, rgba(5, 7, 10, 0.45) 0%, transparent 40%, rgba(5, 7, 10, 0.95) 100%), url('../img/hero-panoramic.png');
}

.apx-hero-brand-mark {
    font-family: 'Cinzel', serif;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.22em;
    color: var(--apx-text-dim);
    text-transform: uppercase;
}

.apx-hero-headline {
    font-family: 'Cinzel', Georgia, serif;
    font-size: clamp(1.9rem, 3.3vw, 2.85rem);
    font-weight: 800;
    line-height: 1.25;
    color: #ffffff;
    letter-spacing: 0.01em;
    margin: 0.5rem 0 1.15rem;
}

.apx-hero-subtext {
    font-size: clamp(0.95rem, 1.1vw, 1.05rem);
    color: #94a3b8;
    max-width: 580px;
    line-height: 1.7;
    margin-bottom: 1.75rem;
}

/* Primary Sovereign Action & Tactile Server IP Pill */
.btn-apx-sovereign {
    background: var(--apx-gold);
    color: #05070a !important;
    font-family: 'Cinzel', serif;
    font-weight: 800;
    font-size: 0.88rem;
    letter-spacing: 0.08em;
    padding: 0.8rem 1.65rem;
    border-radius: var(--apx-radius-sm);
    border: 1px solid var(--apx-gold-light);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    cursor: pointer;
    transition: var(--apx-transition);
    box-shadow: 0 4px 18px rgba(201, 164, 92, 0.25);
}

.btn-apx-sovereign:hover {
    background: var(--apx-gold-light);
    color: #05070a !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 24px rgba(201, 164, 92, 0.38);
}

.apx-hero-ip-block {
    background: rgba(14, 19, 30, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(201, 164, 92, 0.35);
    border-radius: var(--apx-radius-sm);
    padding: 0.75rem 1.25rem;
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    user-select: none;
    text-decoration: none;
}

.apx-hero-ip-block:hover {
    background: rgba(22, 30, 48, 0.9);
    border-color: var(--apx-gold-light);
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(201, 164, 92, 0.2);
}

.apx-hero-ip-block:active {
    transform: translateY(0);
}

.apx-ip-address {
    font-size: 0.88rem;
    font-weight: 600;
    color: #f1f5f9;
    letter-spacing: 0.04em;
}

.apx-ip-copy-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.55rem;
    background: rgba(201, 164, 92, 0.15);
    border: 1px solid rgba(201, 164, 92, 0.3);
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--apx-gold-light);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    transition: all 0.2s ease;
}

.apx-hero-ip-block:hover .apx-ip-copy-tag {
    background: rgba(201, 164, 92, 0.25);
    border-color: var(--apx-gold);
    color: #ffffff;
}

/* Organic Unboxed Live Telemetry */
.apx-hero-telemetry {
    font-size: 0.84rem;
    color: #94a3b8;
    letter-spacing: 0.03em;
}

.apx-hero-telemetry .apx-pulse-dot {
    width: 7px;
    height: 7px;
}

/* Light Theme Support for Hero Elements */
[data-bs-theme="light"] .apx-hero-ip-block {
    background: rgba(255, 255, 255, 0.85);
    border-color: rgba(201, 164, 92, 0.5);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

[data-bs-theme="light"] .apx-hero-ip-block:hover {
    background: #ffffff;
    border-color: var(--apx-gold);
}

[data-bs-theme="light"] .apx-ip-address {
    color: #0f172a;
}

[data-bs-theme="light"] .apx-hero-telemetry {
    color: #475569;
}

.btn-apx-monolith {
    background: var(--apx-gold);
    color: #06080d !important;
    font-family: 'Cinzel', serif;
    font-weight: 800;
    font-size: 0.92rem;
    letter-spacing: 0.08em;
    padding: 0.85rem 1.85rem;
    border-radius: var(--apx-radius-sm);
    border: 1px solid var(--apx-gold-light);
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    transition: var(--apx-transition);
}

.btn-apx-monolith:hover {
    background: var(--apx-gold-light);
    color: #06080d !important;
}

.apx-monolith-ip {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.25rem 0.65rem;
    background: rgba(0, 0, 0, 0.18);
    border-radius: 2px;
    color: #141720;
}

/* Subtle Infrastructure Metadata Line (Demoted Telemetry) */
.apx-hero-infrastructure {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 1.25rem;
    margin-top: auto;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
}

.apx-infra-item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    font-size: 0.85rem;
    color: var(--apx-text-muted);
}

.apx-infra-item.apx-copyable {
    cursor: pointer;
    padding: 0.3rem 0.65rem;
    border-radius: var(--apx-radius-xs);
    transition: var(--apx-transition);
}

.apx-infra-item.apx-copyable:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
}

.apx-infra-status {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    color: #10b981;
}

.apx-infra-divider {
    color: rgba(255, 255, 255, 0.2);
}

.apx-infra-label {
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    color: var(--apx-text-dim);
}

.apx-infra-val {
    color: #ffffff;
    font-weight: 600;
}

.apx-infra-meta {
    color: var(--apx-text-dim);
    font-size: 0.78rem;
}

.badge-copy {
    display: inline-block;
    font-size: 0.72rem;
    color: inherit;
    opacity: 0.75;
}

.apx-pulse-dot {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    display: inline-block;
    animation: apx-pulse 2.5s infinite ease-in-out;
}

@keyframes apx-pulse {
    0% { transform: scale(0.9); opacity: 0.7; }
    50% { transform: scale(1.15); opacity: 1; }
    100% { transform: scale(0.9); opacity: 0.7; }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto !important;
    }
    .apx-pulse-dot {
        animation: none !important;
        transform: none !important;
        opacity: 1 !important;
    }
    *, ::before, ::after {
        transition-duration: 0.05s !important;
    }
}

/* ==============================================================================
   Living Caste Pillar Architecture (DOM-based Interactive Hierarchy)
   ============================================================================== */
.apx-section-kicker {
    font-family: 'Cinzel', serif;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.25em;
    color: var(--apx-text-dim);
    text-transform: uppercase;
}

.apx-caste-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-bottom: 2.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 0.5rem;
}

.apx-caste-filter-btn {
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--apx-text-dim);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    padding: 0.5rem 0.25rem;
    cursor: pointer;
    transition: var(--apx-transition);
}

.apx-caste-filter-btn:hover {
    color: #ffffff;
}

.apx-caste-filter-btn.active {
    color: #ffffff;
    border-bottom-color: var(--apx-gold);
}

.apx-caste-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    align-items: stretch;
}

/* ==============================================================================
   Architectural Social Ladder (Physical Hierarchy System)
   ============================================================================== */
.apx-social-ladder {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.apx-ladder-tier {
    transition: opacity 0.25s ease;
}

.apx-tier-label-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 0.65rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    flex-wrap: wrap;
    gap: 0.75rem;
}

.apx-tier-roman {
    font-family: 'Cinzel', serif;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.2em;
    color: var(--apx-text-dim);
}

.apx-tier-name {
    font-family: 'Cinzel', serif;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    color: #ffffff;
}

.apx-weight-pill {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--apx-text-dim);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0.2rem 0.65rem;
    border-radius: var(--apx-radius-xs);
    letter-spacing: 0.05em;
}

.apx-weight-pill.gold {
    color: var(--apx-gold);
    border-color: var(--apx-gold-border);
    background: rgba(201, 164, 92, 0.08);
}

/* Tier V: The Apex Pedestal (Ancestor - Weight 100) */
.apx-card-apex {
    background: rgba(17, 19, 24, 0.95);
    border: 1px solid var(--apx-gold-border);
    border-top: 2px solid var(--apx-gold) !important;
    padding: 2.25rem 2rem;
    box-shadow: 0 12px 32px -8px rgba(0, 0, 0, 0.85);
}

.apx-card-apex .apx-caste-name {
    font-size: 1.85rem;
}

/* Tier IV: Council of High Authority (Architect, Overseer - Weight 95, Equal Standing) */
.apx-tier-authority-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

@media (max-width: 768px) {
    .apx-tier-authority-grid {
        grid-template-columns: 1fr;
    }
}

.apx-tier-authority-grid .apx-caste-card {
    border-top: 2px solid rgba(255, 255, 255, 0.35);
}

/* Tier III: Administration & Law Enforcement Bastion (Warden, Herald - Weight 90, 80) */
.apx-tier-staff-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

@media (max-width: 768px) {
    .apx-tier-staff-grid {
        grid-template-columns: 1fr;
    }
}

.apx-tier-staff-grid .apx-caste-card {
    border-top: 2px solid rgba(255, 255, 255, 0.25);
}

/* Official Rank Banner Image */
.apx-caste-banner {
    width: 100%;
    height: auto;
    border-radius: var(--apx-radius-xs);
    border: 1px solid rgba(255, 255, 255, 0.12);
    margin-bottom: 1.25rem;
    box-shadow: 0 4px 16px -2px rgba(0, 0, 0, 0.6);
    display: block;
    background: #05070a;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.apx-caste-card:hover .apx-caste-banner {
    border-color: rgba(255, 255, 255, 0.25);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.8);
    transform: translateY(-1px);
}

.text-purple {
    color: #c084fc !important;
}

.text-pink {
    color: #f472b6 !important;
}

.text-blue {
    color: #60a5fa !important;
}

/* Tier II: Noble Ascension Terrace (Sions to Ascendant - Weight 70 to 30) */
.apx-tier-ascension-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
    align-items: stretch;
}

.apx-tier-ascension-grid .apx-caste-card {
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    padding: 1.35rem 1.25rem;
    height: 100%;
}

.apx-tier-ascension-grid .apx-caste-card:first-child {
    border-top: 2px solid var(--apx-gold-border);
}

/* Tier I: The Foundation Slab (Wanderer - Weight 10) */
.apx-card-foundation {
    background: rgba(8, 11, 17, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: 2px solid rgba(255, 255, 255, 0.2) !important;
    padding: 2rem;
}

.apx-card-foundation .apx-caste-name {
    font-size: 1.65rem;
}

.apx-caste-card {
    background: rgba(10, 14, 22, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--apx-radius-sm);
    padding: 1.75rem 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: border-color 0.2s ease, background-color 0.2s ease;
    position: relative;
}

.apx-caste-card:hover {
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(14, 19, 30, 0.95);
}

.apx-caste-card[data-rank-category="authority"] {
    border-top: 2px solid rgba(255, 255, 255, 0.35);
}

.apx-caste-card[data-rank-category="nobles"] {
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.apx-caste-card[data-rank-category="pioneers"] {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.apx-caste-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.85rem;
}

.apx-caste-tier-badge {
    font-size: 0.66rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    padding: 0.25rem 0.6rem;
    border-radius: var(--apx-radius-xs);
    background: rgba(255, 255, 255, 0.06);
    color: var(--apx-text-dim);
}

.apx-caste-weight {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    color: var(--apx-text-dim);
    font-weight: 700;
}

.apx-caste-name {
    font-family: 'Cinzel', Georgia, serif;
    font-size: 1.35rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: 0.04em;
    margin-bottom: 0.3rem;
}

.apx-caste-prefix {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--apx-text-muted);
    margin-bottom: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.apx-caste-desc {
    font-size: 0.88rem;
    color: var(--apx-text-muted);
    line-height: 1.65;
    margin-bottom: 1.25rem;
}

.apx-caste-perks {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem 0;
}

.apx-caste-perks li {
    font-size: 0.82rem;
    color: #f1f5f9;
    margin-bottom: 0.45rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.apx-caste-perks li i {
    color: var(--apx-text-dim);
    font-size: 0.85rem;
    flex-shrink: 0;
}

.apx-caste-action {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* ==============================================================================
   Monolithic Structural Ledger & World Section
   ============================================================================== */
.apx-world-section {
    padding: 6rem 0;
    background: var(--apx-bg-base);
    position: relative;
    border-top: 1px solid var(--apx-border);
}

.apx-world-title {
    font-family: 'Cinzel', Georgia, serif;
    font-size: clamp(2rem, 3.8vw, 3.2rem);
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.01em;
}

/* ==============================================================================
   Interactive Sovereign Altar (Tabbed Kingdom Realm Switcher)
   ============================================================================== */
.apx-altar-tabs-nav {
    display: flex;
    gap: 0.75rem;
    background: rgba(8, 11, 18, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--apx-radius-sm);
    padding: 0.4rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.apx-altar-tab-btn {
    flex: 1;
    min-width: 140px;
    padding: 0.65rem 1.15rem;
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--apx-radius-xs);
    color: var(--apx-text-muted);
    font-size: 0.88rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap;
}

.apx-altar-tab-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.04);
}

.apx-altar-tab-btn.active {
    background: rgba(201, 164, 92, 0.12);
    border-color: var(--apx-gold-border);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
}

.apx-altar-tab-badge {
    font-size: 0.62rem;
    letter-spacing: 0.12em;
    padding: 0.15rem 0.45rem;
    border-radius: var(--apx-radius-xs);
    background: rgba(255, 255, 255, 0.08);
    color: var(--apx-text-dim);
}

.apx-altar-tab-btn.active .apx-altar-tab-badge {
    background: rgba(201, 164, 92, 0.25);
    color: var(--apx-gold-light);
}

.apx-altar-stage {
    position: relative;
}

.apx-altar-panel {
    display: none;
    background: rgba(10, 14, 22, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--apx-radius-md);
    padding: 2rem;
    animation: apxAltarFadeIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.apx-altar-panel.active {
    display: block;
}

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

.apx-spec-chip {
    font-size: 0.76rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    padding: 0.3rem 0.7rem;
    border-radius: var(--apx-radius-xs);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.07);
    color: var(--apx-text-main);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.apx-altar-effects {
    background: rgba(6, 8, 13, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--apx-radius-sm);
}

/* Compact Tabbed Caste Matrix */
.apx-caste-matrix-nav {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.apx-caste-matrix-tab {
    padding: 0.65rem 1.25rem;
    background: rgba(10, 14, 22, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--apx-radius-xs);
    color: var(--apx-text-muted);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    display: inline-flex;
    align-items: center;
}

.apx-caste-matrix-tab:hover {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(14, 19, 30, 0.9);
}

.apx-caste-matrix-tab.active {
    background: rgba(201, 164, 92, 0.12);
    border-color: var(--apx-gold-border);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
}

.apx-caste-matrix-panel {
    display: none;
    animation: apxCasteFadeIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.apx-caste-matrix-panel.active {
    display: block;
}

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

.apx-caste-mini-card {
    background: rgba(10, 14, 22, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--apx-radius-sm);
    padding: 1.35rem 1.25rem;
    transition: border-color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
    position: relative;
}

.apx-caste-mini-card:hover {
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(14, 19, 30, 0.95);
    transform: translateY(-2px);
}

/* Legacy Triptych & Province Fallbacks */
.apx-kingdoms-triptych {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

@media (max-width: 991px) {
    .apx-kingdoms-triptych {
        grid-template-columns: 1fr;
    }
}

.apx-kingdom-province {
    background: rgba(10, 14, 22, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--apx-radius-sm);
    padding: 1.75rem 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: var(--apx-transition);
    position: relative;
}

.apx-kingdom-province:hover {
    border-color: rgba(255, 255, 255, 0.22);
    background: rgba(14, 19, 30, 0.95);
}

.apx-province-header {
    margin-bottom: 0.85rem;
    padding-bottom: 0.65rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.apx-province-type {
    font-family: 'Cinzel', serif;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.2em;
    color: var(--apx-text-dim);
    text-transform: uppercase;
    display: block;
    margin-bottom: 0.25rem;
}

.apx-province-name {
    font-family: 'Cinzel', Georgia, serif;
    font-size: 1.45rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: 0.04em;
    margin: 0;
}

.apx-province-desc {
    font-size: 0.88rem;
    color: var(--apx-text-muted);
    line-height: 1.65;
    margin-bottom: 1.25rem;
}

.apx-province-specs {
    list-style: none;
    padding: 0;
    margin: 0 0 1.25rem 0;
}

.apx-province-specs li {
    font-size: 0.82rem;
    color: var(--apx-text-sub);
    margin-bottom: 0.4rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* 3 Kingdoms Color Archetypes (Dark Mode Defaults) */
.apx-kingdom-zenithar .apx-province-type { color: #f6e58d; }
.apx-kingdom-zenithar .apx-province-name { color: #ffeaa7; }
.apx-kingdom-zenithar .apx-province-spec-title { color: var(--apx-gold-light); }

.apx-kingdom-solterra .apx-province-type { color: #ff7675; }
.apx-kingdom-solterra .apx-province-name { color: #ff7675; }
.apx-kingdom-solterra .apx-province-spec-title { color: #e17055; }

.apx-kingdom-sylvamoor .apx-province-type { color: #74b9ff; }
.apx-kingdom-sylvamoor .apx-province-name { color: #74b9ff; }
.apx-kingdom-sylvamoor .apx-province-spec-title { color: #0984e3; }

.apx-buff-label { color: #2ecc71; }
.apx-debuff-label { color: #FF7675; }
.apx-debuff-text { color: #FF7675 !important; }

/* Monolithic Structural Ledger (Replacing Fragmented Cards) */
.apx-monolith-ledger {
    background: rgba(10, 14, 22, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--apx-radius-md);
    overflow: hidden;
}

.apx-ledger-row {
    padding: 1.75rem 1.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.apx-ledger-row:last-child {
    border-bottom: none;
}

.apx-ledger-title {
    font-family: 'Cinzel', Georgia, serif;
    font-size: 1.12rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.35rem;
    letter-spacing: 0.02em;
}

.apx-ledger-desc {
    font-size: 0.88rem;
    color: var(--apx-text-muted);
    line-height: 1.65;
    margin-bottom: 0.85rem;
}

.apx-ledger-link {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--apx-text-dim);
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    transition: color 0.2s ease;
}

.apx-ledger-link:hover {
    color: #ffffff;
}

.apx-player-link {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--apx-text-dim);
    display: inline-flex;
    align-items: center;
    transition: var(--apx-transition);
}

.apx-player-link:hover {
    color: #ffffff !important;
}

.apx-showcase-box {
    background: rgba(10, 14, 22, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--apx-radius-md);
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.apx-showcase-media {
    position: relative;
    width: 100%;
    height: 310px;
    overflow: hidden;
}

.apx-showcase-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.apx-showcase-box:hover .apx-showcase-img {
    transform: scale(1.02);
}

.apx-showcase-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(6, 8, 13, 0.95) 0%, transparent 60%);
}

.apx-showcase-tag {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(6, 8, 13, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 0.3rem 0.75rem;
    border-radius: var(--apx-radius-xs);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    color: var(--apx-text-dim);
}

.apx-showcase-footer {
    padding: 1.5rem 1.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    background: rgba(8, 11, 18, 0.95);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    margin-top: auto;
}

.apx-showcase-title {
    font-family: 'Cinzel', Georgia, serif;
    font-size: 1.05rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: 0.08em;
    margin-bottom: 0.2rem;
}

.apx-showcase-sub {
    font-size: 0.85rem;
    color: var(--apx-text-muted);
    margin: 0;
}

.apx-showcase-nav {
    display: flex;
    gap: 0.5rem;
}

.btn-showcase-arrow {
    width: 36px;
    height: 36px;
    border-radius: var(--apx-radius-sm);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--apx-transition);
}

.btn-showcase-arrow:hover {
    background: var(--apx-gold);
    color: #07090e;
    border-color: var(--apx-gold);
}

/* ==============================================================================
   Connected Rite of Passage (Onboarding Stepper Architecture)
   ============================================================================== */
.apx-section-header {
    text-align: center;
    margin-bottom: 3.5rem;
}

.apx-section-title {
    font-family: 'Cinzel', Georgia, serif;
    font-size: clamp(1.85rem, 3.2vw, 2.75rem);
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.01em;
    margin-bottom: 0.65rem;
}

.apx-stepper-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    position: relative;
}

@media (max-width: 991px) {
    .apx-stepper-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
}

.apx-step-monolith {
    background: rgba(10, 14, 22, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--apx-radius-sm);
    padding: 2.25rem 1.75rem;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.apx-step-monolith:hover {
    background: rgba(14, 19, 30, 0.95);
    border-color: rgba(255, 255, 255, 0.2);
}

.apx-step-phase-label {
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    color: var(--apx-text-dim);
    text-transform: uppercase;
}

.apx-step-num-etched {
    font-family: 'Cinzel', Georgia, serif;
    font-size: 1.85rem;
    font-weight: 800;
    color: var(--apx-text-dim);
    line-height: 1;
    margin-bottom: 1.25rem;
    letter-spacing: 0.04em;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.apx-step-icon {
    font-size: 1.25rem;
    color: var(--apx-text-dim);
}

.apx-step-title {
    font-family: 'Cinzel', Georgia, serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.65rem;
    letter-spacing: 0.02em;
}

.apx-step-desc {
    font-size: 0.88rem;
    color: var(--apx-text-muted);
    line-height: 1.65;
    margin-bottom: 1.25rem;
    flex-grow: 1;
}

.apx-step-action {
    margin-top: auto;
}

.apx-btn-copy {
    min-height: 44px;
    padding: 10px 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.88rem;
    font-weight: 600;
}

.apx-step-monolith code {
    background: rgba(255, 255, 255, 0.06);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 0.2rem 0.5rem;
    border-radius: var(--apx-radius-xs);
    font-weight: 700;
    font-size: 0.88rem;
    font-family: 'JetBrains Mono', Consolas, monospace;
}

/* Sections & New Dynamic Homepage Components */
.apx-ranks-section {
    background: var(--apx-bg-deep);
    border-top: 1px solid var(--apx-gold-border-subtle);
}

.apx-onboarding-section {
    background: var(--apx-bg-base);
    border-top: 1px solid var(--apx-border);
}

.apx-map-section {
    background: linear-gradient(180deg, var(--apx-bg-deep) 0%, #0d0f15 50%, var(--apx-bg-deep) 100%);
    border-top: 1px solid var(--apx-gold-border-subtle);
    border-bottom: 1px solid var(--apx-border);
}

.apx-map-monolith {
    background: linear-gradient(155deg, rgba(24, 26, 32, 0.95) 0%, rgba(14, 16, 22, 0.98) 100%);
    border: 1px solid rgba(201, 164, 92, 0.18);
    border-radius: var(--apx-radius-md);
    box-shadow: 0 20px 50px -10px rgba(0, 0, 0, 0.85);
    position: relative;
}

/* Telemetry Strip */
.apx-map-telemetry-strip {
    font-size: 0.78rem;
}

.apx-telemetry-badge-cluster {
    background: rgba(9, 10, 13, 0.65);
    border: 1px solid rgba(244, 239, 230, 0.08);
    border-radius: var(--apx-radius-xs);
    padding: 0.28rem 0.65rem;
    font-size: 0.73rem;
    letter-spacing: 0.04em;
    color: var(--apx-text-dim);
}

.apx-telemetry-status.is-online .apx-telemetry-status-text {
    color: var(--apx-emerald-light);
    font-weight: 600;
}

.apx-telemetry-status.is-standby .apx-telemetry-status-text {
    color: var(--apx-text-dim);
}

.apx-telemetry-beacon {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    display: inline-block;
    background: var(--apx-text-dim);
}

.apx-telemetry-status.is-online .apx-telemetry-beacon {
    background: var(--apx-emerald);
    box-shadow: 0 0 8px var(--apx-emerald);
}

.apx-telemetry-engine {
    color: var(--apx-ivory-stone);
}

/* Cartographic Capabilities Grid */
.apx-carto-capabilities {
    margin-top: 0.5rem;
}

.apx-carto-spec-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(244, 239, 230, 0.06);
    border-radius: var(--apx-radius-xs);
    padding: 0.85rem 0.95rem;
    transition: var(--apx-transition);
}

.apx-carto-spec-card:hover {
    background: rgba(201, 164, 92, 0.04);
    border-color: rgba(201, 164, 92, 0.22);
}

.apx-spec-title {
    font-size: 0.85rem;
    letter-spacing: 0.01em;
}

.apx-spec-desc {
    font-size: 0.76rem;
    line-height: 1.55;
}

/* Tactical Cartography Viewport */
.apx-carto-link {
    display: block;
}

.apx-carto-viewport {
    background: #090A0D;
    border: 1px solid rgba(201, 164, 92, 0.25);
    border-radius: var(--apx-radius-sm);
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.7);
    min-height: 330px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 1.25rem;
    transition: var(--apx-transition);
}

.apx-carto-link:hover .apx-carto-viewport {
    border-color: rgba(201, 164, 92, 0.55);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.85), 0 0 20px rgba(201, 164, 92, 0.12);
    transform: translateY(-3px);
}

/* Media Layer */
.apx-carto-media-layer {
    position: absolute;
    inset: 0;
    z-index: 1;
    overflow: hidden;
}

.apx-carto-media-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    filter: brightness(0.65) contrast(1.15) saturate(0.85);
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), filter 0.6s ease;
}

.apx-carto-link:hover .apx-carto-media-img {
    transform: scale(1.04);
    filter: brightness(0.75) contrast(1.1) saturate(0.95);
}

.apx-carto-vignette {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(9, 10, 13, 0.35) 0%, rgba(9, 10, 13, 0.88) 100%);
}

.apx-carto-scanlines {
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.08) 0px, rgba(0, 0, 0, 0.08) 1px, transparent 1px, transparent 3px);
    pointer-events: none;
}

/* Imperial Chiseled Corner Reticles */
.apx-carto-bracket {
    position: absolute;
    width: 10px;
    height: 10px;
    z-index: 3;
    pointer-events: none;
    border-color: var(--apx-gold);
    transition: border-color 0.25s ease, transform 0.25s ease;
}

.apx-bracket-tl { top: 8px; left: 8px; border-top: 2px solid; border-left: 2px solid; }
.apx-bracket-tr { top: 8px; right: 8px; border-top: 2px solid; border-right: 2px solid; }
.apx-bracket-bl { bottom: 8px; left: 8px; border-bottom: 2px solid; border-left: 2px solid; }
.apx-bracket-br { bottom: 8px; right: 8px; border-bottom: 2px solid; border-right: 2px solid; }

.apx-carto-link:hover .apx-bracket-tl { transform: translate(-2px, -2px); border-color: var(--apx-gold-radiant); }
.apx-carto-link:hover .apx-bracket-tr { transform: translate(2px, -2px); border-color: var(--apx-gold-radiant); }
.apx-carto-link:hover .apx-bracket-bl { transform: translate(-2px, 2px); border-color: var(--apx-gold-radiant); }
.apx-carto-link:hover .apx-bracket-br { transform: translate(2px, 2px); border-color: var(--apx-gold-radiant); }

/* HUD Header */
.apx-carto-hud-top {
    position: relative;
    z-index: 2;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
}

.apx-hud-indicator {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    display: inline-block;
}

.apx-hud-indicator.is-live {
    background: var(--apx-emerald);
    box-shadow: 0 0 8px var(--apx-emerald);
}

.apx-hud-indicator.is-idle {
    background: var(--apx-text-dim);
}

.apx-hud-title {
    color: var(--apx-gold-light);
    font-size: 0.72rem;
}

.apx-hud-coords {
    color: var(--apx-ivory-stone);
    font-size: 0.7rem;
}

/* HUD Center */
.apx-carto-hud-center {
    position: relative;
    z-index: 2;
    padding: 1.5rem 0;
}

.apx-carto-reticle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px dashed rgba(201, 164, 92, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--apx-gold-light);
    font-size: 1.25rem;
    background: rgba(9, 10, 13, 0.55);
    backdrop-filter: blur(4px);
    transition: transform 0.35s ease, border-color 0.35s ease, color 0.35s ease;
}

.apx-carto-link:hover .apx-carto-reticle {
    transform: rotate(90deg) scale(1.1);
    border-color: var(--apx-gold-radiant);
    color: var(--apx-gold-radiant);
}

.apx-carto-realm-title {
    color: var(--apx-ivory-celestial);
    font-size: 1.2rem;
    letter-spacing: 0.04em;
}

.apx-carto-kingdoms {
    font-size: 0.72rem;
    letter-spacing: 0.06em;
}

.apx-kingdom-tag {
    color: var(--apx-ivory-stone);
    font-size: 0.7rem;
    transition: color 0.2s ease;
}

.apx-kingdom-tag.tag-zenithar { color: #93c5fd; }
.apx-kingdom-tag.tag-solterra { color: #fcd34d; }
.apx-kingdom-tag.tag-sylvamoor { color: #6ee7b7; }

.apx-tag-separator {
    color: rgba(255, 255, 255, 0.25);
}

/* HUD Footer */
.apx-carto-hud-bottom {
    position: relative;
    z-index: 2;
    padding-top: 0.65rem;
    border-top: 1px solid rgba(244, 239, 230, 0.08);
    font-size: 0.72rem;
}

.apx-hud-lens {
    color: var(--apx-text-dim);
}

.apx-hud-action-cta {
    color: var(--apx-gold);
    font-size: 0.73rem;
    letter-spacing: 0.06em;
    transition: color 0.2s ease, transform 0.2s ease;
}

.apx-carto-link:hover .apx-hud-action-cta {
    color: var(--apx-gold-radiant);
    transform: translateX(3px);
}

.apx-quick-guide-banner {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(13, 18, 30, 0.85) 100%);
    border: 1px solid var(--apx-gold-border);
    border-radius: var(--apx-radius-md);
}

.apx-guide-callout-badge {
    background: rgba(245, 158, 11, 0.2);
    color: var(--apx-gold-light);
    border: 1px solid var(--apx-gold-border);
    font-size: 0.72rem;
    letter-spacing: 0.08em;
}

.apx-guide-callout-title {
    font-family: 'Cinzel', Georgia, serif;
    font-size: 1.35rem;
    color: #ffffff;
}

.apx-guide-callout-desc {
    color: var(--apx-text-muted);
}

.apx-footer-ip-text {
    color: #ffffff;
}

.apx-footer-copyright-text {
    color: #ffffff;
}

/* ==============================================================================
   Voltraz-Inspired Webstore & Package Cards
   ============================================================================== */
.apx-store-hero {
    background: linear-gradient(135deg, rgba(20, 28, 46, 0.7) 0%, rgba(11, 16, 26, 0.9) 100%);
    border: 1px solid var(--apx-gold-border-subtle);
    border-radius: var(--apx-radius-lg);
    padding: 2.5rem 2rem;
    margin-bottom: 2.5rem;
    text-align: center;
}

.apx-store-hero h1 {
    font-size: clamp(1.8rem, 3.5vw, 2.5rem);
    color: #ffffff;
    margin-bottom: 0.75rem;
}

.apx-store-hero p {
    color: var(--apx-text-muted);
    max-width: 620px;
    margin: 0 auto;
    font-size: 1.05rem;
}

/* Store Category Sidebar */
.apx-shop-sidebar .list-group {
    border-radius: var(--apx-radius-md);
    overflow: hidden;
    border: 1px solid var(--apx-gold-border-subtle);
}

.apx-shop-sidebar .list-group-item {
    background: var(--apx-bg-surface) !important;
    color: var(--apx-text-sub) !important;
    border-color: var(--apx-border) !important;
    padding: 0.9rem 1.25rem !important;
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: var(--apx-transition);
}

.apx-shop-sidebar .list-group-item i {
    color: var(--apx-gold);
    font-size: 1.15rem;
}

.apx-shop-sidebar .list-group-item:hover {
    background: var(--apx-bg-surface-raised) !important;
    color: #ffffff !important;
    padding-left: 1.45rem !important;
}

.apx-shop-sidebar .list-group-item.active {
    background: linear-gradient(90deg, rgba(245, 158, 11, 0.18) 0%, var(--apx-bg-surface-raised) 100%) !important;
    color: var(--apx-gold-light) !important;
    border-left: 4px solid var(--apx-gold) !important;
    font-weight: 700;
}

/* User Widget on Store */
.apx-user-widget {
    background: var(--apx-bg-surface);
    border: 1px solid var(--apx-gold-border-subtle);
    border-radius: var(--apx-radius-md);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.apx-user-avatar {
    width: 48px;
    height: 48px;
    border-radius: var(--apx-radius-sm);
    border: 2px solid var(--apx-gold);
}

.apx-user-name {
    font-family: 'Cinzel', Georgia, serif;
    font-weight: 700;
    color: #ffffff;
    font-size: 1.1rem;
    margin-bottom: 0.2rem;
}

/* Voltraz-Style Package Cards */
.apx-package-card {
    background: var(--apx-bg-surface);
    border: 1px solid var(--apx-gold-border-subtle);
    border-radius: var(--apx-radius-lg);
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    box-shadow: var(--apx-shadow-card);
    transition: var(--apx-transition);
    position: relative;
}

.apx-package-card:hover {
    border-color: var(--apx-gold);
    transform: translateY(-4px);
    box-shadow: 0 16px 36px -8px rgba(245, 158, 11, 0.22);
}

.apx-package-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid var(--apx-gold-border);
    color: var(--apx-gold-light);
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 0.25rem 0.65rem;
    border-radius: var(--apx-radius-sm);
    z-index: 2;
}

.apx-package-image-wrap {
    background: linear-gradient(to bottom, rgba(20, 28, 46, 0.9), rgba(15, 21, 35, 1));
    padding: 1.5rem 1rem;
    text-align: center;
    border-bottom: 1px solid var(--apx-border);
}

.apx-package-image {
    max-height: 110px;
    object-fit: contain;
    filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.6));
    transition: var(--apx-transition);
}

.apx-package-card:hover .apx-package-image {
    transform: scale(1.05);
}

.apx-package-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.apx-package-title {
    font-family: 'Cinzel', Georgia, serif;
    font-size: 1.3rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 0.75rem;
}

.apx-package-price-wrap {
    margin-bottom: 1.25rem;
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}

.apx-package-price {
    font-family: 'Cinzel', Georgia, serif;
    font-size: 1.6rem;
    font-weight: 900;
    color: var(--apx-gold-light);
    letter-spacing: 0.02em;
}

.apx-package-price-del {
    font-size: 0.95rem;
    color: var(--apx-text-dim);
    text-decoration: line-through;
}

.apx-package-desc {
    font-size: 0.9rem;
    color: var(--apx-text-muted);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.apx-package-footer {
    margin-top: auto;
}

/* WhatsApp Order Buttons */
.btn-apx-wa {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: #ffffff !important;
    font-weight: 700;
    border: 1px solid #4ade80;
    border-radius: var(--apx-radius-sm);
    box-shadow: 0 4px 14px rgba(34, 197, 94, 0.3);
    transition: var(--apx-transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn-apx-wa:hover {
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(34, 197, 94, 0.45);
}

.btn-apx-wa-outline {
    background: rgba(34, 197, 94, 0.1);
    color: #4ade80 !important;
    border: 1px solid rgba(34, 197, 94, 0.4);
    font-weight: 600;
    border-radius: var(--apx-radius-sm);
    transition: var(--apx-transition);
}

.btn-apx-wa-outline:hover {
    background: #16a34a;
    color: #ffffff !important;
    border-color: #22c55e;
}

.apx-shop-founder-pill {
    background: rgba(34, 197, 94, 0.12);
    border: 1px solid rgba(34, 197, 94, 0.35);
    color: #86efac;
    border-radius: var(--apx-radius-sm);
    padding: 0.35rem 0.85rem;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: var(--apx-transition);
}

.apx-shop-founder-pill:hover {
    background: #16a34a;
    color: #ffffff;
    border-color: #4ade80;
    transform: translateY(-1px);
}

/* Webstore Category Switcher Navigation */
.apx-store-nav-bar {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    margin-bottom: 1.75rem;
    scrollbar-width: thin;
}

.apx-store-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.6rem 1.15rem;
    background: var(--apx-bg-surface);
    border: 1px solid var(--apx-gold-border-subtle);
    border-radius: var(--apx-radius-sm);
    color: var(--apx-text-sub);
    font-weight: 600;
    font-size: 0.88rem;
    text-decoration: none;
    white-space: nowrap;
    transition: var(--apx-transition);
}

.apx-store-pill:hover {
    background: var(--apx-bg-surface-raised);
    border-color: var(--apx-gold);
    color: #ffffff;
    transform: translateY(-1px);
}

.apx-store-pill.active {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.25) 0%, rgba(20, 28, 46, 0.95) 100%);
    border-color: var(--apx-gold);
    color: var(--apx-gold-light);
    font-weight: 700;
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.25);
}

.apx-store-pill i {
    font-size: 1.05rem;
    color: var(--apx-gold);
}

/* Tier-Specific Card Variations */
.apx-package-card.apx-pkg-sions {
    border-color: rgba(253, 224, 71, 0.65);
    background: linear-gradient(180deg, rgba(30, 24, 10, 0.85) 0%, var(--apx-bg-surface) 100%);
    box-shadow: 0 8px 24px -4px rgba(234, 179, 8, 0.2);
}

.apx-package-card.apx-pkg-sions:hover {
    border-color: #fde047;
    box-shadow: 0 20px 42px -6px rgba(234, 179, 8, 0.45);
    transform: translateY(-5px);
}

.apx-package-card.apx-pkg-emperor {
    border-color: rgba(239, 68, 68, 0.45);
    background: linear-gradient(180deg, rgba(35, 15, 18, 0.85) 0%, var(--apx-bg-surface) 100%);
}

.apx-package-card.apx-pkg-emperor:hover {
    border-color: #f87171;
    box-shadow: 0 18px 38px -6px rgba(239, 68, 68, 0.35);
    transform: translateY(-5px);
}

.apx-package-card.apx-pkg-sovereign {
    border-color: rgba(59, 130, 246, 0.45);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.85) 0%, var(--apx-bg-surface) 100%);
}

.apx-package-card.apx-pkg-sovereign:hover {
    border-color: #60a5fa;
    box-shadow: 0 18px 38px -6px rgba(59, 130, 246, 0.35);
    transform: translateY(-5px);
}

.apx-package-card.apx-pkg-archon {
    border-color: rgba(6, 182, 212, 0.45);
    background: linear-gradient(180deg, rgba(12, 30, 42, 0.85) 0%, var(--apx-bg-surface) 100%);
}

.apx-package-card.apx-pkg-archon:hover {
    border-color: #22d3ee;
    box-shadow: 0 18px 38px -6px rgba(6, 182, 212, 0.35);
    transform: translateY(-5px);
}

.apx-package-card.apx-pkg-ascendant {
    border-color: rgba(16, 185, 129, 0.45);
    background: linear-gradient(180deg, rgba(10, 30, 22, 0.85) 0%, var(--apx-bg-surface) 100%);
}

.apx-package-card.apx-pkg-ascendant:hover {
    border-color: #34d399;
    box-shadow: 0 18px 38px -6px rgba(16, 185, 129, 0.35);
    transform: translateY(-5px);
}

.apx-package-card.apx-pkg-pass {
    border-color: rgba(168, 85, 247, 0.45);
    background: linear-gradient(180deg, rgba(28, 16, 42, 0.85) 0%, var(--apx-bg-surface) 100%);
}

.apx-package-card.apx-pkg-pass:hover {
    border-color: #c084fc;
    box-shadow: 0 18px 38px -6px rgba(168, 85, 247, 0.35);
    transform: translateY(-5px);
}

.apx-package-card.apx-pkg-diamond {
    border-color: rgba(6, 182, 212, 0.45);
    background: linear-gradient(180deg, rgba(8, 30, 42, 0.88) 0%, var(--apx-bg-surface) 100%);
}

.apx-package-card.apx-pkg-diamond:hover {
    border-color: #38bdf8;
    box-shadow: 0 18px 38px -6px rgba(6, 182, 212, 0.4);
    transform: translateY(-5px);
}

.apx-package-card.apx-pkg-diamond {
    border-color: rgba(6, 182, 212, 0.45);
    background: linear-gradient(180deg, rgba(8, 30, 42, 0.88) 0%, var(--apx-bg-surface) 100%);
}

.apx-package-card.apx-pkg-diamond:hover {
    border-color: #38bdf8;
    box-shadow: 0 18px 38px -6px rgba(6, 182, 212, 0.4);
    transform: translateY(-5px);
}

/* Package Perks List */
.apx-package-perks {
    list-style: none;
    padding: 0;
    margin: 0 0 1.25rem 0;
    font-size: 0.84rem;
    line-height: 1.8;
}

.apx-package-perks li {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    margin-bottom: 0.35rem;
}

.apx-package-perks li i {
    font-size: 0.95rem;
    margin-top: 0.15rem;
    flex-shrink: 0;
}

/* Custom Webstore Cart & Payment Tables */
.apx-shop-table {
    background: var(--apx-bg-surface);
    border: 1px solid var(--apx-border);
    border-radius: var(--apx-radius-md);
    overflow: hidden;
}

.apx-shop-table table {
    margin-bottom: 0;
    color: var(--apx-text-sub);
}

.apx-shop-table th {
    background: var(--apx-bg-surface-raised) !important;
    color: #ffffff;
    font-family: 'Cinzel', Georgia, serif;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    border-color: var(--apx-border);
    padding: 0.9rem 1rem;
}

.apx-shop-table td {
    background: var(--apx-bg-surface) !important;
    border-color: rgba(255, 255, 255, 0.06);
    padding: 1rem;
    vertical-align: middle;
}

.apx-founder-contact-card {
    background: var(--apx-bg-surface);
    border: 1px solid var(--apx-gold-border-subtle);
    border-radius: var(--apx-radius-md);
    padding: 0.85rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: var(--apx-transition);
    text-decoration: none;
    color: #ffffff;
}

.apx-founder-contact-card:hover {
    border-color: #22c55e;
    background: rgba(34, 197, 94, 0.08);
    transform: translateY(-2px);
    color: #ffffff;
}

/* ==============================================================================
   Fandom Gamepedia-Style Wiki Components
   ============================================================================== */
.fandom-infobox {
    float: right;
    width: 330px;
    max-width: 100%;
    margin: 0 0 1.5rem 1.5rem;
    background: var(--apx-bg-surface-raised);
    border: 1px solid var(--apx-gold-border);
    border-radius: var(--apx-radius-md);
    box-shadow: var(--apx-shadow-elevated);
    overflow: hidden;
    font-size: 0.88rem;
    line-height: 1.5;
}

@media (max-width: 768px) {
    .fandom-infobox {
        float: none;
        width: 100%;
        margin: 0 0 1.5rem 0;
    }
}

.fandom-infobox-header {
    background: linear-gradient(135deg, #2b1f0d 0%, #171108 100%);
    border-bottom: 2px solid var(--apx-gold);
    padding: 0.85rem 1rem;
    text-align: center;
}

.fandom-infobox-title {
    font-family: 'Cinzel', Georgia, serif;
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--apx-gold-light);
    margin: 0;
    letter-spacing: 0.04em;
}

.fandom-infobox-subtitle {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--apx-text-dim);
    margin-top: 0.2rem;
}

.fandom-infobox-image {
    padding: 1.25rem 1rem;
    text-align: center;
    background: radial-gradient(circle at 50% 50%, rgba(245, 158, 11, 0.12) 0%, rgba(10, 14, 24, 0.95) 75%);
    border-bottom: 1px solid var(--apx-border);
}

.fandom-infobox-image img {
    max-height: 130px;
    max-width: 100%;
    object-fit: contain;
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.7));
}

.fandom-infobox-table {
    width: 100%;
    border-collapse: collapse;
}

.fandom-infobox-table tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.fandom-infobox-table tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.02);
}

.fandom-infobox-label {
    width: 42%;
    padding: 0.6rem 0.85rem;
    color: var(--apx-gold-muted);
    font-weight: 700;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    vertical-align: top;
}

.fandom-infobox-value {
    padding: 0.6rem 0.85rem;
    color: #ffffff;
    vertical-align: top;
}

/* Fandom Table of Contents */
.fandom-toc {
    background: var(--apx-bg-surface-raised);
    border: 1px solid var(--apx-gold-border-subtle);
    border-radius: var(--apx-radius-md);
    padding: 1.25rem 1.5rem;
    margin-bottom: 2rem;
    display: inline-block;
    min-width: 280px;
    max-width: 100%;
}

.fandom-toc-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--apx-border);
}

.fandom-toc-title {
    font-family: 'Cinzel', Georgia, serif;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--apx-gold);
    margin: 0;
    letter-spacing: 0.08em;
}

.fandom-toc-list {
    list-style: none;
    padding-left: 0;
    margin-bottom: 0;
    counter-reset: toc-counter;
}

.fandom-toc-list li {
    counter-increment: toc-counter;
    margin-bottom: 0.35rem;
    font-size: 0.88rem;
}

.fandom-toc-list li::before {
    content: counter(toc-counter) ". ";
    color: var(--apx-gold);
    font-weight: 700;
    font-size: 0.8rem;
}

.fandom-toc-list a {
    color: var(--apx-text-sub);
    text-decoration: none;
    transition: var(--apx-transition);
}

.fandom-toc-list a:hover {
    color: var(--apx-gold-light);
    text-decoration: underline;
}

/* Fandom Lore Quotes / Excerpts */
.fandom-lore-box {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.06) 0%, rgba(15, 20, 32, 0.85) 100%);
    border: 1px solid var(--apx-gold-border);
    border-left: 5px solid var(--apx-gold);
    border-radius: var(--apx-radius-sm);
    padding: 1.25rem 1.75rem;
    margin: 1.75rem 0;
    font-style: italic;
    color: #fef08a;
    position: relative;
}

.fandom-lore-author {
    margin-top: 0.6rem;
    font-style: normal;
    font-size: 0.82rem;
    text-align: right;
    color: var(--apx-gold-muted);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* Fandom Stat & Comparison Tables */
.fandom-stat-table {
    width: 100%;
    margin: 1.5rem 0;
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid var(--apx-gold-border-subtle);
    border-radius: var(--apx-radius-md);
    overflow: hidden;
    font-size: 0.9rem;
}

.fandom-stat-table th {
    background: linear-gradient(180deg, #20170a 0%, #151007 100%);
    color: var(--apx-gold-light);
    font-family: 'Cinzel', Georgia, serif;
    font-weight: 700;
    letter-spacing: 0.04em;
    padding: 0.85rem 1rem;
    border-bottom: 2px solid var(--apx-gold-border);
    text-align: left;
}

.fandom-stat-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--apx-text-sub);
}

.fandom-stat-table tr:nth-child(even) td {
    background: rgba(255, 255, 255, 0.02);
}

.fandom-stat-table tr:hover td {
    background: rgba(245, 158, 11, 0.06);
    color: #ffffff;
}

/* One-Click Command Copy Button */
.apx-code-block-wrap {
    position: relative;
    margin: 1rem 0;
}

.apx-code-copy-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid var(--apx-gold-border-subtle);
    color: var(--apx-gold-light);
    border-radius: var(--apx-radius-sm);
    padding: 0.25rem 0.6rem;
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--apx-transition);
}

.apx-code-copy-btn:hover {
    background: var(--apx-gold);
    color: #000000;
}

/* ==============================================================================
   Wiki Encyclopedia & Documentation Views
   ============================================================================== */
.apx-wiki-header {
    background: linear-gradient(135deg, rgba(20, 28, 46, 0.7) 0%, rgba(11, 16, 26, 0.9) 100%);
    border: 1px solid var(--apx-gold-border-subtle);
    border-radius: var(--apx-radius-lg);
    padding: 2rem 2.25rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.apx-wiki-title-area h1 {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    color: #ffffff;
    margin-bottom: 0.25rem;
}

.apx-wiki-badge {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--apx-gold);
    font-weight: 700;
}

.apx-wiki-search-form {
    min-width: 280px;
}

.apx-wiki-search-form .input-group {
    background: var(--apx-bg-input);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: var(--apx-radius-sm);
    overflow: hidden;
}

.apx-wiki-search-form .form-control {
    border: none !important;
    background: transparent !important;
}

/* Wiki Navigation Sidebar */
.apx-wiki-sidebar .list-group {
    border-radius: var(--apx-radius-md);
    overflow: hidden;
    border: 1px solid var(--apx-gold-border-subtle);
    margin-bottom: 1.5rem;
}

.apx-wiki-sidebar .list-group-item {
    background: var(--apx-bg-surface) !important;
    color: var(--apx-text-sub) !important;
    border-color: var(--apx-border) !important;
    padding: 0.85rem 1.15rem !important;
    font-size: 0.92rem;
    font-weight: 600;
    transition: var(--apx-transition);
}

.apx-wiki-sidebar .list-group-item:hover {
    background: var(--apx-bg-surface-raised) !important;
    color: #ffffff !important;
    padding-left: 1.35rem !important;
}

.apx-wiki-sidebar .list-group-item.active {
    background: linear-gradient(90deg, rgba(245, 158, 11, 0.18) 0%, var(--apx-bg-surface-raised) 100%) !important;
    color: var(--apx-gold-light) !important;
    border-left: 4px solid var(--apx-gold) !important;
    font-weight: 700;
}

/* Rich Wiki Content Card */
.apx-wiki-article-card {
    background: var(--apx-bg-surface);
    border: 1px solid var(--apx-gold-border-subtle);
    border-radius: var(--apx-radius-lg);
    padding: 2.25rem;
    box-shadow: var(--apx-shadow-card);
    color: var(--apx-text-sub);
}

.apx-wiki-article-card h2, .apx-wiki-article-card h3 {
    color: #ffffff;
    margin-top: 1.75rem;
    margin-bottom: 1rem;
}

.apx-wiki-body > h1:first-child,
.apx-wiki-body > .fandom-infobox + h1 {
    display: none;
}

.apx-wiki-article-card p {
    font-size: 1rem;
    line-height: 1.75;
    color: var(--apx-text-sub);
    margin-bottom: 1.25rem;
}

.wiki-callout {
    border-radius: var(--apx-radius-md);
    padding: 1.25rem 1.5rem;
    margin: 1.5rem 0;
    border-left: 4px solid;
    font-size: 0.95rem;
}

.wiki-callout-info {
    background: rgba(59, 130, 246, 0.1);
    border-color: #3b82f6;
    color: #bfdbfe;
}

.wiki-callout-tip {
    background: rgba(245, 158, 11, 0.1);
    border-color: var(--apx-gold);
    color: #fef08a;
}

.wiki-callout-warning {
    background: rgba(239, 68, 68, 0.1);
    border-color: #ef4444;
    color: #fecaca;
}

pre, code {
    font-family: 'JetBrains Mono', Consolas, monospace;
}

pre {
    background: var(--apx-bg-deep) !important;
    border: 1px solid var(--apx-border);
    border-radius: var(--apx-radius-sm);
    padding: 1rem 1.25rem;
    color: #a7f3d0;
    overflow-x: auto;
}

code:not(pre code) {
    background: rgba(245, 158, 11, 0.12);
    color: var(--apx-gold-light);
    padding: 0.2rem 0.45rem;
    border-radius: 4px;
    font-size: 0.88em;
}

/* ==============================================================================
   Auth Portal (Login, Register, Password Reset)
   ============================================================================== */
.apx-auth-wrapper {
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
}

.apx-auth-card {
    background: var(--apx-bg-surface);
    border: 1px solid var(--apx-gold-border);
    border-radius: var(--apx-radius-lg);
    box-shadow: var(--apx-shadow-elevated);
    width: 100%;
    max-width: 480px;
    padding: 2.75rem 2.25rem;
    position: relative;
    overflow: hidden;
}

.apx-auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.apx-auth-crest {
    width: 64px;
    height: 64px;
    border-radius: var(--apx-radius-md);
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid var(--apx-gold-border);
    color: var(--apx-gold);
    font-size: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
    filter: drop-shadow(0 0 12px rgba(245, 158, 11, 0.3));
}

.apx-auth-title {
    font-size: 1.75rem;
    color: #ffffff;
    font-weight: 800;
    margin-bottom: 0.35rem;
}

.apx-auth-subtitle {
    font-size: 0.9rem;
    color: var(--apx-text-muted);
}

.apx-auth-footer {
    text-align: center;
    margin-top: 1.75rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--apx-border);
    font-size: 0.92rem;
    color: var(--apx-text-muted);
}

.apx-auth-card .input-group .form-control {
    border-right: 0;
}

.apx-auth-card .input-group .apx-password-toggle {
    border-left: 0;
    background: rgba(15, 23, 42, 0.6);
    border-color: var(--apx-border, rgba(255, 255, 255, 0.12));
    color: var(--apx-text-muted, #94a3b8);
    transition: all 0.2s ease;
    padding: 0.5rem 0.85rem;
    cursor: pointer;
}

.apx-auth-card .input-group .apx-password-toggle:hover,
.apx-auth-card .input-group .apx-password-toggle:focus {
    background: rgba(245, 158, 11, 0.15);
    color: var(--apx-gold, #f59e0b);
    border-color: var(--apx-gold-border, rgba(245, 158, 11, 0.3));
    outline: none;
    box-shadow: none;
}

/* Light mode auth support */
[data-bs-theme="light"] .apx-auth-card .input-group .apx-password-toggle {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #64748b;
}

[data-bs-theme="light"] .apx-auth-card .input-group .apx-password-toggle:hover,
[data-bs-theme="light"] .apx-auth-card .input-group .apx-password-toggle:focus {
    background: #fef3c7;
    color: #b45309;
    border-color: #f59e0b;
}

[data-bs-theme="light"] .apx-auth-card .apx-auth-title {
    color: #0f172a;
}

.apx-auth-card .input-group .form-control {
    border-right: 0;
}

.apx-auth-card .input-group .apx-password-toggle {
    border-left: 0;
    background: rgba(15, 23, 42, 0.6);
    border-color: var(--apx-border, rgba(255, 255, 255, 0.12));
    color: var(--apx-text-muted, #94a3b8);
    transition: all 0.2s ease;
    padding: 0.5rem 0.85rem;
    cursor: pointer;
}

.apx-auth-card .input-group .apx-password-toggle:hover,
.apx-auth-card .input-group .apx-password-toggle:focus {
    background: rgba(245, 158, 11, 0.15);
    color: var(--apx-gold, #f59e0b);
    border-color: var(--apx-gold-border, rgba(245, 158, 11, 0.3));
    outline: none;
    box-shadow: none;
}

/* Light mode auth support */
[data-bs-theme="light"] .apx-auth-card .input-group .apx-password-toggle {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #64748b;
}

[data-bs-theme="light"] .apx-auth-card .input-group .apx-password-toggle:hover,
[data-bs-theme="light"] .apx-auth-card .input-group .apx-password-toggle:focus {
    background: #fef3c7;
    color: #b45309;
    border-color: #f59e0b;
}

[data-bs-theme="light"] .apx-auth-card .apx-auth-title {
    color: #0f172a;
}

/* ==============================================================================
   Footer (ChatGPT Concept Match with Server Box & Slogan Line)
   ============================================================================== */
.apx-footer {
    background: #05070c;
    border-top: 1px solid var(--apx-gold-border-subtle);
    padding: 4.5rem 0 2rem;
    margin-top: auto;
    color: var(--apx-text-muted);
}

.apx-footer-top-slogan {
    position: relative;
}

.apx-slogan-line {
    width: 140px;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(245, 158, 11, 0.45) 50%, transparent 100%);
}

.apx-slogan-text {
    font-family: 'Cinzel', Georgia, serif;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.28em;
    color: #f59e0b;
    text-transform: uppercase;
}

.apx-footer-heading {
    font-family: 'Cinzel', Georgia, serif;
    font-size: 0.88rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.16em;
    margin-bottom: 1.25rem;
}

.apx-footer-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.apx-footer-list li {
    margin-bottom: 0.75rem;
}

.apx-footer-list a {
    color: #94a3b8;
    font-size: 0.88rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: var(--apx-transition);
}

.apx-footer-list a:hover {
    color: var(--apx-gold-light);
    transform: translateX(3px);
}

.apx-footer-quick-copy {
    background: rgba(14, 19, 31, 0.75);
    border: 1px solid rgba(201, 164, 92, 0.28);
    border-radius: var(--apx-radius-sm);
    padding: 0.65rem 0.95rem;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
    user-select: none;
    width: 100%;
    max-width: 290px;
}

.apx-footer-quick-copy:hover {
    background: rgba(22, 30, 48, 0.95);
    border-color: var(--apx-gold);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(201, 164, 92, 0.18);
}

.apx-footer-quick-copy:active {
    transform: translateY(0);
}

.apx-footer-quick-copy:hover .apx-footer-ip-text {
    color: #ffffff !important;
}

.apx-footer-quick-copy:hover .badge-copy {
    color: var(--apx-gold-light) !important;
}

.apx-emblem-line {
    display: inline-block;
    width: 45px;
    height: 1px;
    background: var(--apx-gold-border);
}

/* Rank Hierarchy Showcase & Stats Bar */
.apx-rank-showcase-wrap {
    position: relative;
    border-radius: var(--apx-radius-lg);
    overflow: hidden;
    border: 1px solid rgba(245, 158, 11, 0.3);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.85);
    margin-bottom: 2rem;
}

.apx-rank-showcase-img {
    width: 100%;
    height: auto;
    display: block;
}

.apx-rank-stats-bar {
    background: rgba(12, 16, 26, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: 2px solid var(--apx-gold-border);
    border-radius: var(--apx-radius-md);
}

/* ==============================================================================
   APEXSIONS MASTER RESPONSIVE SUITE & MOBILE NAVIGATION ARCHITECTURE
   Covers Viewports: 320px, 375px, 390px, 412px, 430px, 768px, 1024px, 1280px, 1440px, 1920px
   ============================================================================== */

/* Mobile Drawer Toggle & Offcanvas */
.apx-mobile-drawer-toggle {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    border-radius: var(--apx-radius-sm);
    background: var(--apx-bg-surface-raised);
    border: 1px solid var(--apx-border);
    color: var(--apx-text-main);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--apx-transition);
    padding: 0;
}

.apx-mobile-drawer-toggle:hover {
    background: var(--apx-bg-surface-hover);
    color: var(--apx-gold);
    border-color: var(--apx-gold-border);
}

.apx-offcanvas-drawer {
    background-color: var(--apx-bg-surface) !important;
    color: var(--apx-text-main) !important;
    width: 320px !important;
    max-width: 85vw !important;
    border-left: 1px solid var(--apx-border) !important;
    box-shadow: -10px 0 32px rgba(0, 0, 0, 0.6) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.apx-drawer-header {
    background: var(--apx-bg-surface-raised) !important;
}

.apx-drawer-user-card,
.apx-drawer-guest-card {
    background: var(--apx-bg-surface-raised) !important;
    border: 1px solid var(--apx-border) !important;
}

.apx-drawer-nav-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.apx-drawer-link {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.75rem 1rem;
    border-radius: var(--apx-radius-sm);
    color: var(--apx-text-sub);
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    transition: var(--apx-transition);
    min-height: 44px;
    border: 1px solid transparent;
}

.apx-drawer-link i {
    font-size: 1.15rem;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
}

.apx-drawer-link:hover {
    background: var(--apx-bg-surface-hover);
    color: var(--apx-text-main);
    transform: translateX(4px);
    border-color: var(--apx-border);
}

.apx-drawer-link.active {
    background: rgba(201, 164, 92, 0.15);
    border-color: var(--apx-gold-border);
    color: var(--apx-gold-light);
    font-weight: 700;
}

/* Expandable Perks List on Webstore Cards */
/* Desktop (>=768px): Show 5-6 core benefits, collapse 7th onward */
@media (min-width: 768px) {
    .apx-package-perks.is-collapsible > li:nth-child(n+7) {
        display: none !important;
    }
    .apx-package-perks.is-collapsible.is-expanded > li:nth-child(n+7) {
        display: flex !important;
        animation: fadeInPerk 0.28s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    }
}

/* Mobile & Small Tablet (<768px): Show max 4 core benefits, collapse 5th onward */
@media (max-width: 767.98px) {
    .apx-package-perks.is-collapsible > li:nth-child(n+5) {
        display: none !important;
    }
    .apx-package-perks.is-collapsible.is-expanded > li:nth-child(n+5) {
        display: flex !important;
        animation: fadeInPerk 0.28s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    }
}

@keyframes fadeInPerk {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

.apx-btn-perks-toggle {
    background: transparent;
    border: 1px dashed var(--apx-gold-border-subtle);
    color: var(--apx-gold-light);
    font-size: 0.76rem;
    font-weight: 600;
    padding: 0.35rem 0.65rem;
    border-radius: var(--apx-radius-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-bottom: 0.75rem;
    cursor: pointer;
    transition: var(--apx-transition);
}

.apx-btn-perks-toggle:hover {
    background: rgba(201, 164, 92, 0.12);
    border-color: var(--apx-gold-border);
    color: #ffffff;
}

/* Rank Comparison Matrix Table Responsive Enhancement */
.apx-rank-matrix-table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--apx-radius-sm);
    border: 1px solid var(--apx-gold-border-subtle);
    background: var(--apx-bg-surface);
    position: relative;
    box-shadow: var(--apx-shadow-card);
}

.apx-rank-matrix-scroll-hint {
    display: none;
    font-size: 0.75rem;
    color: var(--apx-gold-light);
    background: var(--apx-bg-surface-raised);
    padding: 0.4rem 0.75rem;
    border-radius: var(--apx-radius-sm);
    border: 1px solid var(--apx-gold-border-subtle);
    margin-bottom: 0.5rem;
    text-align: center;
    font-weight: 600;
}

@media (max-width: 991.98px) {
    .apx-rank-matrix-scroll-hint {
        display: block;
    }
    .apx-rank-matrix-table th:first-child,
    .apx-rank-matrix-table td:first-child {
        position: sticky;
        left: 0;
        z-index: 3;
        background: var(--apx-bg-surface-raised) !important;
        box-shadow: 3px 0 10px rgba(0, 0, 0, 0.4);
    }
}

/* Register Flow Step Progress Indicator */
.apx-step-progress {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.75rem;
    position: relative;
}

.apx-step-progress::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 15%;
    right: 15%;
    height: 2px;
    background: var(--apx-border);
    transform: translateY(-50%);
    z-index: 1;
}

.apx-step-item {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    text-decoration: none;
}

.apx-step-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--apx-bg-surface-raised);
    border: 2px solid var(--apx-border);
    color: var(--apx-text-muted);
    font-weight: 700;
    font-size: 0.82rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--apx-transition);
}

.apx-step-item.active .apx-step-circle {
    background: var(--apx-gold);
    border-color: var(--apx-gold-radiant);
    color: #090A0D;
    box-shadow: 0 0 12px var(--apx-gold-glow);
}

.apx-step-item.completed .apx-step-circle {
    background: var(--apx-emerald);
    border-color: var(--apx-emerald-light);
    color: #ffffff;
}

.apx-step-label {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--apx-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.apx-step-item.active .apx-step-label {
    color: var(--apx-gold-light);
}

/* ==============================================================================
   LIGHT THEME REFINEMENTS FOR COMPONENTS (SOVEREIGN IVORY ARISTOCRACY)
   ============================================================================== */

/* --- 1. Sticky Navbar & Navigation --- */
[data-bs-theme="light"] .apx-navbar {
    background: rgba(255, 255, 255, 0.97) !important;
    border-bottom: 1px solid rgba(158, 123, 62, 0.22) !important;
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.06) !important;
}

[data-bs-theme="light"] .apx-brand-logo-box {
    background: #FFFFFF !important;
    border-color: rgba(158, 123, 62, 0.35) !important;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.08) !important;
}

[data-bs-theme="light"] .apx-brand-title {
    color: #0F172A !important;
}

[data-bs-theme="light"] .apx-brand-tagline {
    color: #72552A !important;
}

[data-bs-theme="light"] .apx-nav-link {
    color: #334155 !important;
}

[data-bs-theme="light"] .apx-nav-link:hover {
    color: #0F172A !important;
    background: #F1F5F9 !important;
    border-color: rgba(158, 123, 62, 0.2) !important;
}

[data-bs-theme="light"] .apx-nav-link.active {
    background: rgba(158, 123, 62, 0.12) !important;
    color: #72552A !important;
    border: 1px solid rgba(158, 123, 62, 0.35) !important;
    box-shadow: 0 0 12px rgba(158, 123, 62, 0.15) !important;
}

[data-bs-theme="light"] .apx-lang-btn {
    background: #FFFFFF !important;
    border-color: rgba(158, 123, 62, 0.3) !important;
    color: #0F172A !important;
}

[data-bs-theme="light"] .apx-lang-btn:hover {
    background: #F8FAFC !important;
    border-color: #9E7B3E !important;
}

[data-bs-theme="light"] .apx-theme-btn {
    background: #FFFFFF !important;
    border-color: rgba(158, 123, 62, 0.3) !important;
    color: #8C6A2E !important;
}

[data-bs-theme="light"] .apx-theme-btn:hover {
    background: #F8FAFC !important;
    border-color: #9E7B3E !important;
}

/* --- 2. Buttons in Light Mode --- */
[data-bs-theme="light"] .apx-navbar .btn-apx-outline,
[data-bs-theme="light"] .btn-apx-outline,
[data-bs-theme="light"] .btn-outline-primary {
    background: #FFFFFF !important;
    color: #0F172A !important;
    border: 1px solid rgba(158, 123, 62, 0.4) !important;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.05) !important;
}

[data-bs-theme="light"] .apx-navbar .btn-apx-outline:hover,
[data-bs-theme="light"] .btn-apx-outline:hover,
[data-bs-theme="light"] .btn-outline-primary:hover {
    background: #F8FAFC !important;
    color: #72552A !important;
    border-color: #9E7B3E !important;
    box-shadow: 0 4px 12px rgba(158, 123, 62, 0.15) !important;
}

[data-bs-theme="light"] .btn-apx-sovereign {
    background: linear-gradient(135deg, #A88444 0%, #8C6A2E 100%) !important;
    color: #FFFFFF !important;
    border: 1px solid #8C6A2E !important;
    box-shadow: 0 4px 14px rgba(140, 106, 46, 0.25) !important;
}

[data-bs-theme="light"] .btn-apx-sovereign:hover {
    background: linear-gradient(135deg, #8C6A2E 0%, #72552A 100%) !important;
    color: #FFFFFF !important;
}

[data-bs-theme="light"] .btn-apx-gold {
    background: linear-gradient(135deg, #A88444 0%, #8C6A2E 100%) !important;
    color: #FFFFFF !important;
    border: 1px solid #8C6A2E !important;
    box-shadow: 0 4px 14px rgba(140, 106, 46, 0.25) !important;
}

[data-bs-theme="light"] .btn-apx-gold:hover {
    background: linear-gradient(135deg, #8C6A2E 0%, #72552A 100%) !important;
    color: #FFFFFF !important;
}

[data-bs-theme="light"] .btn-secondary {
    background: #F1F5F9 !important;
    border-color: #CBD5E1 !important;
    color: #0F172A !important;
}

[data-bs-theme="light"] .btn-secondary:hover {
    background: #E2E8F0 !important;
    color: #72552A !important;
}

/* --- 3. Hero Section (Panoramic Daylight & Aristocratic Warm Canvas) --- */
[data-bs-theme="light"] .apx-hero-panoramic-bg {
    background-image: linear-gradient(90deg, rgba(246, 248, 250, 0.96) 0%, rgba(246, 248, 250, 0.88) 35%, rgba(246, 248, 250, 0.40) 70%, rgba(246, 248, 250, 0.70) 100%), linear-gradient(180deg, rgba(246, 248, 250, 0.45) 0%, transparent 40%, rgba(246, 248, 250, 0.98) 100%), url('../img/hero-panoramic.png') !important;
}

[data-bs-theme="light"] .apx-hero-brand-mark {
    color: #72552A !important;
}

[data-bs-theme="light"] .apx-hero-hierarchy-axis {
    background: #FFFFFF !important;
    border: 1px solid rgba(158, 123, 62, 0.25) !important;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.05) !important;
}

[data-bs-theme="light"] .apx-axis-step {
    color: #526075 !important;
}

[data-bs-theme="light"] .apx-axis-arrow {
    color: #94a3b8 !important;
}

[data-bs-theme="light"] .apx-axis-apex {
    color: #8C6A2E !important;
    font-weight: 800;
}

[data-bs-theme="light"] .apx-hero-headline {
    color: #0F172A !important;
}

[data-bs-theme="light"] .apx-hero-subtext {
    color: #334155 !important;
}

[data-bs-theme="light"] .apx-hero-ip-block {
    background: #FFFFFF !important;
    border: 1px solid rgba(158, 123, 62, 0.35) !important;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06) !important;
}

[data-bs-theme="light"] .apx-hero-ip-block:hover {
    background: #F8FAFC !important;
    border-color: #9E7B3E !important;
    box-shadow: 0 6px 18px rgba(158, 123, 62, 0.15) !important;
}

[data-bs-theme="light"] .apx-ip-label {
    color: #64748b !important;
}

[data-bs-theme="light"] .apx-ip-address {
    color: #0F172A !important;
}

[data-bs-theme="light"] .apx-ip-icon {
    color: #9E7B3E !important;
}

[data-bs-theme="light"] .apx-hero-infrastructure {
    border-top: 1px solid rgba(158, 123, 62, 0.2) !important;
}

[data-bs-theme="light"] .apx-infra-item {
    color: #526075 !important;
}

[data-bs-theme="light"] .apx-infra-val {
    color: #0F172A !important;
}

[data-bs-theme="light"] .apx-infra-label {
    color: #72552A !important;
    font-weight: 700;
}

[data-bs-theme="light"] .apx-infra-status {
    color: #059669 !important;
}

[data-bs-theme="light"] .apx-infra-meta {
    color: #64748b !important;
}

[data-bs-theme="light"] .apx-infra-divider {
    color: #CBD5E1 !important;
}

[data-bs-theme="light"] .apx-infra-item.apx-copyable:hover {
    background: rgba(158, 123, 62, 0.1) !important;
    color: #0F172A !important;
}

/* --- 4. Section Headings & Kickers --- */
[data-bs-theme="light"] .apx-world-title,
[data-bs-theme="light"] .apx-section-title {
    color: #0F172A !important;
}

[data-bs-theme="light"] .apx-world-lead {
    color: #334155 !important;
}

[data-bs-theme="light"] .apx-section-kicker {
    color: #8C6A2E !important;
}

/* --- 5. Lore & 3 Kingdoms Section --- */
[data-bs-theme="light"] .apx-world-section {
    background: #F6F8FA !important;
    border-top: 1px solid rgba(158, 123, 62, 0.2) !important;
}

[data-bs-theme="light"] .apx-kingdom-province {
    background: #FFFFFF !important;
    border: 1px solid rgba(158, 123, 62, 0.22) !important;
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.06) !important;
}

[data-bs-theme="light"] .apx-kingdom-province:hover {
    background: #FFFFFF !important;
    border-color: #9E7B3E !important;
    box-shadow: 0 8px 28px rgba(158, 123, 62, 0.18) !important;
}

[data-bs-theme="light"] .apx-province-header {
    border-bottom: 1px solid rgba(158, 123, 62, 0.15) !important;
}

[data-bs-theme="light"] .apx-province-name {
    color: #0F172A !important;
}

[data-bs-theme="light"] .apx-province-desc {
    color: #334155 !important;
}

/* Light Mode 3 Kingdoms Color Archetypes */
[data-bs-theme="light"] .apx-kingdom-zenithar .apx-province-type { color: #8C6A2E !important; }
[data-bs-theme="light"] .apx-kingdom-zenithar .apx-province-name { color: #72552A !important; }
[data-bs-theme="light"] .apx-kingdom-zenithar .apx-province-spec-title { color: #8C6A2E !important; }

[data-bs-theme="light"] .apx-kingdom-solterra .apx-province-type { color: #B91C1C !important; }
[data-bs-theme="light"] .apx-kingdom-solterra .apx-province-name { color: #991B1B !important; }
[data-bs-theme="light"] .apx-kingdom-solterra .apx-province-spec-title { color: #B91C1C !important; }

[data-bs-theme="light"] .apx-kingdom-sylvamoor .apx-province-type { color: #0369A1 !important; }
[data-bs-theme="light"] .apx-kingdom-sylvamoor .apx-province-name { color: #0284C7 !important; }
[data-bs-theme="light"] .apx-kingdom-sylvamoor .apx-province-spec-title { color: #0284C7 !important; }

[data-bs-theme="light"] .apx-buff-label { color: #047857 !important; }
[data-bs-theme="light"] .apx-debuff-label { color: #B91C1C !important; }
[data-bs-theme="light"] .apx-debuff-text { color: #B71540 !important; }

[data-bs-theme="light"] .apx-province-specs li {
    color: #1E293B !important;
}

[data-bs-theme="light"] .apx-province-specs li i {
    color: #72552A !important;
}

[data-bs-theme="light"] .apx-province-specs li span {
    color: #334155 !important;
}

[data-bs-theme="light"] .apx-ledger-link {
    color: #72552A !important;
}

[data-bs-theme="light"] .apx-ledger-link:hover {
    color: #0F172A !important;
}

[data-bs-theme="light"] .apx-player-link {
    color: #72552A !important;
}

[data-bs-theme="light"] .apx-player-link:hover {
    color: #0F172A !important;
}

/* --- 6. Monolith Ledger & Realm Showcase --- */
[data-bs-theme="light"] .apx-monolith-ledger {
    background: #FFFFFF !important;
    border: 1px solid rgba(158, 123, 62, 0.22) !important;
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.06) !important;
}

[data-bs-theme="light"] .apx-ledger-row {
    border-bottom: 1px solid rgba(158, 123, 62, 0.15) !important;
}

[data-bs-theme="light"] .apx-ledger-title {
    color: #0F172A !important;
}

[data-bs-theme="light"] .apx-ledger-desc {
    color: #334155 !important;
}

[data-bs-theme="light"] .apx-showcase-box {
    background: #FFFFFF !important;
    border: 1px solid rgba(158, 123, 62, 0.22) !important;
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.06) !important;
}

[data-bs-theme="light"] .apx-showcase-footer {
    background: #FFFFFF !important;
    border-top: 1px solid rgba(158, 123, 62, 0.15) !important;
}

[data-bs-theme="light"] .apx-showcase-title {
    color: #0F172A !important;
}

[data-bs-theme="light"] .apx-showcase-sub {
    color: #334155 !important;
}

[data-bs-theme="light"] .apx-showcase-tag {
    background: #FFFFFF !important;
    border: 1px solid rgba(158, 123, 62, 0.3) !important;
    color: #72552A !important;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08) !important;
}

[data-bs-theme="light"] .apx-showcase-overlay {
    background: linear-gradient(to top, rgba(255, 255, 255, 0.85) 0%, transparent 60%) !important;
}

/* --- 7. Tactical Cartography Map Monolith --- */
[data-bs-theme="light"] .apx-map-section {
    background: #F4F1EA !important;
    border-top: 1px solid rgba(158, 123, 62, 0.2) !important;
    border-bottom: 1px solid rgba(158, 123, 62, 0.15) !important;
}

[data-bs-theme="light"] .apx-map-monolith {
    background: #FFFFFF !important;
    border: 1px solid rgba(158, 123, 62, 0.25) !important;
    box-shadow: 0 10px 32px rgba(15, 23, 42, 0.08) !important;
}

[data-bs-theme="light"] .apx-telemetry-badge-cluster {
    background: #F1F5F9 !important;
    border-color: #E2E8F0 !important;
    color: #475569 !important;
}

[data-bs-theme="light"] .apx-carto-spec-card {
    background: #F8FAFC !important;
    border-color: #E2E8F0 !important;
}

[data-bs-theme="light"] .apx-carto-spec-card:hover {
    background: #FFFDF8 !important;
    border-color: rgba(158, 123, 62, 0.35) !important;
}

[data-bs-theme="light"] .apx-carto-viewport {
    border-color: rgba(158, 123, 62, 0.3) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15) !important;
}

/* --- 8. Social Castes Section (11 Castes) --- */
[data-bs-theme="light"] .apx-ranks-section {
    background: #F6F8FA !important;
    border-top: 1px solid rgba(158, 123, 62, 0.2) !important;
}

[data-bs-theme="light"] .apx-caste-nav {
    border-bottom: 1px solid rgba(158, 123, 62, 0.2) !important;
}

[data-bs-theme="light"] .apx-caste-filter-btn {
    color: #526075 !important;
}

[data-bs-theme="light"] .apx-caste-filter-btn:hover {
    color: #0F172A !important;
}

[data-bs-theme="light"] .apx-caste-filter-btn.active {
    color: #72552A !important;
    border-bottom-color: #9E7B3E !important;
}

[data-bs-theme="light"] .apx-tier-label-bar {
    border-bottom: 1px solid rgba(158, 123, 62, 0.2) !important;
}

[data-bs-theme="light"] .apx-tier-roman {
    color: #72552A !important;
}

[data-bs-theme="light"] .apx-tier-name {
    color: #0F172A !important;
}

[data-bs-theme="light"] .apx-weight-pill {
    background: #FFFFFF !important;
    border: 1px solid rgba(158, 123, 62, 0.25) !important;
    color: #526075 !important;
}

[data-bs-theme="light"] .apx-weight-pill.gold {
    background: rgba(158, 123, 62, 0.1) !important;
    border-color: #9E7B3E !important;
    color: #72552A !important;
}

[data-bs-theme="light"] .apx-caste-card {
    background: #FFFFFF !important;
    border: 1px solid rgba(158, 123, 62, 0.22) !important;
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.06) !important;
}

[data-bs-theme="light"] .apx-caste-card:hover {
    background: #FFFFFF !important;
    border-color: #9E7B3E !important;
    box-shadow: 0 8px 28px rgba(158, 123, 62, 0.18) !important;
}

[data-bs-theme="light"] .apx-card-apex {
    background: linear-gradient(180deg, #FFFDF8 0%, #FFFFFF 100%) !important;
    border: 1px solid rgba(158, 123, 62, 0.4) !important;
    border-top: 3px solid #9E7B3E !important;
    box-shadow: 0 10px 30px rgba(158, 123, 62, 0.12) !important;
}

[data-bs-theme="light"] .apx-card-foundation {
    background: #FFFFFF !important;
    border: 1px solid rgba(158, 123, 62, 0.22) !important;
    border-bottom: 3px solid rgba(158, 123, 62, 0.4) !important;
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.06) !important;
}

[data-bs-theme="light"] .apx-tier-authority-grid .apx-caste-card {
    border-top: 2px solid rgba(158, 123, 62, 0.4) !important;
}

[data-bs-theme="light"] .apx-tier-staff-grid .apx-caste-card {
    border-top: 2px solid rgba(158, 123, 62, 0.3) !important;
}

[data-bs-theme="light"] .apx-tier-ascension-grid .apx-caste-card {
    border-top: 1px solid rgba(158, 123, 62, 0.25) !important;
}

[data-bs-theme="light"] .apx-tier-ascension-grid .apx-caste-card:first-child {
    border-top: 2px solid #9E7B3E !important;
}

[data-bs-theme="light"] .apx-caste-name {
    color: #0F172A !important;
}

[data-bs-theme="light"] .apx-caste-prefix {
    color: #526075 !important;
}

[data-bs-theme="light"] .apx-caste-desc {
    color: #334155 !important;
}

[data-bs-theme="light"] .apx-caste-perks li {
    color: #1E293B !important;
}

[data-bs-theme="light"] .apx-caste-perks li i {
    color: #9E7B3E !important;
}

[data-bs-theme="light"] .apx-caste-banner {
    background: #FFFFFF !important;
    border: 1px solid rgba(158, 123, 62, 0.2) !important;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.08) !important;
}

[data-bs-theme="light"] .apx-caste-card:hover .apx-caste-banner {
    border-color: rgba(158, 123, 62, 0.4) !important;
    box-shadow: 0 4px 14px rgba(158, 123, 62, 0.2) !important;
}

[data-bs-theme="light"] .apx-caste-tier-badge {
    background: rgba(158, 123, 62, 0.1) !important;
    color: #72552A !important;
    border: 1px solid rgba(158, 123, 62, 0.25) !important;
}

[data-bs-theme="light"] .apx-caste-weight {
    color: #64748b !important;
}

[data-bs-theme="light"] .apx-caste-action {
    border-top: 1px solid rgba(158, 123, 62, 0.15) !important;
}

/* --- 9. Onboarding Stepper Section --- */
[data-bs-theme="light"] .apx-onboarding-section {
    background: #FFFFFF !important;
    border-top: 1px solid rgba(158, 123, 62, 0.2) !important;
}

[data-bs-theme="light"] .apx-step-monolith {
    background: #FFFFFF !important;
    border: 1px solid rgba(158, 123, 62, 0.22) !important;
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.06) !important;
}

[data-bs-theme="light"] .apx-step-monolith:hover {
    background: #FFFFFF !important;
    border-color: #9E7B3E !important;
    box-shadow: 0 8px 28px rgba(158, 123, 62, 0.18) !important;
}

[data-bs-theme="light"] .apx-step-phase-label {
    color: #72552A !important;
}

[data-bs-theme="light"] .apx-step-num-etched {
    color: rgba(158, 123, 62, 0.35) !important;
}

[data-bs-theme="light"] .apx-step-icon {
    color: #72552A !important;
}

[data-bs-theme="light"] .apx-step-title {
    color: #0F172A !important;
}

[data-bs-theme="light"] .apx-step-desc {
    color: #334155 !important;
}

[data-bs-theme="light"] .apx-step-monolith code {
    background: #F1F5F9 !important;
    color: #0F172A !important;
    border: 1px solid #CBD5E1 !important;
}

[data-bs-theme="light"] .apx-quick-guide-banner {
    background: linear-gradient(135deg, #FFFDF8 0%, #F8FAFC 100%) !important;
    border: 1px solid rgba(158, 123, 62, 0.35) !important;
    box-shadow: 0 6px 24px rgba(15, 23, 42, 0.06) !important;
}

[data-bs-theme="light"] .apx-guide-callout-badge {
    background: rgba(158, 123, 62, 0.12) !important;
    color: #72552A !important;
    border-color: rgba(158, 123, 62, 0.3) !important;
}

[data-bs-theme="light"] .apx-guide-callout-title {
    color: #0F172A !important;
}

[data-bs-theme="light"] .apx-guide-callout-desc {
    color: #334155 !important;
}

/* --- 10. Footer in Light Mode --- */
[data-bs-theme="light"] .apx-footer {
    background: #F8FAFC !important;
    border-top: 1px solid rgba(158, 123, 62, 0.22) !important;
    color: #334155 !important;
}

[data-bs-theme="light"] .apx-footer-heading {
    color: #0F172A !important;
    font-weight: 800;
}

[data-bs-theme="light"] .apx-footer-desc {
    color: #334155 !important;
}

[data-bs-theme="light"] .apx-footer-list a {
    color: #475569 !important;
}

[data-bs-theme="light"] .apx-footer-list a:hover {
    color: #9E7B3E !important;
}

[data-bs-theme="light"] .apx-footer-quick-copy {
    background: #FFFFFF !important;
    border: 1px solid rgba(158, 123, 62, 0.3) !important;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05) !important;
}

[data-bs-theme="light"] .apx-footer-quick-copy:hover {
    background: #F8FAFC !important;
    border-color: #9E7B3E !important;
}

[data-bs-theme="light"] .apx-footer-quick-copy i {
    color: #72552A !important;
}

[data-bs-theme="light"] .apx-footer-ip-text {
    color: #0F172A !important;
}

[data-bs-theme="light"] .apx-footer-copyright-text {
    color: #0F172A !important;
}

[data-bs-theme="light"] .apx-footer-bottom {
    border-top: 1px solid rgba(158, 123, 62, 0.15) !important;
}

[data-bs-theme="light"] .apx-slogan-text {
    color: #72552A !important;
}

[data-bs-theme="light"] .apx-slogan-line {
    background: rgba(158, 123, 62, 0.25) !important;
}

[data-bs-theme="light"] .apx-footer-verbs {
    color: #72552A !important;
}

[data-bs-theme="light"] .apx-emblem-title {
    color: #72552A !important;
}

/* --- 11. Cards, Tables, Modals, Forms & Utility Overrides --- */
[data-bs-theme="light"] .card {
    background: #FFFFFF !important;
    border-color: rgba(158, 123, 62, 0.22) !important;
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.06) !important;
}

[data-bs-theme="light"] .card-header {
    background: #F8FAFC !important;
    color: #72552A !important;
    border-bottom-color: rgba(158, 123, 62, 0.18) !important;
}

[data-bs-theme="light"] .card-footer {
    background: #F8FAFC !important;
    border-top-color: rgba(158, 123, 62, 0.15) !important;
}

[data-bs-theme="light"] .form-control,
[data-bs-theme="light"] .form-select {
    background-color: #FFFFFF !important;
    border-color: #CBD5E1 !important;
    color: #0F172A !important;
}

[data-bs-theme="light"] .form-control:focus,
[data-bs-theme="light"] .form-select:focus {
    background-color: #FFFFFF !important;
    border-color: #9E7B3E !important;
    box-shadow: 0 0 0 3px rgba(158, 123, 62, 0.18) !important;
    color: #0F172A !important;
}

[data-bs-theme="light"] .input-group .apx-password-toggle {
    background: #F1F5F9 !important;
    border-color: #CBD5E1 !important;
    color: #475569 !important;
}

[data-bs-theme="light"] .apx-package-card {
    background: #FFFFFF !important;
    border-color: rgba(158, 123, 62, 0.22) !important;
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.06) !important;
}

[data-bs-theme="light"] .apx-package-body {
    background: #FFFFFF !important;
}

[data-bs-theme="light"] .apx-package-image-wrap {
    background: linear-gradient(180deg, #F8FAFC 0%, #FFFFFF 100%) !important;
    border-bottom: 1px solid rgba(158, 123, 62, 0.15) !important;
}

[data-bs-theme="light"] .apx-package-title {
    color: #0F172A !important;
}

[data-bs-theme="light"] .apx-spec-pill {
    background: #F8FAFC !important;
    border-color: #E2E8F0 !important;
    color: #334155 !important;
}

[data-bs-theme="light"] .apx-spec-pill strong {
    color: #0F172A !important;
}

[data-bs-theme="light"] .apx-rank-matrix-table-scroll {
    background: #FFFFFF !important;
    border-color: rgba(158, 123, 62, 0.22) !important;
}

[data-bs-theme="light"] .apx-rank-matrix-table th {
    background: #F8FAFC !important;
    color: #72552A !important;
    border-bottom-color: rgba(158, 123, 62, 0.25) !important;
}

[data-bs-theme="light"] .apx-rank-matrix-table td {
    color: #334155 !important;
    border-bottom-color: rgba(0, 0, 0, 0.06) !important;
}

[data-bs-theme="light"] .apx-rank-matrix-table tr:hover td {
    background: #F8FAFC !important;
}

[data-bs-theme="light"] .btn-close {
    filter: none !important;
}

[data-bs-theme="light"] .modal-content {
    background-color: #FFFFFF !important;
    color: #0F172A !important;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.15) !important;
}

[data-bs-theme="light"] .modal-header,
[data-bs-theme="light"] .modal-footer {
    background-color: #F8FAFC !important;
}

[data-bs-theme="light"] .dropdown-menu {
    background-color: #FFFFFF !important;
    border-color: rgba(158, 123, 62, 0.22) !important;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12) !important;
    color: #0F172A !important;
}

[data-bs-theme="light"] .dropdown-item {
    color: #334155 !important;
}

[data-bs-theme="light"] .dropdown-item:hover {
    background-color: #F1F5F9 !important;
    color: #0F172A !important;
}

[data-bs-theme="light"] .apx-auth-card {
    background: #FFFFFF !important;
    border-color: rgba(158, 123, 62, 0.22) !important;
    box-shadow: 0 12px 36px rgba(15, 23, 42, 0.10) !important;
}

[data-bs-theme="light"] .apx-wiki-header {
    background: linear-gradient(135deg, #FFFFFF 0%, #F8FAFC 100%) !important;
    border-color: rgba(158, 123, 62, 0.22) !important;
}

/* Fallback protection: Prevent hardcoded dark utility classes from breaking light mode */
[data-bs-theme="light"] .bg-black {
    background-color: #F8FAFC !important;
}

[data-bs-theme="light"] .form-control.bg-black {
    background-color: #FFFFFF !important;
    color: #0F172A !important;
}

/* ==============================================================================
   RESPONSIVE BREAKPOINTS ENGINE (Mobile-First Scalability)
   ============================================================================== */

/* --- 1. Small Mobile (320px - 430px) --- */
@media (max-width: 575.98px) {
    body.apx-body {
        font-size: 0.95rem;
    }

    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    /* Hero Section Adaptation */
    .apx-hero-panoramic {
        min-height: auto;
        padding: 1.5rem 0 1rem;
    }

    .apx-hero-brand-mark {
        font-size: 0.65rem;
        letter-spacing: 0.15em;
    }

    .apx-hero-hierarchy-axis {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
        padding-bottom: 0.5rem;
        scrollbar-width: none;
        display: flex;
        gap: 0.35rem;
    }

    .apx-hero-hierarchy-axis::-webkit-scrollbar {
        display: none;
    }

    .apx-axis-step {
        font-size: 0.65rem;
        padding: 0.2rem 0.5rem;
    }

    .apx-hero-headline {
        font-size: 1.65rem !important;
        line-height: 1.2 !important;
        margin-bottom: 0.75rem !important;
    }

    .apx-hero-subtext {
        font-size: 0.88rem !important;
        line-height: 1.6 !important;
        margin-bottom: 1.25rem !important;
    }

    .apx-hero-action-group {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 0.65rem !important;
        width: 100%;
        margin-bottom: 1rem !important;
    }

    .btn-apx-sovereign {
        width: 100%;
        justify-content: center;
        padding: 0.85rem 1rem !important;
        font-size: 0.84rem !important;
        text-align: center;
    }

    .apx-hero-ip-block {
        width: 100%;
        justify-content: center;
        padding: 0.75rem 1rem !important;
    }

    .apx-hero-telemetry {
        font-size: 0.78rem;
        gap: 0.35rem 0.5rem !important;
    }

    /* Kingdoms Triptych on Small Mobile */
    .apx-kingdoms-triptych {
        display: flex;
        flex-direction: column;
        gap: 1.25rem;
    }

    .apx-kingdom-card {
        width: 100%;
    }

    /* Webstore on Small Mobile */
    .apx-store-nav-bar {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
        padding-bottom: 0.5rem;
        scrollbar-width: none;
    }

    .apx-store-nav-bar::-webkit-scrollbar {
        display: none;
    }

    .apx-store-pill {
        flex-shrink: 0;
        padding: 0.5rem 0.85rem !important;
        font-size: 0.82rem !important;
    }

    .apx-package-card {
        margin-bottom: 1rem;
    }

    .apx-spec-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 0.4rem !important;
    }

    /* Auth Card on Small Mobile */
    .apx-auth-wrapper {
        padding: 1rem 0;
    }

    .apx-auth-card {
        padding: 1.5rem 1.15rem !important;
        border-radius: var(--apx-radius-md) !important;
    }

    /* Footer on Small Mobile */
    .apx-footer {
        padding: 2.5rem 0 1.5rem;
    }

    .apx-footer-quick-copy {
        width: 100%;
        justify-content: center;
    }

    .apx-slogan-line {
        width: 50px;
    }
}

/* --- 2. Mobile Landscape & Phablet (576px - 767.98px) --- */
@media (min-width: 576px) and (max-width: 767.98px) {
    .apx-hero-headline {
        font-size: 2rem !important;
    }

    .apx-hero-action-group {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .apx-hero-infrastructure {
        flex-direction: column;
    }

    .apx-kingdoms-triptych {
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
    }

    .apx-auth-card {
        padding: 2rem 1.75rem;
    }
}

/* --- 3. Tablet Portrait (768px - 991.98px) --- */
@media (min-width: 768px) and (max-width: 991.98px) {
    .apx-hero-panoramic {
        min-height: 75vh;
        padding: 2.5rem 0 2rem;
    }

    .apx-hero-headline {
        font-size: 2.4rem !important;
    }

    .apx-kingdoms-triptych {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .apx-kingdom-card:last-child {
        grid-column: span 2;
    }

    .apx-hero-infrastructure {
        flex-wrap: wrap;
        gap: 0.75rem;
    }
}

/* --- 4. Tablet Landscape & Small Laptop (992px - 1199.98px) --- */
@media (min-width: 992px) and (max-width: 1199.98px) {
    .apx-hero-headline {
        font-size: 2.75rem !important;
    }

    .apx-kingdoms-triptych {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 1.25rem;
    }
}

/* --- 5. Standard Laptop (1200px - 1399.98px) --- */
@media (min-width: 1200px) and (max-width: 1399.98px) {
    .apx-hero-headline {
        font-size: 3rem !important;
    }
}

/* --- 6. Desktop & Ultra-Wide (1400px - 1920px) --- */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }

    .apx-hero-headline {
        font-size: 3.25rem !important;
    }
}

@media (min-width: 1920px) {
    .container {
        max-width: 1480px;
    }

    .apx-hero-panoramic {
        padding: 4rem 0 3rem;
    }
}

/* ==========================================================================
   Apexsions Wiki & Encyclopedia System
   ========================================================================== */
.apx-wiki-header {
    background: linear-gradient(135deg, rgba(17, 24, 39, 0.85) 0%, rgba(10, 14, 23, 0.95) 100%);
    border: 1px solid var(--apx-gold-border-subtle);
    border-radius: var(--apx-radius-md);
    padding: 1.75rem 2rem;
    margin-bottom: 2rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.apx-wiki-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--apx-gold), transparent);
}

.apx-wiki-title-area h1 {
    font-family: 'Cinzel', Georgia, serif;
    font-size: 1.85rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.02em;
}

.apx-wiki-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.85rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--apx-gold-light);
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid var(--apx-gold-border);
    border-radius: var(--apx-radius-xs);
    margin-bottom: 0.5rem;
}

.apx-wiki-search-form {
    min-width: 280px;
    max-width: 420px;
    width: 100%;
}

.apx-wiki-search-form .input-group {
    background: rgba(13, 18, 30, 0.8);
    border: 1px solid var(--apx-gold-border-subtle);
    border-radius: var(--apx-radius-sm);
    overflow: hidden;
    transition: var(--apx-transition);
}

.apx-wiki-search-form .input-group:focus-within {
    border-color: var(--apx-gold);
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.25);
}

.apx-wiki-search-form input.form-control {
    background: transparent;
    border: none;
    padding: 0.65rem 1rem;
    font-size: 0.92rem;
    color: #ffffff;
}

.apx-wiki-search-form input.form-control::placeholder {
    color: #64748b;
}

.apx-wiki-search-form input.form-control:focus {
    box-shadow: none;
    background: transparent;
}

.apx-wiki-search-form .btn-apx-gold {
    border-radius: 0;
    padding: 0.65rem 1.25rem;
}

.apx-wiki-sidebar .list-group-item {
    background: rgba(13, 18, 30, 0.6);
    border: 1px solid rgba(245, 158, 11, 0.12);
    color: #94a3b8;
    padding: 0.75rem 1rem;
    font-size: 0.92rem;
    transition: var(--apx-transition);
    border-radius: var(--apx-radius-sm);
    margin-bottom: 0.35rem;
}

.apx-wiki-sidebar .list-group-item:hover {
    background: rgba(245, 158, 11, 0.1);
    color: #ffffff;
    border-color: rgba(245, 158, 11, 0.3);
    transform: translateX(3px);
}

.apx-wiki-sidebar .list-group-item.active {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2) 0%, rgba(217, 119, 6, 0.1) 100%);
    border-color: var(--apx-gold);
    color: var(--apx-gold-light);
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.15);
}

.apx-wiki-article-card {
    background: var(--apx-bg-surface);
    border: 1px solid var(--apx-gold-border-subtle);
    border-radius: var(--apx-radius-md);
    padding: 2.25rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(12px);
}

.apx-wiki-body {
    color: #cbd5e1;
    font-size: 0.98rem;
    line-height: 1.85;
}

.apx-wiki-body h1,
.apx-wiki-body h2,
.apx-wiki-body h3,
.apx-wiki-body h4 {
    font-family: 'Cinzel', Georgia, serif;
    color: #ffffff;
    font-weight: 700;
    margin-top: 1.75rem;
    margin-bottom: 1rem;
}

.apx-wiki-body h2 {
    font-size: 1.45rem;
    border-bottom: 1px solid rgba(245, 158, 11, 0.2);
    padding-bottom: 0.5rem;
    color: var(--apx-gold-light);
}

.apx-wiki-body h3 {
    font-size: 1.2rem;
    color: #e2e8f0;
}

.apx-wiki-body p {
    margin-bottom: 1.25rem;
}

.apx-wiki-body ul,
.apx-wiki-body ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.apx-wiki-body li {
    margin-bottom: 0.4rem;
}

.apx-wiki-body table {
    width: 100%;
    margin-bottom: 1.75rem;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: var(--apx-radius-sm);
    overflow: hidden;
    border: 1px solid rgba(245, 158, 11, 0.2);
    background: rgba(10, 14, 23, 0.6);
}

.apx-wiki-body th {
    background: rgba(245, 158, 11, 0.12);
    color: var(--apx-gold-light);
    font-family: 'Cinzel', Georgia, serif;
    font-size: 0.88rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid rgba(245, 158, 11, 0.25);
}

.apx-wiki-body td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: #cbd5e1;
    font-size: 0.92rem;
}

.apx-wiki-body tr:last-child td {
    border-bottom: none;
}

.apx-wiki-body tr:hover td {
    background: rgba(245, 158, 11, 0.04);
}

.apx-wiki-body blockquote {
    margin: 1.5rem 0;
    padding: 1rem 1.5rem;
    background: rgba(245, 158, 11, 0.06);
    border-left: 4px solid var(--apx-gold);
    border-radius: 0 var(--apx-radius-sm) var(--apx-radius-sm) 0;
    color: #e2e8f0;
    font-style: italic;
}

.apx-wiki-body code {
    background: rgba(245, 158, 11, 0.12);
    color: var(--apx-gold-light);
    padding: 0.2rem 0.45rem;
    border-radius: 4px;
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 0.88rem;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.apx-wiki-body pre {
    background: #080b12;
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: var(--apx-radius-sm);
    padding: 1rem 1.25rem;
    overflow-x: auto;
    margin-bottom: 1.5rem;
}

.apx-wiki-body pre code {
    background: transparent;
    padding: 0;
    border: none;
    color: #e2e8f0;
}

.apx-wiki-body hr {
    border: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(245, 158, 11, 0.35), transparent);
    margin: 2rem 0;
}

/* Search Results Page & Polish */
.apx-wiki-search-card:hover {
    border-color: var(--apx-gold) !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(245, 158, 11, 0.12);
}

.hover-gold:hover {
    color: var(--apx-gold-light) !important;
}

/* Callout Box for 15-Minute Guides */
.apx-wiki-step-box {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.08) 0%, rgba(13, 18, 30, 0.7) 100%);
    border: 1px solid var(--apx-gold-border);
    border-left: 4px solid var(--apx-gold);
    border-radius: var(--apx-radius-sm);
    padding: 1.25rem 1.5rem;
    margin: 1.5rem 0;
}

.apx-wiki-step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--apx-gold);
    color: #0d121e;
    font-weight: 800;
    font-size: 0.85rem;
    margin-right: 0.75rem;
}

/* ==============================================================================
   Cinematic Inter-Page Transition & Ambient Loading Overlay (VolteraMC / AAA Inspiration)
   ============================================================================== */
.apx-page-transition {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    max-width: 100%;
    height: 100%;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transform: scale(1);
    transition: opacity 0.35s cubic-bezier(0.22, 1, 0.36, 1), transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), visibility 0.4s;
    will-change: opacity, transform, visibility;
}

.apx-page-transition.is-navigating {
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    transform: scale(1) !important;
    transition: opacity 0.22s cubic-bezier(0.22, 1, 0.36, 1), transform 0.25s cubic-bezier(0.22, 1, 0.36, 1) !important;
}

@keyframes apxEmergencyFadeOut {
    0%, 70% {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }
    100% {
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: scale(1.025) translateY(-8px);
    }
}

.apx-page-transition.is-entering {
    display: flex !important;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: scale(1);
    animation: apxEmergencyFadeOut 0.75s cubic-bezier(0.22, 1, 0.36, 1) 0.15s forwards;
}

.apx-page-transition.is-loaded {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transform: none !important;
}

.apx-transition-backdrop {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 48%, rgba(24, 26, 32, 0.98) 0%, rgba(17, 19, 24, 0.99) 70%, #090A0D 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.apx-transition-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
    transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.apx-transition-crest-halo {
    position: absolute;
    width: 240px;
    height: 240px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -65%);
    background: radial-gradient(circle, rgba(201, 164, 92, 0.4) 0%, rgba(201, 164, 92, 0.1) 45%, transparent 70%);
    border-radius: 50%;
    filter: blur(22px);
    pointer-events: none;
    animation: apxHaloBreath 2.6s ease-in-out infinite;
}

@keyframes apxHaloBreath {
    0%, 100% { transform: translate(-50%, -65%) scale(0.92); opacity: 0.55; }
    50% { transform: translate(-50%, -65%) scale(1.18); opacity: 1; }
}

.apx-transition-crest-wrap {
    width: 104px;
    height: 104px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
}

.apx-transition-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 0 16px rgba(201, 164, 92, 0.45));
    animation: apxTransitionLogoPulse 2.4s ease-in-out infinite;
}

@keyframes apxTransitionLogoPulse {
    0%, 100% {
        transform: scale(0.96);
        filter: drop-shadow(0 0 14px rgba(201, 164, 92, 0.4));
    }
    50% {
        transform: scale(1.04);
        filter: drop-shadow(0 0 32px rgba(201, 164, 92, 0.85));
    }
}

.apx-transition-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.apx-transition-title {
    font-family: 'Cinzel', Georgia, serif;
    font-size: 1.45rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: 0.24em;
    line-height: 1.2;
    margin-bottom: 0.35rem;
    text-shadow: 0 0 16px rgba(255, 255, 255, 0.25);
}

.apx-transition-tagline {
    font-family: 'Cinzel', Georgia, serif;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.32em;
    color: var(--apx-gold-light);
    text-transform: uppercase;
    margin-bottom: 1.25rem;
    opacity: 0.9;
}

.apx-transition-bar {
    width: 140px;
    height: 2px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 2px;
    overflow: hidden;
    position: relative;
}

.apx-transition-bar-fill {
    width: 55%;
    height: 100%;
    background: linear-gradient(90deg, transparent, #d4a359, #f3c37a, transparent);
    position: absolute;
    animation: apxBarShimmer 1.35s ease-in-out infinite;
}

@keyframes apxBarShimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(280%); }
}

/* ==============================================================================
   Cinematic Scroll Reveal Animations (Silky Smooth, Zero Popping)
   ============================================================================== */
.apx-scroll-reveal {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}

.apx-scroll-reveal.is-revealed {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

/* Stagger utilities for smooth cascaded entry */
.apx-reveal-stagger-1 { transition-delay: 0.08s; }
.apx-reveal-stagger-2 { transition-delay: 0.16s; }
.apx-reveal-stagger-3 { transition-delay: 0.24s; }
.apx-reveal-stagger-4 { transition-delay: 0.32s; }

@media (prefers-reduced-motion: reduce) {
    .apx-scroll-reveal {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
    .apx-page-transition {
        display: none !important;
    }
}

/* ==============================================================================
   Rules & Sovereignty Page Architecture
   ============================================================================== */
.apx-rules-page {
    background: var(--apx-bg-base);
    min-height: 80vh;
}

.apx-rule-card {
    background: var(--apx-bg-surface);
    border: 1px solid var(--apx-gold-border-subtle);
    border-radius: var(--apx-radius-md);
    overflow: hidden;
    box-shadow: var(--apx-shadow-card);
    transition: var(--apx-transition);
}

.apx-rule-card:hover {
    border-color: var(--apx-gold-border);
}

.apx-rule-card-header {
    background: var(--apx-bg-surface-raised);
    border-bottom: 1px solid var(--apx-gold-border-subtle);
    padding: 1.35rem 1.75rem;
}

.apx-rule-icon-box {
    width: 48px;
    height: 48px;
    background: rgba(201, 164, 92, 0.12);
    border: 1px solid var(--apx-gold-border);
    border-radius: var(--apx-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.apx-rule-pillar-tag {
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    color: var(--apx-gold-light);
    text-transform: uppercase;
}

.apx-rule-pillar-title {
    font-family: 'Cinzel', Georgia, serif;
    font-size: 1.35rem;
    color: #ffffff;
    font-weight: 800;
}

.apx-rule-card-body {
    padding: 2rem;
}

.apx-rule-item {
    padding-bottom: 1.75rem;
    margin-bottom: 1.75rem;
    border-bottom: 1px solid var(--apx-border);
}

.apx-rule-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
}

.apx-rule-item-title {
    font-size: 1.12rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.4;
}

.apx-rule-item-desc {
    color: var(--apx-text-sub);
    font-size: 0.96rem;
    line-height: 1.8;
    margin-bottom: 0.9rem;
}

.apx-prevention-box {
    background: rgba(16, 185, 129, 0.07);
    border: 1px solid rgba(16, 185, 129, 0.28);
    border-left: 4px solid var(--apx-emerald);
    border-radius: var(--apx-radius-xs);
    padding: 0.95rem 1.25rem;
    margin-top: 0.85rem;
}

.apx-prevention-header {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    color: var(--apx-emerald-light);
    margin-bottom: 0.35rem;
    text-transform: uppercase;
    display: flex;
    align-items: center;
}

.apx-prevention-text {
    font-size: 0.9rem;
    color: #cbd5e1;
    line-height: 1.65;
}

.apx-prevention-text code {
    background: rgba(16, 185, 129, 0.18);
    color: #6ee7b7;
    padding: 0.15rem 0.4rem;
    border-radius: 3px;
    font-size: 0.84rem;
    font-family: monospace;
}

.apx-sanction-table {
    border-collapse: separate;
    border-spacing: 0;
}

.apx-sanction-table th {
    background: var(--apx-bg-surface-raised) !important;
    color: var(--apx-gold-light) !important;
    font-family: 'Cinzel', Georgia, serif;
    font-size: 0.92rem;
    padding: 1.1rem 1.5rem !important;
    border-bottom: 2px solid var(--apx-gold-border) !important;
    letter-spacing: 0.05em;
}

.apx-sanction-table td {
    padding: 1.1rem 1.5rem !important;
    border-bottom: 1px solid var(--apx-border) !important;
    color: var(--apx-text-sub) !important;
    font-size: 0.94rem;
    vertical-align: middle;
}

.apx-sanction-table tr:last-child td {
    border-bottom: none !important;
}

/* ==============================================================================
   Vote & Legal Architecture (Apexsions Sovereign Layout)
   ============================================================================== */
.apx-vote-card {
    background: var(--apx-bg-deep);
    border: 1px solid var(--apx-gold-border-subtle);
    border-radius: var(--apx-radius-md);
    padding: 1.75rem;
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.apx-vote-card:hover {
    transform: translateY(-4px);
    border-color: var(--apx-gold-border);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6), 0 0 20px rgba(245, 158, 11, 0.1);
}

.apx-vote-number {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--apx-text-dim);
    letter-spacing: 0.1em;
}

.apx-badge-cooldown {
    background: rgba(255, 255, 255, 0.05);
    color: #94a3b8;
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.35rem 0.65rem;
    border-radius: var(--apx-radius-xs);
}

.apx-vote-icon-box {
    width: 48px;
    height: 48px;
    border-radius: var(--apx-radius-sm);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.apx-legal-card {
    background: var(--apx-bg-deep);
    border: 1px solid var(--apx-border);
    border-radius: var(--apx-radius-md);
    transition: border-color 0.2s ease;
}

.apx-legal-card:hover {
    border-color: var(--apx-gold-border-subtle);
}

.apx-legal-num {
    font-weight: 800;
    letter-spacing: 0.05em;
}

/* ==========================================================================
   Apexsions Language Accessibility Switcher (ID / EN)
   ========================================================================== */
.apx-lang-dropdown-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.apx-lang-btn {
    height: 38px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    padding: 0 0.75rem;
    border-radius: var(--apx-radius-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    box-sizing: border-box;
    flex-shrink: 0;
}

.apx-lang-btn:hover,
.apx-lang-btn:focus,
.apx-lang-btn[aria-expanded="true"] {
    background: rgba(201, 164, 92, 0.12);
    border-color: var(--apx-gold-border);
    color: var(--apx-text-main);
    box-shadow: 0 0 12px rgba(201, 164, 92, 0.25);
}

.apx-lang-menu {
    min-width: 195px;
    border-radius: var(--apx-radius-md);
    background: rgba(24, 26, 32, 0.98) !important;
    border: 1px solid var(--apx-gold-border-subtle) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.75) !important;
    padding: 0.4rem 0;
}

.apx-lang-choice {
    font-size: 0.84rem;
    font-weight: 500;
    color: var(--apx-text-sub);
    transition: all 0.15s ease;
    border: none;
    background: transparent;
    width: 100%;
    padding: 0.5rem 1rem;
    cursor: pointer;
}

.apx-lang-choice:hover,
.apx-lang-choice.active {
    background: rgba(201, 164, 92, 0.12);
    color: var(--apx-text-main);
}

.apx-lang-code-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 26px;
    height: 19px;
    padding: 0 5px;
    font-size: 0.70rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--apx-gold-light);
    background: rgba(201, 164, 92, 0.12);
    border: 1px solid var(--apx-gold-border);
    border-radius: 4px;
    line-height: 1;
    transition: all 0.2s ease;
}

.apx-lang-choice:hover .apx-lang-code-pill,
.apx-lang-choice.active .apx-lang-code-pill {
    background: rgba(201, 164, 92, 0.25);
    border-color: var(--apx-gold);
    color: #fff;
}

.apx-lang-current-label {
    font-size: 0.76rem;
    letter-spacing: 0.06em;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

/* ==========================================================================
   RANK MATRIX, PASS TIERS, AND BENEFIT HIGHLIGHTS
   ========================================================================== */
.apx-package-card.apx-pkg-sio-pass {
    border-color: rgba(245, 158, 11, 0.55);
    background: linear-gradient(180deg, rgba(38, 26, 12, 0.9) 0%, var(--apx-bg-surface) 100%);
    box-shadow: 0 8px 24px -4px rgba(245, 158, 11, 0.2);
}

.apx-package-card.apx-pkg-sio-pass:hover {
    border-color: #fbbf24;
    box-shadow: 0 20px 42px -6px rgba(245, 158, 11, 0.4);
    transform: translateY(-5px);
}

.apx-package-card.apx-pkg-exsio-pass {
    border-color: rgba(168, 85, 247, 0.65);
    background: linear-gradient(180deg, rgba(34, 14, 52, 0.9) 0%, var(--apx-bg-surface) 100%);
    box-shadow: 0 8px 28px -4px rgba(168, 85, 247, 0.3);
}

.apx-package-card.apx-pkg-exsio-pass:hover {
    border-color: #d8b4fe;
    box-shadow: 0 22px 46px -6px rgba(168, 85, 247, 0.55);
    transform: translateY(-5px);
}

.apx-rank-badge-overlay {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 38px;
    height: 38px;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.7));
    z-index: 2;
    transition: transform 0.25s ease;
}

.apx-package-card:hover .apx-rank-badge-overlay {
    transform: scale(1.12) rotate(4deg);
}

.apx-badge-trial {
    background: rgba(14, 165, 233, 0.2) !important;
    color: #7dd3fc !important;
    border: 1px solid rgba(56, 189, 248, 0.45) !important;
}

.apx-badge-perm {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.25) 0%, rgba(217, 119, 6, 0.15) 100%) !important;
    color: #fde047 !important;
    border: 1px solid rgba(250, 204, 21, 0.6) !important;
    box-shadow: 0 0 10px rgba(234, 179, 8, 0.2);
}

.apx-discount-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.65rem;
    border-radius: var(--apx-radius-xs);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    background: rgba(34, 197, 94, 0.16);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.4);
}

/* Rank Comparison Matrix Table */
.apx-rank-matrix-wrap {
    background: var(--apx-bg-surface);
    border: 1px solid var(--apx-gold-border-subtle);
    border-radius: var(--apx-radius-lg);
    box-shadow: var(--apx-shadow-elevated);
    overflow: hidden;
}

.apx-rank-matrix-header {
    background: linear-gradient(90deg, rgba(24, 28, 42, 0.95) 0%, rgba(15, 18, 28, 0.98) 100%);
    border-bottom: 1px solid var(--apx-gold-border);
    padding: 1.5rem 1.75rem;
}

.apx-rank-matrix-table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.apx-rank-matrix-table {
    width: 100%;
    min-width: 820px;
    border-collapse: separate;
    border-spacing: 0;
    margin: 0;
    font-size: 0.86rem;
}

.apx-rank-matrix-table th,
.apx-rank-matrix-table td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    vertical-align: middle;
    text-align: center;
}

.apx-rank-matrix-table th:first-child,
.apx-rank-matrix-table td:first-child {
    text-align: left;
    position: sticky;
    left: 0;
    background: #0f1422;
    z-index: 2;
    font-weight: 600;
    color: #f1f5f9;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.apx-rank-matrix-table thead th {
    background: #141a2e;
    color: #cbd5e1;
    font-family: 'Cinzel', Georgia, serif;
    font-size: 0.88rem;
    letter-spacing: 0.04em;
    font-weight: 700;
    border-bottom: 2px solid var(--apx-gold-border);
}

.apx-rank-matrix-table thead th.col-sions {
    background: linear-gradient(180deg, rgba(234, 179, 8, 0.2) 0%, #171d33 100%);
    color: #fde047;
    border-bottom-color: #fde047;
}

.apx-rank-matrix-table tbody tr:hover td {
    background-color: rgba(255, 255, 255, 0.03);
}

.apx-rank-matrix-table td.col-sions {
    background-color: rgba(234, 179, 8, 0.04);
}

.apx-matrix-val-gold {
    color: #fbbf24;
    font-weight: 700;
}

.apx-matrix-val-check {
    color: #4ade80;
    font-size: 1.1rem;
}

.apx-matrix-val-cross {
    color: #64748b;
    font-size: 0.9rem;
}


/* ==============================================================================
   APEXSIONS WEBSTORE RANK UI/UX OVERHAUL (ZERO-COLLISION DESIGN SYSTEM)
   ============================================================================== */

/* Duration & Rank Filter Bar */
.apx-rank-filter-bar {
    background: var(--apx-bg-surface);
    border: 1px solid var(--apx-gold-border-subtle);
    border-radius: var(--apx-radius-md);
    box-shadow: var(--apx-shadow-card);
    transition: var(--apx-transition);
}

.apx-filter-btn {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--apx-text-sub);
    padding: 0.42rem 0.95rem;
    border-radius: var(--apx-radius-xs);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    text-decoration: none;
}

.apx-filter-btn:hover {
    background: rgba(245, 158, 11, 0.12);
    border-color: var(--apx-gold);
    color: #ffffff;
    transform: translateY(-1px);
}

.apx-filter-btn.active {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.3) 0%, rgba(20, 28, 46, 0.95) 100%);
    border-color: var(--apx-gold);
    color: var(--apx-gold-light);
    font-weight: 700;
    box-shadow: 0 2px 10px rgba(245, 158, 11, 0.25);
}

.apx-filter-btn.apx-filter-perm.active {
    background: linear-gradient(135deg, rgba(234, 179, 8, 0.35) 0%, rgba(30, 24, 10, 0.95) 100%);
    border-color: #fde047;
    color: #fde047;
}

.apx-filter-btn.apx-rank-btn-ascendant.active {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.3) 0%, rgba(15, 23, 42, 0.95) 100%);
    border-color: #4ade80;
    color: #4ade80;
    box-shadow: 0 2px 10px rgba(34, 197, 94, 0.25);
}

.apx-filter-btn.apx-rank-btn-archon.active {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.3) 0%, rgba(15, 23, 42, 0.95) 100%);
    border-color: #22d3ee;
    color: #22d3ee;
    box-shadow: 0 2px 10px rgba(6, 182, 212, 0.25);
}

.apx-filter-btn.apx-rank-btn-sovereign.active {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.3) 0%, rgba(15, 23, 42, 0.95) 100%);
    border-color: #60a5fa;
    color: #60a5fa;
    box-shadow: 0 2px 10px rgba(59, 130, 246, 0.25);
}

.apx-filter-btn.apx-rank-btn-emperor.active {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.3) 0%, rgba(15, 23, 42, 0.95) 100%);
    border-color: #f87171;
    color: #f87171;
    box-shadow: 0 2px 10px rgba(239, 68, 68, 0.25);
}

.apx-filter-btn.apx-rank-btn-sions.active {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.4) 0%, rgba(168, 85, 247, 0.3) 50%, rgba(15, 23, 42, 0.95) 100%);
    border-color: #fbbf24;
    color: #fef08a;
    box-shadow: 0 2px 14px rgba(245, 158, 11, 0.35);
}

/* Zero-Collision Header & Flexbox Top Bar */
.apx-package-image-wrap {
    position: relative;
    height: 125px;
    overflow: hidden;
    background: #0b0f19;
    border-bottom: 1px solid var(--apx-border);
    border-radius: var(--apx-radius-lg) var(--apx-radius-lg) 0 0;
    padding: 0 !important;
}

.apx-package-image-wrap .apx-package-image {
    width: 100%;
    height: 100%;
    max-height: 125px !important;
    object-fit: cover !important;
    object-position: center;
    transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
    opacity: 0.72;
}

.apx-package-card:hover .apx-package-image-wrap .apx-package-image {
    transform: scale(1.08);
    opacity: 0.9;
}

.apx-package-image-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.95) 0%, rgba(15, 23, 42, 0.35) 50%, rgba(15, 23, 42, 0.7) 100%);
    pointer-events: none;
}

.apx-package-top-bar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 0.65rem 0.85rem !important;
    z-index: 3;
    pointer-events: none;
}

.apx-package-top-bar > * {
    pointer-events: auto;
}

.apx-rank-crest-icon {
    width: 32px;
    height: 32px;
    object-fit: contain;
    filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.85));
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.75);
    padding: 2px;
    border: 1px solid rgba(245, 158, 11, 0.35);
    transition: transform 0.25s ease;
}

.apx-package-card:hover .apx-rank-crest-icon {
    transform: scale(1.1) rotate(5deg);
    border-color: var(--apx-gold);
}

.apx-rank-tier-tag {
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.9);
}

.apx-package-badge {
    position: static !important;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.68rem !important;
    font-weight: 800 !important;
    letter-spacing: 0.06em !important;
    padding: 0.25rem 0.65rem !important;
    border-radius: var(--apx-radius-xs) !important;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.apx-badge-upgrade {
    background: linear-gradient(135deg, #8E2DE2 0%, #4A00E0 100%) !important;
    color: #ffffff !important;
    border: 1px solid #c084fc !important;
    box-shadow: 0 0 12px rgba(168, 85, 247, 0.45) !important;
}

/* 2x2 Core Spec Micro Grid */
.apx-spec-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.4rem;
}

.apx-spec-pill {
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: var(--apx-radius-sm);
    padding: 0.35rem 0.55rem;
    font-size: 0.74rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: #cbd5e1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: all 0.2s ease;
}

.apx-spec-pill:hover {
    background: rgba(255, 255, 255, 0.065);
    border-color: rgba(245, 158, 11, 0.3);
    color: #ffffff;
}

.apx-spec-pill i {
    font-size: 0.85rem;
    flex-shrink: 0;
}

.apx-spec-pill strong {
    color: #f1f5f9;
}

/* Card Body Typography & Spacing */
.apx-package-title {
    font-size: 1.15rem !important;
    line-height: 1.3 !important;
    margin-bottom: 0.2rem !important;
    font-weight: 800 !important;
}

.apx-package-price-wrap {
    margin-bottom: 0.75rem !important;
}

.apx-package-price {
    font-size: 1.45rem !important;
}

.apx-package-price-del {
    font-size: 0.85rem !important;
}

.apx-discount-chip {
    font-size: 0.68rem !important;
    padding: 0.15rem 0.55rem !important;
    border-radius: var(--apx-radius-xs) !important;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

/* Package Perks List */
.apx-package-perks {
    font-size: 0.8rem !important;
    line-height: 1.65 !important;
    margin-bottom: 1rem !important;
}

.apx-package-perks li {
    gap: 0.45rem !important;
    margin-bottom: 0.28rem !important;
    word-break: break-word;
}

.apx-package-perks li i {
    font-size: 0.88rem !important;
    margin-top: 0.15rem !important;
}

/* Button & Action Polish */
.apx-btn-glow {
    box-shadow: 0 2px 10px rgba(234, 179, 8, 0.22);
    transition: all 0.2s ease;
}

.apx-btn-glow:hover {
    box-shadow: 0 4px 14px rgba(234, 179, 8, 0.35);
    transform: translateY(-1px);
}

.apx-matrix-jump-btn {
    font-weight: 600;
    transition: color 0.2s ease;
}

.apx-matrix-jump-btn:hover {
    color: var(--apx-gold-light) !important;
    text-decoration: underline !important;
}

/* ==============================================================================
   Sticky Horizon Quick-Dock (Floating Navigation)
   ============================================================================== */
.apx-horizon-dock {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    z-index: 1040;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.35s ease;
    opacity: 0;
    pointer-events: none;
}

.apx-horizon-dock.is-visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.apx-dock-container {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    background: rgba(10, 14, 22, 0.94);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(201, 164, 92, 0.35);
    border-radius: var(--apx-radius-sm);
    padding: 0.35rem 0.5rem;
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.85);
}

.apx-dock-item {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 0.85rem;
    border-radius: var(--apx-radius-xs);
    color: var(--apx-text-muted);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.apx-dock-item:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.06);
}

.apx-dock-item.active {
    background: rgba(201, 164, 92, 0.18);
    color: var(--apx-gold-light);
    border: 1px solid var(--apx-gold-border);
}

.apx-dock-icon {
    font-size: 0.9rem;
}

@media (max-width: 576px) {
    .apx-horizon-dock {
        bottom: 16px;
        width: calc(100% - 24px);
        max-width: 380px;
    }
    .apx-dock-container {
        justify-content: space-around;
        width: 100%;
        padding: 0.25rem 0.35rem;
    }
    .apx-dock-item {
        padding: 0.4rem 0.55rem;
        font-size: 0.72rem;
        gap: 0.3rem;
    }
}

/* Light Theme Overrides for Altar, Caste Matrix & Horizon Dock */
[data-bs-theme="light"] .apx-altar-tabs-nav {
    background: rgba(238, 233, 222, 0.95);
    border-color: rgba(0, 0, 0, 0.1);
}
[data-bs-theme="light"] .apx-altar-tab-btn {
    color: #4b5563;
}
[data-bs-theme="light"] .apx-altar-tab-btn:hover {
    color: #111827;
    background: rgba(0, 0, 0, 0.04);
}
[data-bs-theme="light"] .apx-altar-tab-btn.active {
    background: #ffffff;
    border-color: #c9a45c;
    color: #111827;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}
[data-bs-theme="light"] .apx-altar-panel {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.1);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}
[data-bs-theme="light"] .apx-spec-chip {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.08);
    color: #1f2937;
}
[data-bs-theme="light"] .apx-altar-effects {
    background: rgba(245, 242, 235, 0.8);
    border-color: rgba(0, 0, 0, 0.08);
}
[data-bs-theme="light"] .apx-caste-matrix-tab {
    background: #f4efe6;
    border-color: rgba(0, 0, 0, 0.1);
    color: #4b5563;
}
[data-bs-theme="light"] .apx-caste-matrix-tab:hover {
    background: #ffffff;
    color: #111827;
}
[data-bs-theme="light"] .apx-caste-matrix-tab.active {
    background: #ffffff;
    border-color: #c9a45c;
    color: #111827;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}
[data-bs-theme="light"] .apx-caste-mini-card {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}
[data-bs-theme="light"] .apx-caste-mini-card:hover {
    border-color: #c9a45c;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}
[data-bs-theme="light"] .apx-dock-container {
    background: rgba(255, 255, 255, 0.95);
    border-color: #c9a45c;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}
[data-bs-theme="light"] .apx-dock-item {
    color: #4b5563;
}
[data-bs-theme="light"] .apx-dock-item:hover {
    color: #111827;
    background: rgba(0, 0, 0, 0.04);
}
[data-bs-theme="light"] .apx-dock-item.active {
    background: rgba(201, 164, 92, 0.15);
    color: #72552a;
    border-color: #c9a45c;
}

/* ==========================================================================
   Phase 2: Living Monolith Motion Engine & Micro-Interactions (Anti-Slop)
   ========================================================================== */

/* 1. Keyframes: Sheen, Breathing Aura, Beacon Pulse, Ripple */
@keyframes apx-sheen-sweep {
    0% {
        transform: translateX(-150%) skewX(-20deg);
    }
    100% {
        transform: translateX(250%) skewX(-20deg);
    }
}

@keyframes apx-crest-breathe {
    0%, 100% {
        filter: drop-shadow(0 0 10px rgba(201, 164, 92, 0.25));
    }
    50% {
        filter: drop-shadow(0 0 24px rgba(241, 213, 138, 0.55));
    }
}

@keyframes apx-beacon-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6);
    }
    70% {
        box-shadow: 0 0 0 8px rgba(16, 185, 129, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

@keyframes apx-ripple {
    0% {
        transform: scale(0);
        opacity: 0.75;
    }
    100% {
        transform: scale(3.5);
        opacity: 0;
    }
}

/* 2. Sheen Sweep on Sovereign & Gold Buttons */
.btn-apx-sovereign,
.btn-apx-gold,
.apx-sheen-target {
    position: relative;
    overflow: hidden;
}

.btn-apx-sovereign::after,
.btn-apx-gold::after,
.apx-sheen-target::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        105deg,
        transparent 35%,
        rgba(255, 255, 255, 0.25) 48%,
        rgba(255, 255, 255, 0.45) 50%,
        rgba(255, 255, 255, 0.25) 52%,
        transparent 65%
    );
    transform: translateX(-150%) skewX(-20deg);
    pointer-events: none;
    z-index: 2;
}

.btn-apx-sovereign:hover::after,
.btn-apx-gold:hover::after,
.apx-sheen-target:hover::after {
    animation: apx-sheen-sweep 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Ambient periodic sheen for key landing CTAs */
.btn-apx-sovereign.apx-sheen-periodic::after,
.apx-sheen-periodic::after {
    animation: apx-sheen-sweep 6s cubic-bezier(0.16, 1, 0.3, 1) infinite;
}

/* 3. Ambient Breathing Aura */
.apx-crest-breathe,
.apx-hero-brand-mark,
.apx-brand-crest {
    animation: apx-crest-breathe 6s ease-in-out infinite;
    will-change: filter;
}

.apx-beacon-live {
    animation: apx-beacon-pulse 2.2s infinite;
}

/* 4. Scroll Reveal & Staggered Cascades */
.apx-scroll-reveal {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1), transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}

.apx-scroll-reveal.is-revealed {
    opacity: 1;
    transform: translateY(0);
}

.apx-reveal-stagger-1 { transition-delay: 60ms; }
.apx-reveal-stagger-2 { transition-delay: 120ms; }
.apx-reveal-stagger-3 { transition-delay: 180ms; }
.apx-reveal-stagger-4 { transition-delay: 240ms; }
.apx-reveal-stagger-5 { transition-delay: 300ms; }
.apx-reveal-stagger-6 { transition-delay: 360ms; }

/* 5. 3D Perspective Tilt & Cursor Glare */
.apx-tilt-wrapper {
    perspective: 1000px;
}

.apx-tilt-card {
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.15s ease-out, box-shadow 0.25s ease;
    will-change: transform;
}

.apx-tilt-card:hover {
    box-shadow: 0 16px 36px -6px rgba(0, 0, 0, 0.85), 0 0 20px rgba(201, 164, 92, 0.12);
}

.apx-tilt-card .apx-card-glare {
    position: absolute;
    inset: 0;
    pointer-events: none;
    border-radius: inherit;
    background: radial-gradient(circle 180px at var(--glare-x, 50%) var(--glare-y, 50%), rgba(255, 255, 255, 0.12), transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 5;
}

.apx-tilt-card:hover .apx-card-glare {
    opacity: 1;
}

/* 6. Chiseled Monolithic Badges (Anti-Pill Architecture) */
.apx-badge-chiseled {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.32rem 0.75rem;
    border-radius: var(--apx-radius-xs);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    background: rgba(201, 164, 92, 0.12);
    border: 1px solid var(--apx-gold-border);
    color: var(--apx-gold-light);
}

.apx-badge-chiseled-success {
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.3);
    color: #34d399;
}

.apx-badge-chiseled-danger {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.3);
    color: #f87171;
}

.apx-badge-chiseled-warning {
    background: rgba(245, 158, 11, 0.12);
    border-color: rgba(245, 158, 11, 0.3);
    color: #fbbf24;
}

/* 7. Tactile Copy Ripple */
.apx-copyable,
.apx-btn-copy {
    position: relative;
    overflow: hidden;
}

.apx-ripple-effect {
    position: absolute;
    border-radius: 50%;
    background: rgba(241, 213, 138, 0.45);
    pointer-events: none;
    animation: apx-ripple 0.6s ease-out forwards;
    z-index: 10;
}

/* 8. WCAG AAA Strict Reduced Motion Override */
@media (prefers-reduced-motion: reduce) {
    .apx-scroll-reveal,
    .apx-scroll-reveal.is-revealed,
    .btn-apx-sovereign::after,
    .btn-apx-gold::after,
    .apx-sheen-target::after,
    .apx-crest-breathe,
    .apx-beacon-live,
    .apx-tilt-card,
    .apx-card-glare,
    .apx-ripple-effect,
    .apx-theme-btn.apx-theme-spinning i,
    ::view-transition-old(root),
    ::view-transition-new(root) {
        animation: none !important;
        transition: none !important;
        transform: none !important;
        opacity: 1 !important;
    }
}

/* ==========================================================================
   9. Apexsions Solar & Lunar Radial Wave Theme View Transition
   ========================================================================== */
::view-transition-old(root),
::view-transition-new(root) {
    animation: none;
    mix-blend-mode: normal;
}

::view-transition-old(root) {
    z-index: 1;
}

::view-transition-new(root) {
    z-index: 99999;
}

[data-theme-transition="active"]::view-transition-new(root) {
    animation: apx-radial-theme-reveal 0.46s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes apx-radial-theme-reveal {
    from {
        clip-path: circle(0px at var(--apx-theme-x, 50%) var(--apx-theme-y, 50%));
    }
    to {
        clip-path: circle(var(--apx-theme-radius, 150vmax) at var(--apx-theme-x, 50%) var(--apx-theme-y, 50%));
    }
}

/* Fallback Smooth Cross-Fade for Legacy Browsers */
body.apx-theme-transitioning,
body.apx-theme-transitioning *,
body.apx-theme-transitioning *::before,
body.apx-theme-transitioning *::after {
    transition: background-color 0.35s ease, color 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease !important;
    transition-delay: 0s !important;
}

/* Theme Toggle Button Micro-Interaction (360° Spring Spin & Scale) */
.apx-theme-btn {
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s ease, border-color 0.2s ease;
    overflow: hidden;
    position: relative;
}

.apx-theme-btn:active {
    transform: scale(0.9);
}

.apx-theme-btn.apx-theme-spinning i {
    animation: apx-theme-icon-spin 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes apx-theme-icon-spin {
    0% {
        transform: rotate(0deg) scale(0.65);
        opacity: 0.4;
    }
    50% {
        transform: rotate(180deg) scale(1.3);
        opacity: 1;
    }
    100% {
        transform: rotate(360deg) scale(1);
        opacity: 1;
    }
}
