/* ═══════════════════════════════════════════════════════
   COSMOS THEME — InstaPeep  (Full Redesign)
   Ported from cosmos-iter-b.html design.
   Loaded AFTER style.css and viewer.css to override.
   ═══════════════════════════════════════════════════════ */

/* ── Variable Overrides ── */
:root,
[data-theme="dark"] {
    --bg: #05050f;
    --card-bg: rgba(5, 5, 14, 0.978);
    --item-bg: rgba(255, 255, 255, 0.02);
    --item-hover: rgba(255, 255, 255, 0.032);
    --panel-bg: rgba(5, 5, 14, 0.95);
    --text-primary: #f0eef5;
    --text-secondary: #a09cb5;
    --text-tertiary: #5d5878;
    --text-on-accent: #fff;
    --text-on-dark: #fff;
    --border: rgba(255, 255, 255, 0.055);
    --border-light: rgba(255, 255, 255, 0.04);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 4px 24px rgba(0, 0, 0, 0.4);
    --accent-color: #FF006E;
    --accent-color-rgb: 255, 0, 110;
    --search-btn-bg: linear-gradient(135deg, #FF006E, #FF5C8A, #FFB347);
    --search-btn-color: #fff;
    --overlay-bg: rgba(0, 0, 0, 0.85);
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 16px;
    --radius-full: 9999px;
    --cosmos-solid: rgba(3, 4, 11, 0.985);
    --cosmos-solid-border: rgba(255, 255, 255, 0.04);
    --cosmos-gradient: linear-gradient(135deg, #FF006E, #FF5C8A, #FFB347);
    --cosmos-ring: conic-gradient(from 0deg, #FF006E, #FF5C8A, #FFB347, #FF5C8A, #FF006E);
    --cosmos-card-shadow: 0 20px 46px -30px rgba(0, 0, 0, 0.78), 0 12px 30px -18px rgba(0, 0, 0, 0.46), inset 0 1px 0 rgba(255, 255, 255, 0.03);
    --cosmos-soft-shadow: 0 16px 34px -26px rgba(0, 0, 0, 0.6), 0 8px 20px -14px rgba(0, 0, 0, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.025);
}

/* ── Base ── */
html {
    overflow-x: hidden; /* prevent horizontal scrollbar; clips at viewport edge not body edge */
}
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif !important;
    background: var(--bg) !important;
    color: var(--text-primary);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}


/* ═══════════ SPACE BACKGROUND ═══════════ */
.space-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.space-bg .nebula {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    contain: layout style paint;
}

.space-bg .nebula-1 { width: 650px; height: 650px; background: #FF006E; top: -20%; left: -12%; opacity: 0.18; }
.space-bg .nebula-2 { width: 500px; height: 500px; background: #FFB347; top: 40%; right: -18%; opacity: 0.14; }
.space-bg .nebula-3 { width: 450px; height: 450px; background: #FF5C8A; bottom: -15%; left: 25%; opacity: 0.16; }
.space-bg .nebula-4 { width: 300px; height: 300px; background: #d946ef; top: 10%; right: 20%; opacity: 0.10; }

/* Keyframes kept for theme-lab.css variants */
@keyframes cosmosDrift1 { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(20px, -30px); } }
@keyframes cosmosDrift2 { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(-30px, 20px); } }
@keyframes cosmosDrift3 { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(15px, -20px); } }

/* Stars (individual div elements) */
.star { position: absolute; border-radius: 50%; background: rgba(255, 220, 240, 0.6); transform: translate3d(0, 0, 0); }
.star-sm { width: 1px; height: 1px; }
.star-md { width: 2px; height: 2px; }
.star-lg { width: 3px; height: 3px; background: rgba(255, 180, 220, 0.8); }
@keyframes twinkle  {
    0%, 100% { opacity: 0.2; transform: translate3d(-4px, -2px, 0); }
    50% { opacity: 1; transform: translate3d(4px, 3px, 0); }
}
@keyframes twinkle2 {
    0%, 100% { opacity: 0.4; transform: translate3d(3px, 2px, 0); }
    50% { opacity: 0.8; transform: translate3d(-4px, -3px, 0); }
}

@media (prefers-reduced-motion: reduce) {
    .space-bg .nebula,
    .space-bg::before,
    .space-bg::after,
    .space-bg .star {
        animation: none !important;
        transition: none !important;
    }
}


/* ── Z-layering ── */
body > *:not(.space-bg):not(.theme-lab-toggle):not(.theme-lab-panel) {
    position: relative;
    z-index: 1;
}

main,
.container,
.lower-sections,
.site-footer {
    position: relative;
    z-index: 1;
}

.results:not(.hidden) {
    padding-top: 18px;
    padding-bottom: 24px;
}

.results.hidden {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}


/* ═══════════ PAGE SHELL ═══════════ */
.container {
    max-width: 1100px;
}


/* ═══════════ HIDE THEME TOGGLE ═══════════ */
.theme-slider,
.desktop-theme-toggle,
.mobile-theme-toggle {
    display: none !important;
}


/* ═══════════ HEADER — Glass Blur ═══════════ */
/* position: fixed + backdrop-filter on ::before so it doesn't create
   a containing block for the fixed-position mobile menu inside the header */
.site-header {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 100 !important;
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border-bottom: 1px solid var(--cosmos-solid-border) !important;
    box-shadow: none !important;
    transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
    will-change: transform;
}

/* Spacer to offset content below the fixed header */
body {
    padding-top: 57px !important;
}

.header-content {
    min-height: 56px;
}

.site-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(6, 6, 16, 0.85);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    z-index: -1;
    transform: translateZ(0);
}

@media (max-width: 768px) {
    .site-header {
        position: sticky !important;
        left: auto !important;
        right: auto !important;
        transform: none !important;
        will-change: auto !important;
    }

    body {
        padding-top: 0 !important;
    }
}

/* Logo: always show dark variant, slightly reduced visual weight */
[data-theme="dark"] .logo-light { display: none !important; }
[data-theme="dark"] .logo-dark  { display: block !important; opacity: 0.92; }

/* Nav links */
.nav-link { color: var(--text-secondary); }
.nav-link:hover, .nav-link.active { color: var(--text-primary); }

/* Dropdown */
.nav-dropdown-menu,
.dropdown-menu {
    background: var(--cosmos-solid) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}
.nav-dropdown-item:hover,
.dropdown-item:hover {
    background: rgba(255, 255, 255, 0.05) !important;
}


/* ═══════════ HERO CHIP (Badge above title) ═══════════ */
.badge,
.hero-chip {
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
    padding: 6px 16px !important;
    border-radius: var(--radius-full) !important;
    background: rgba(var(--accent-color-rgb), 0.12) !important;
    border: 1px solid rgba(var(--accent-color-rgb), 0.2) !important;
    color: var(--accent-color) !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    letter-spacing: 0.04em !important;
    text-transform: none !important;
    margin-bottom: 22px !important;
}

.badge svg,
.hero-chip svg {
    width: 13px;
    height: 13px;
    fill: currentColor;
    flex-shrink: 0;
}


/* ═══════════ HERO TITLE GRADIENT ═══════════ */
.hero-title .highlight,
.hero-title .grad {
    background: var(--cosmos-gradient) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
}

.hero-title {
    font-weight: 800 !important;
    line-height: 1.1 !important;
    letter-spacing: -0.04em !important;
}


/* ═══════════ HERO SUBTITLE ═══════════ */
.hero-section {
    max-width: 920px !important;
    padding-left: 24px !important;
    padding-right: 24px !important;
}

.hero-subtitle {
    color: #cbc8d9 !important;
    max-width: 620px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.65;
}

.search-container {
    max-width: 620px !important;
}


/* ═══════════ TRUST STATS (below search) ═══════════ */
.stats {
    display: flex !important;
    justify-content: center !important;
    gap: 36px !important;
    flex-wrap: wrap !important;
    margin-bottom: 48px !important;
}

.stat {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 6px !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    color: var(--text-secondary) !important;
    text-align: center;
}

.stat .stat-icon-wrap {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat .stat-icon-wrap svg {
    width: 15px;
    height: 15px;
    stroke: var(--accent-color);
    fill: none;
    stroke-width: 2;
}

/* Hide old inline stat-icon SVG when stat-icon-wrap exists */
.stat .stat-icon-wrap ~ .stat-icon {
    display: none !important;
}
.stat .stat-icon-wrap ~ span .stat-icon {
    display: none !important;
}

/* Also style standalone stat-icons for backward compat */
.stat > .stat-icon {
    width: 15px;
    height: 15px;
    stroke: var(--accent-color);
    color: var(--accent-color);
}


/* ═══════════ SEO BIO SECTION ═══════════ */
.seo-bio {
    max-width: 760px !important;
    margin: 0 auto 20px !important;
    padding: 0 24px !important;
    text-align: center !important;
}

.seo-content {
    max-width: 760px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    text-align: center !important;
}

.seo-bio p,
.seo-content p {
    font-size: 13.5px;
    color: var(--text-secondary);
    line-height: 1.75;
}

.seo-bio strong,
.seo-content strong {
    color: var(--text-primary);
    font-weight: 600;
}


/* ═══════════ SEARCH BOX ═══════════ */
[data-theme="dark"] .search-box,
[data-theme="dark"] .hero-section .search-box {
    background: rgba(4, 4, 14, 0.98) !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    border-radius: 14px !important;
    transition: all 0.3s;
}

[data-theme="dark"] .search-box:focus-within,
[data-theme="dark"] .hero-section .search-box:focus-within {
    border-color: rgba(var(--accent-color-rgb), 0.5) !important;
    box-shadow: 0 0 0 5px rgba(var(--accent-color-rgb), 0.08), 0 8px 40px rgba(var(--accent-color-rgb), 0.1) !important;
}

[data-theme="dark"] .search-btn,
[data-theme="dark"] .hero-section .search-btn {
    background: var(--cosmos-gradient) !important;
    border-radius: 10px !important;
    box-shadow: 0 4px 20px rgba(var(--accent-color-rgb), 0.3);
}

[data-theme="dark"] .search-btn:hover,
[data-theme="dark"] .hero-section .search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(var(--accent-color-rgb), 0.5) !important;
    opacity: 1 !important;
}


/* ═══════════ FEATURE CARDS (cosmos gradient icons) ═══════════ */
.features {
    max-width: 980px !important;
    margin: 0 auto 56px !important;
    padding: 0 24px !important;
    gap: 16px !important;
}

.feature {
    background: rgba(4, 4, 14, 0.95) !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    border-radius: var(--radius) !important;
    padding: 18px 14px !important;
    text-align: center !important;
    box-shadow: var(--cosmos-soft-shadow) !important;
    transition: all 0.25s;
}

.feature:hover {
    background: rgba(255, 255, 255, 0.06) !important;
    border-color: rgba(var(--accent-color-rgb), 0.2) !important;
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4) !important;
}

/* Feature icon — gradient background square wrapper */
.feature .feature-icon-wrap {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--cosmos-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    box-shadow: 0 4px 20px rgba(var(--accent-color-rgb), 0.35);
}

.feature .feature-icon-wrap svg {
    width: 18px;
    height: 18px;
    stroke: #fff;
    fill: none;
    stroke-width: 2;
}

/* When feature-icon-wrap exists, hide the old bare SVG */
.feature .feature-icon-wrap ~ .feature-icon {
    display: none !important;
}

/* Fallback: style old bare feature-icon SVGs with gradient box */
.feature > svg.feature-icon {
    width: 40px !important;
    height: 40px !important;
    margin: 0 auto 12px;
    padding: 11px;
    border-radius: 10px;
    background: var(--cosmos-gradient);
    box-shadow: 0 4px 20px rgba(var(--accent-color-rgb), 0.35);
    stroke: #fff !important;
    color: #fff !important;
    display: block;
}

.feature .feature-title {
    font-size: 13px !important;
    font-weight: 500 !important;
}

.feature .feature-text {
    font-size: 11.5px !important;
    color: var(--text-secondary) !important;
    line-height: 1.5;
}


/* ═══════════ STEPS ═══════════ */
.steps {
    max-width: 800px !important;
    margin: 0 auto 70px !important;
}

.step {
    background: rgba(8, 8, 20, 0.90) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    box-shadow: var(--cosmos-soft-shadow) !important;
}

.step-number {
    background: var(--accent-color) !important;
    color: #fff !important;
}

.steps-title {
    color: var(--text-primary) !important;
}


/* ═══════════ SEO SECTION (lower) ═══════════ */
.seo-section {
    max-width: 720px !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

.seo-section h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.seo-section p {
    font-size: 13.5px;
    color: var(--text-secondary);
    line-height: 1.75;
}


/* ═══════════ FAQ ═══════════ */
.faq {
    max-width: 720px !important;
}

.faq-title {
    color: var(--text-primary) !important;
}

.faq-item {
    border-bottom-color: rgba(255, 255, 255, 0.06) !important;
}


/* ═══════════ PROFILE CARD ═══════════ */
.profile-card {
    margin: 28px 0 12px !important;
    background: rgba(2, 3, 10, 0.986) !important;
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    box-shadow: var(--cosmos-card-shadow) !important;
}

.profile-pic-wrapper {
    width: 110px !important;
    height: 110px !important;
    background: transparent !important;
}

.profile-pic-ring {
    background: var(--cosmos-ring) !important;
    box-shadow: 0 0 28px rgba(var(--accent-color-rgb), 0.22);
}

.profile-pic {
    width: 102px !important;
    height: 102px !important;
    border: 4px solid var(--bg) !important;
}

.profile-stats .stat-value {
    color: #f7f4ff !important;
    text-shadow: 0 0 12px rgba(255, 255, 255, 0.04);
}

.profile-stats .stat-label {
    color: rgba(208, 203, 230, 0.86) !important;
}

.stat-label {
    text-transform: none !important;
}

.profile-action-btn {
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    background: var(--cosmos-solid) !important;
    color: var(--text-primary) !important;
}

.profile-action-btn:hover {
    border-color: rgba(var(--accent-color-rgb), 0.4) !important;
    background: rgba(var(--accent-color-rgb), 0.1) !important;
}


/* ═══════════ CONNECTIONS / TABS ═══════════ */
.connections-container {
    background: rgba(2, 3, 10, 0.986) !important;
    border: 1px solid rgba(255, 255, 255, 0.04) !important;
    border-radius: var(--radius-lg) !important;
    padding: 22px !important;
    box-shadow: var(--cosmos-soft-shadow) !important;
}

.tabs {
    background: rgba(1, 2, 7, 0.82) !important;
    border: 1px solid rgba(255, 255, 255, 0.04) !important;
    border-radius: var(--radius) !important;
    padding: 3px !important;
    gap: 0 !important;
}

.tab {
    flex: 1;
    text-align: center;
    border-radius: var(--radius-sm) !important;
    font-weight: 500;
    color: var(--text-tertiary);
    transition: all 0.15s;
}

.tab.active {
    background: rgba(255, 255, 255, 0.06) !important;
    color: #fff !important;
    font-weight: 600;
}

.tab-count {
    background: rgba(255, 255, 255, 0.04) !important;
    color: var(--text-tertiary) !important;
}

.tab.active .tab-count {
    background: rgba(var(--accent-color-rgb), 0.15) !important;
    color: var(--accent-color) !important;
}

/* Filter Bar */
.filter-bar {
    background: rgba(1, 2, 8, 0.62) !important;
    border: 1px solid rgba(255, 255, 255, 0.04) !important;
    border-radius: var(--radius-sm) !important;
}

.filter-input {
    color: var(--text-primary) !important;
    background: transparent !important;
}

.filter-input::placeholder {
    color: var(--text-tertiary) !important;
}


/* ═══════════ USER LIST ═══════════ */
.user-item {
    --user-item-bg: rgba(255, 255, 255, 0.028);
    --user-item-hover-bg: rgba(255, 255, 255, 0.09);
    --user-item-index-hover-bg: var(--border);
    --user-item-index-hover-color: var(--text-secondary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
    background: var(--user-item-bg) !important;
    border-radius: 10px !important;
    margin-bottom: 0;
    box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.02);
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.user-item:hover {
    background: var(--user-item-hover-bg) !important;
    border-bottom-color: rgba(255, 255, 255, 0.07) !important;
}

.user-item:last-child {
    border-bottom: none !important;
    box-shadow: none;
}

.load-more-btn {
    background: rgba(255, 255, 255, 0.03) !important;
    border: none !important;
    color: var(--accent-color) !important;
}

.load-more-btn:hover {
    background: rgba(var(--accent-color-rgb), 0.1) !important;
}

.action-btn {
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.04) !important;
    color: rgba(223, 219, 241, 0.88) !important;
}

.action-btn:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    color: #ffffff !important;
}


/* ═══════════ GENDER STATS ═══════════ */
.gender-stats {
    background: rgba(2, 2, 10, 0.5) !important;
    border-color: rgba(255, 255, 255, 0.04) !important;
    box-shadow: var(--cosmos-soft-shadow) !important;
}


/* ═══════════ PRIVATE MESSAGE ═══════════ */
.private-message {
    background: rgba(8, 8, 20, 0.90) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    box-shadow: var(--cosmos-soft-shadow) !important;
}


/* ═══════════ ERROR / LOADER ═══════════ */
.error-card {
    background: rgba(5, 6, 15, 0.96) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    box-shadow: var(--cosmos-soft-shadow) !important;
}

.loader-container {
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
}

.loader-avatar,
[data-theme="dark"] .loader-avatar {
    --loader-avatar-bg-1: #070811;
    --loader-avatar-bg-2: #1a2130;
    --loader-avatar-bg-3: #030409;
    --loader-avatar-highlight-2: rgba(135, 176, 255, 0.18) !important;
    --loader-avatar-highlight-3: rgba(228, 240, 255, 0.82) !important;
    --loader-avatar-top-glow: rgba(255, 255, 255, 0.1) !important;
    --loader-avatar-inner-shadow: rgba(1, 3, 10, 0.42) !important;
    --loader-avatar-border: rgba(255, 255, 255, 0.09) !important;
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.42), inset 0 0 0 1px rgba(255, 255, 255, 0.07), inset 0 -18px 24px rgba(1, 3, 10, 0.42) !important;
}

.loader-ring {
    inset: -6px;
    border-width: 3.5px !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    border-top-color: var(--accent-color) !important;
    box-shadow: 0 0 18px rgba(var(--accent-color-rgb), 0.32);
}

.loader-ring.done {
    border-top-color: #22c55e !important;
}

.loader-username {
    color: var(--text-primary) !important;
}

.loader-status {
    color: rgba(233, 229, 248, 0.92) !important;
}

.loader-dots span {
    background: rgba(233, 229, 248, 0.85) !important;
}

.panel-loading {
    color: rgba(233, 229, 248, 0.92) !important;
}

.mini-spinner {
    border-color: rgba(255, 255, 255, 0.14) !important;
    border-top-color: var(--accent-color) !important;
    box-shadow: 0 0 14px rgba(var(--accent-color-rgb), 0.24);
}

/* Shimmer for other avatar wrappers */
.avatar-wrapper,
[data-theme="dark"] .avatar-wrapper {
    background: linear-gradient(110deg, rgba(12, 12, 24, 1) 30%, rgba(40, 40, 60, 0.5) 50%, rgba(12, 12, 24, 1) 70%) !important;
    background-size: 200% 100% !important;
}

[data-theme="dark"] .media-item:not(.loaded),
.media-item:not(.loaded) {
    background: linear-gradient(110deg, rgba(12, 12, 24, 1) 30%, rgba(40, 40, 60, 0.5) 50%, rgba(12, 12, 24, 1) 70%) !important;
    background-size: 200% 100% !important;
}


/* ═══════════ FOOTER ═══════════ */
.site-footer {
    background: transparent !important;
    border-top: 1px solid rgba(255, 255, 255, 0.04) !important;
}


/* ═══════════ MOBILE MENU ═══════════ */
.mobile-menu {
    background: rgba(6, 6, 16, 0.98) !important;
    border-left: 1px solid rgba(255, 255, 255, 0.06) !important;
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.5) !important;
}

[data-theme="dark"] .mobile-menu {
    background: rgba(6, 6, 16, 0.98) !important;
    border-left: 1px solid rgba(255, 255, 255, 0.06) !important;
}

.mobile-menu-header {
    border-bottom-color: rgba(255, 255, 255, 0.06) !important;
}

.mobile-menu-close {
    background: rgba(255, 255, 255, 0.05) !important;
}

.mobile-menu-close:hover {
    background: rgba(255, 255, 255, 0.08) !important;
}

.mobile-menu-item:hover {
    background: rgba(255, 255, 255, 0.05) !important;
}

.mobile-menu-overlay.active {
    background: rgba(0, 0, 0, 0.6);
}


/* ═══════════ CONTENT TABS (Story Viewer page) ═══════════ */
.content-container {
    background: rgba(2, 3, 10, 0.986) !important;
    border: 1px solid rgba(255, 255, 255, 0.04) !important;
    border-radius: var(--radius-lg) !important;
    padding: 18px !important;
    box-shadow: var(--cosmos-soft-shadow) !important;
    overflow: visible !important;
}

.content-tabs {
    background: rgba(1, 2, 7, 0.82) !important;
    border-color: rgba(255, 255, 255, 0.04) !important;
    border-radius: var(--radius) !important;
    margin: 0 0 18px !important;
    padding: 3px !important;
    gap: 0 !important;
}

.content-tab { color: var(--text-tertiary); }
.content-tab:hover { color: var(--text-secondary); }
.content-tab.active {
    background: rgba(255, 255, 255, 0.07) !important;
    color: #fff !important;
}

.content-panel {
    padding: 18px 4px 4px !important;
}

.story-viewer {
    background: var(--cosmos-solid) !important;
}

.highlight-cover {
    background: var(--cosmos-solid) !important;
    border-color: var(--border) !important;
}

[data-theme="dark"] .highlight-cover {
    background: linear-gradient(110deg, rgba(12, 12, 24, 1) 30%, rgba(40, 40, 60, 0.5) 50%, rgba(12, 12, 24, 1) 70%) !important;
    background-size: 200% 100% !important;
}

.highlight-item.loaded .highlight-cover {
    background: var(--card-bg) !important;
    animation: none !important;
}

.modal-content { background: var(--card-bg) !important; }
.modal-info    { background: var(--card-bg) !important; }


/* ═══════════ LANDING SECTIONS (lower page) ═══════════ */
.steps {
    max-width: 1040px !important;
    padding: 0 24px !important;
}

.landing-section {
    max-width: 920px;
    margin: 60px auto;
    padding: 0 24px;
}

.landing-section--wide {
    max-width: 1080px;
}

.landing-section__title {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.landing-section__title--lg {
    font-size: 1.8rem;
    margin-bottom: 12px;
}

.landing-section__subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 32px;
    font-size: 0.95rem;
}

.landing-section__note {
    text-align: center;
    margin-top: 16px;
    font-size: 0.8rem;
    color: var(--text-tertiary);
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.card-grid--sm {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    text-align: center;
}

.info-card {
    background: var(--card-bg);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--cosmos-soft-shadow);
}

.info-card--compact {
    padding: 20px;
}

.info-card--body {
    background: var(--card-bg);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 28px;
    line-height: 1.7;
    box-shadow: var(--cosmos-soft-shadow);
}

.info-card__emoji {
    font-size: 2rem;
    margin-bottom: 8px;
}

.info-card__title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.info-card__text {
    font-size: 0.82rem;
    color: var(--text-secondary);
}

.info-card__heading {
    color: var(--text-primary);
    font-size: 1.05rem;
    margin-bottom: 10px;
}

.info-card__para {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.info-card__para:last-child {
    margin-bottom: 0;
}

.info-card__label {
    color: var(--text-primary);
    font-weight: 600;
}

/* Stars */
.star-rating {
    display: flex;
    gap: 4px;
    margin-bottom: 12px;
    color: #f59e0b;
}

/* Testimonials */
.testimonial__quote {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 16px;
}

.testimonial__author {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.85rem;
}

/* Stat bar */
.stat-bar {
    display: flex;
    justify-content: center;
    gap: 32px;
    flex-wrap: wrap;
    margin: 40px auto;
    max-width: 1040px;
    padding: 0 24px;
}

.stat-block {
    text-align: center;
}

.stat-block__value {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-block__label {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    display: block;
    margin-top: 2px;
}

/* Disclaimer */
.disclaimer-section {
    max-width: 920px;
    margin: 40px auto 20px;
    padding: 20px 24px;
    font-size: 0.85rem;
    color: var(--text-tertiary);
    line-height: 1.6;
    text-align: center;
    border-top: 1px solid var(--border-light);
}

.disclaimer-section a {
    color: var(--text-secondary);
}

/* Accent-colored links inside info cards, FAQ, and landing sections */
.info-card--body a,
.faq-a a,
.landing-section a:not(.footer-link) {
    color: var(--accent-color);
}


/* ═══════════ RESPONSIVE ═══════════ */
@media (max-width: 768px) {
    .space-bg .nebula { filter: blur(150px); }
    .space-bg .nebula-1 { width: 420px; height: 420px; top: -25%; left: -20%; opacity: 0.16; }
    .space-bg .nebula-2 { width: 320px; height: 320px; right: -25%; opacity: 0.12; }
    .space-bg .nebula-3 { width: 300px; height: 300px; bottom: -15%; left: 0%; opacity: 0.14; }
    .space-bg .nebula-4 { width: 220px; height: 220px; right: 5%; opacity: 0.08; }

    .results:not(.hidden) {
        padding-top: 14px;
        padding-bottom: 18px;
    }

    .profile-pic-wrapper { width: 90px !important; height: 90px !important; }
    .profile-pic { width: 82px !important; height: 82px !important; }

    .profile-card { margin-bottom: 14px !important; }

    .connections-container { padding: 16px !important; }

    .content-container {
        padding: 16px !important;
    }

    .content-tabs {
        margin-bottom: 16px !important;
    }

    .content-panel {
        padding: 14px 2px 2px !important;
    }

    .features { grid-template-columns: 1fr 1fr !important; padding: 0 20px !important; margin-bottom: 44px !important; }
    .stats { gap: 28px !important; margin-bottom: 32px !important; }

    .hero-title { font-size: 1.9rem !important; }
    .hero-subtitle { font-size: 0.92rem !important; margin-bottom: 28px !important; }
    .badge, .hero-chip { margin-bottom: 16px !important; }
}

@media (max-width: 480px) {
    .space-bg .nebula { filter: blur(170px); }
    .space-bg .nebula-1 { width: 320px; height: 320px; top: -30%; left: -25%; opacity: 0.12; }
    .space-bg .nebula-2 { width: 260px; height: 260px; right: -30%; opacity: 0.09; }
    .space-bg .nebula-3 { width: 240px; height: 240px; bottom: -20%; left: -5%; opacity: 0.10; }
    .space-bg .nebula-4 { width: 170px; height: 170px; right: 0%; opacity: 0.05; }

    .results:not(.hidden) {
        padding-top: 12px;
        padding-bottom: 16px;
    }

    .profile-pic-wrapper { width: 80px !important; height: 80px !important; }
    .profile-pic { width: 72px !important; height: 72px !important; }

    .profile-card { margin-bottom: 10px !important; }

    .connections-container { padding: 14px !important; }

    .content-container {
        padding: 14px !important;
    }

    .content-tabs {
        margin-bottom: 14px !important;
    }

    .content-panel {
        padding: 12px 0 0 !important;
    }

    .features { grid-template-columns: 1fr !important; padding: 0 16px !important; }
    .stats { gap: 24px !important; }

    .hero-title { font-size: 1.55rem !important; margin-bottom: 10px !important; }
    .badge, .hero-chip { margin-bottom: 14px !important; font-size: 10.5px !important; }
    .hero-subtitle { font-size: 0.88rem !important; }
}
