/* ===================================
   Modern Landing Page Styles
   =================================== */
/* Design tokens (colors, shadows, radii, fonts) live in css/base/variables.css */

/* Every page also links variables.css directly, so this import is normally a
   no-op. It exists for browsers still holding an HTML page cached from before
   the tokens were split out of this file: that markup only asks for
   styles.css, and without the tokens all 140-odd var(--…) rules collapse, so
   the page renders as black Times New Roman on white. Phones were hit hardest
   because you cannot force-reload on iOS the way ctrl+shift+R does on desktop.
   Importing here means a stale page still gets the tokens with its next
   styles.css fetch, without needing fresh HTML.
   Must stay above every rule: @import is only valid at the top of a file. */
@import url('base/variables.css');

/* ===================================
   Base Styles
   =================================== */

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

/* ── Icon system ─────────────────────────────────────────────────────────── */
.icon {
    width: 1em;
    height: 1em;
    display: inline-block;
    vertical-align: -0.13em;
    flex-shrink: 0;
    overflow: visible;
}
.icon-gem {
    width: 1.1em;
    height: 1.1em;
}

body {
    font-family: var(--font-secondary);
    color: var(--text-primary);
    background:
        radial-gradient(ellipse 900px 650px at 15% 40%, rgba(124, 108, 245, 0.07) 0%, transparent 70%),
        radial-gradient(ellipse 600px 500px at 88% 18%, rgba(248, 124, 179, 0.05) 0%, transparent 65%),
        radial-gradient(ellipse 500px 400px at 60% 85%, rgba(92, 200, 212, 0.05) 0%, transparent 60%),
        var(--bg-color);
    background-attachment: fixed;
    overflow-x: hidden;
    transform: translateZ(0); /* create a new stacking context to avoid repaint jitter */
    transition: background-color var(--transition-base), color var(--transition-base);
    width: 100%;
    max-width: 100vw;
}

[data-theme="dark"] body {
    background:
        radial-gradient(ellipse 900px 650px at 15% 40%, rgba(124, 108, 245, 0.18) 0%, transparent 70%),
        radial-gradient(ellipse 600px 500px at 88% 18%, rgba(248, 124, 179, 0.10) 0%, transparent 65%),
        radial-gradient(ellipse 400px 350px at 60% 85%, rgba(92, 200, 212, 0.08) 0%, transparent 60%),
        var(--bg-color);
    background-attachment: fixed;
}

/* When any modal is open, disable body transform and prevent background scrolling */
body.modal-open {
    transform: none !important;
    overflow: hidden;
}

/* When showing toast notifications, ensure fixed elements are anchored to viewport on mobile */
body.showing-notification {
    transform: none !important;
}

/* ===================================
   Floating Controls (no top bar)
   =================================== */

.floating-brand {
    position: fixed;
    top: 20px;
    left: 20px;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    z-index: 9999; /* ensure it stays above content */
    text-decoration: none;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(0, 0, 0, 0.06);
    backdrop-filter: blur(16px);
    padding: 0.5rem 0.75rem 0.5rem 0.5rem;
    border-radius: 999px;
    transition: none;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    transform: translateZ(0); /* lock to viewport to prevent scroll jitter */
}

.brand-logo {
    width: 44px;
    height: 44px;
    border-radius: 50%;
}

/* Logo theme switching */
.brand-logo.logo-dark {
    display: none;
}

[data-theme="dark"] .brand-logo.logo-light {
    display: none;
}

[data-theme="dark"] .brand-logo.logo-dark {
    display: block;
}

.brand-name {
    font-family: var(--font-primary);
    font-weight: 700;
    font-size: 1.05rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.floating-brand:hover { box-shadow: var(--shadow-lg); }

[data-theme="dark"] .floating-brand {
    background: rgba(20, 26, 32, 0.6);
    border-color: rgba(255, 255, 255, 0.06);
}

.floating-controls {
    position: fixed;
    top: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    z-index: 9999; /* ensure it stays above content */
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(0, 0, 0, 0.06);
    backdrop-filter: blur(16px);
    padding: 0.5rem 0.5rem 0.5rem 0.5rem;
    border-radius: 999px;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    transform: translateZ(0); /* lock to viewport to prevent scroll jitter */
    transition: none;
}

[data-theme="dark"] .floating-controls {
    background: rgba(20, 26, 32, 0.6);
    border-color: rgba(255, 255, 255, 0.06);
}

/* Ensure all floating control items have equal height */
.floating-controls .nav-btn,
.floating-controls .theme-toggle,
.floating-controls #online-status-btn {
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.floating-controls .nav-btn {
    padding: 0 1.25rem;
    white-space: nowrap;
}

.floating-controls .online-status-wrapper {
    display: flex;
    align-items: center;
}

/* Nav links group, flex on desktop, collapses to dropdown on mobile */
.floating-controls .nav-links {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Hamburger, hidden on desktop */
.hamburger-btn {
    display: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: none;
    background: transparent;
    color: var(--text-primary);
    font-size: 1.3rem;
    cursor: pointer;
    border-radius: 50%;
    transition: background 0.2s;
    flex-shrink: 0;
}

.hamburger-btn:hover {
    background: rgba(0,0,0,0.06);
}

[data-theme="dark"] .hamburger-btn:hover {
    background: rgba(255,255,255,0.08);
}

/* Floating control elements */
.theme-toggle {
    position: relative;
    width: 44px;
    height: 44px;
    border: none;
    background: rgba(251,191,36,0.12);
    color: #fbbf24;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-base);
}

[data-theme="dark"] .theme-toggle {
    background: rgba(167,139,250,0.12);
    color: #a78bfa;
}

.theme-toggle:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.toggle-icon { position: relative; width: 1.5rem; height: 1.5rem; }
.sun, .moon {
    position: absolute;
    top: 50%; left: 50%;
    display: flex; align-items: center; justify-content: center;
    transform: translate(-50%, -50%);
    transition: all var(--transition-base);
}
.sun i, .moon i { font-size: 1.25rem; color: inherit; }
.sun svg, .moon svg { width: 1.25rem; height: 1.25rem; }
.sun { opacity: 1; transform: translate(-50%, -50%) rotate(0deg); }
.moon { opacity: 0; transform: translate(-50%, -50%) rotate(-180deg); }
[data-theme="dark"] .sun { opacity: 0; transform: translate(-50%, -50%) rotate(180deg); }
[data-theme="dark"] .moon { opacity: 1; transform: translate(-50%, -50%) rotate(0deg); }

/* ── Phosphor glass icon containers ── */
.ph-glass {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-size: 1.4rem;
    flex-shrink: 0;
}
.ph-glass-purple { background: rgba(167,139,250,0.12); color: #a78bfa; }
.ph-glass-pink   { background: rgba(236,72,153,0.12);  color: #ec4899; }
.ph-glass-blue   { background: rgba(96,165,250,0.12);  color: #60a5fa; }
.ph-glass-green  { background: rgba(52,211,153,0.12);  color: #34d399; }
.ph-glass-amber  { background: rgba(251,191,36,0.12);  color: #fbbf24; }
.ph-glass-rose   { background: rgba(251,113,133,0.12); color: #fb7185; }
.ph-glass-sm  { width: 2rem;   height: 2rem;   font-size: 1rem;    border-radius: 8px; }
.ph-glass-md  { width: 2.75rem; height: 2.75rem; font-size: 1.3rem; border-radius: 10px; }
.ph-glass-lg  { width: 3.5rem; height: 3.5rem;  font-size: 1.7rem;  border-radius: 14px; }
.ph-glass-xl  { width: 4.5rem; height: 4.5rem;  font-size: 2.2rem;  border-radius: 16px; }

.nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-base);
    font-family: var(--font-primary);
    text-decoration: none;
    white-space: nowrap;
}

.nav-btn.secondary {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--gray-light);
}

.nav-btn.secondary:hover {
    background: var(--bg-secondary);
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.nav-btn.primary {
    position: relative;
    background: var(--gradient-primary);
    color: white;
    overflow: hidden;
}

.nav-btn.primary span { position: relative; z-index: 1; }
.btn-glow {
    position: absolute;
    top: 50%; left: 50%;
    width: 100%; height: 100%;
    background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, transparent 70%);
    transform: translate(-50%, -50%) scale(0);
    transition: transform var(--transition-base);
}
.nav-btn.primary:hover { transform: translateY(-3px); }
.nav-btn.primary:hover .btn-glow { transform: translate(-50%, -50%) scale(2); }

@media (max-width: 520px) {
    /* Avoid transforms to prevent any scroll jitter; keep fixed positions */
    .floating-brand { 
        position: fixed !important;
        left: 14px; 
        top: 14px; 
        transform: none;
        z-index: 9999 !important;
        -webkit-transform: translateZ(0);
        will-change: auto;
    }
    .floating-controls {
        position: fixed !important;
        top: 12px;
        right: 12px;
        left: auto;
        margin: 0;
        width: auto;
        justify-content: flex-end;
        flex-wrap: nowrap;
        transform: none;
        gap: 0.4rem;
        padding: 0.35rem;
        z-index: 9999 !important;
        -webkit-transform: translateZ(0);
        will-change: auto;
    }
    .brand-logo { width: 36px; height: 36px; }
    .brand-name { display: none; }
    .floating-controls .nav-btn {
        padding: 0.5rem 0.8rem;
        font-size: 0.9rem;
    }
    .floating-controls .theme-toggle {
        width: 40px;
        height: 40px;
    }
    /* Keep the language globe, hamburger and text buttons the same height as
       the shrunken theme toggle (the globe's 44px comes from i18n.js styles) */
    .floating-controls .lang-switcher__btn,
    .floating-controls .hamburger-btn {
        width: 40px !important;
        height: 40px !important;
    }
    .floating-controls .nav-btn,
    .floating-controls #online-status-btn {
        height: 40px;
    }
    /* Hamburger visible, nav-links collapse into dropdown */
    .hamburger-btn {
        display: inline-flex;
    }
    .floating-controls .nav-links {
        display: none;
        position: absolute;
        top: calc(100% + 10px);
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        padding: 8px;
        min-width: 160px;
        background: rgba(255, 255, 255, 0.96);
        border: 1px solid rgba(0, 0, 0, 0.08);
        border-radius: 16px;
        box-shadow: 0 8px 32px rgba(0,0,0,0.14);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        z-index: 10000;
    }
    [data-theme="dark"] .floating-controls .nav-links {
        background: rgba(20, 26, 32, 0.97);
        border-color: rgba(255,255,255,0.08);
    }
    .floating-controls .nav-links.open {
        display: flex;
    }
    .floating-controls .nav-links .nav-btn {
        width: 100%;
        justify-content: center;
        padding: 0.55rem 1rem;
    }
    /* Compact Chat link on small screens */
    .floating-controls a.nav-btn[href*="chat"] {
        padding: 0.5rem 0.6rem !important;
        font-size: 0.75rem !important;
    }
    /* Compact online status on small screens, show count only */
    .floating-controls .online-status-wrapper {
        display: flex !important;
    }
    .floating-controls #online-status-btn {
        padding: 0.4rem 0.5rem !important;
        font-size: 0.75rem !important;
        gap: 3px !important;
    }
    .floating-controls .dropdown-arrow {
        display: none;
    }
    /* GFM button on mobile, smaller, pinned bottom-right to avoid overlap */
    .page-gfm-footer {
        left: auto !important;
        right: 1rem !important;
        transform: none !important;
        bottom: 1rem !important;
    }
    .gofundme-btn {
        font-size: 0.78rem;
        padding: 0.4rem 0.7rem;
        gap: 0.3rem;
    }
}

@media (max-width: 380px) {
    .floating-brand { 
        position: fixed !important;
        left: 10px; 
        top: 10px; 
        padding: 0.35rem;
        z-index: 9999 !important;
    }
    .brand-logo { width: 32px; height: 32px; }
    .floating-controls {
        position: fixed !important;
        top: 10px;
        right: 10px;
        gap: 0.25rem;
        padding: 0.25rem;
        z-index: 9999 !important;
    }
    .floating-controls .nav-btn {
        padding: 0.4rem 0.6rem;
        font-size: 0.8rem;
    }
    .floating-controls .theme-toggle {
        width: 36px;
        height: 36px;
    }
    /* Same size for the language globe, hamburger and text buttons */
    .floating-controls .lang-switcher__btn,
    .floating-controls .hamburger-btn {
        width: 36px !important;
        height: 36px !important;
    }
    .floating-controls .nav-btn,
    .floating-controls #online-status-btn {
        height: 36px;
    }
    .toggle-icon { font-size: 1.2rem; }
    .floating-controls #online-status-btn {
        padding: 0.35rem 0.4rem !important;
        font-size: 0.7rem !important;
    }
    .gofundme-btn {
        font-size: 0.72rem;
        padding: 0.35rem 0.6rem;
    }
}

.toggle-icon {
    position: relative;
    width: 1.5rem;
    height: 1.5rem;
}

.sun, .moon {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 1.25rem;
    height: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translate(-50%, -50%);
    transition: all var(--transition-base);
}

.sun svg, .moon svg { width: 100%; height: 100%; }

.sun {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(0deg);
}

.moon {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(-180deg);
}

[data-theme="dark"] .sun {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(180deg);
}

[data-theme="dark"] .moon {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(0deg);
}

/* Inline SVG icons used by icons.js */
.icon-svg {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1em;
    height: 1em;
    vertical-align: middle;
}
.icon-svg svg { width: 100%; height: 100%; }

/* Nav Buttons */
.nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-base);
    font-family: var(--font-primary);
    text-decoration: none;
    white-space: nowrap;
}

.nav-btn.secondary {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--gray-light);
}

.nav-btn.secondary:hover {
    background: var(--bg-secondary);
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.nav-btn.primary {
    position: relative;
    background: var(--gradient-primary);
    color: white;
    overflow: hidden;
}

.nav-btn.primary span {
    position: relative;
    z-index: 1;
}

.btn-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
    transform: translate(-50%, -50%) scale(0);
    transition: transform var(--transition-base);
}

.nav-btn.primary:hover {
    transform: translateY(-3px);
}

.nav-btn.primary:hover .btn-glow {
    transform: translate(-50%, -50%) scale(2);
}

/* Mobile Menu Toggle */
/* remove mobile toggle since no nav */

/* ===================================
   Hero Section
   =================================== */

.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 40px 0 120px; /* extra bottom padding for wave */
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(ellipse 900px 650px at 15% 55%, rgba(124, 108, 245, 0.09) 0%, transparent 70%),
        radial-gradient(ellipse 600px 500px at 88% 18%, rgba(248, 124, 179, 0.07) 0%, transparent 65%),
        radial-gradient(ellipse 500px 400px at 60% 90%, rgba(92, 200, 212, 0.07) 0%, transparent 60%),
        linear-gradient(180deg, var(--bg-color) 0%, var(--bg-secondary) 100%);
    width: 100%;
    max-width: 100vw;
}

[data-theme="dark"] .hero-section {
    background:
        radial-gradient(ellipse 900px 650px at 15% 55%, rgba(124, 108, 245, 0.22) 0%, transparent 70%),
        radial-gradient(ellipse 600px 500px at 88% 18%, rgba(248, 124, 179, 0.13) 0%, transparent 65%),
        radial-gradient(ellipse 400px 350px at 60% 90%, rgba(92, 200, 212, 0.10) 0%, transparent 60%),
        var(--bg-color);
}


.hero-container {
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    box-sizing: border-box;
}

/* Hero Content */
.hero-content {
    animation: slideInLeft 1s ease;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
    opacity: 1;
        transform: translateX(0);
    }
}

/* ===================================
   Hero Atmosphere (water drops & orbs)
   =================================== */

.hero-atmosphere {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

/* Glowing atmospheric orbs */
.atmo-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(70px);
    opacity: 0.35;
    animation: orbDrift 18s ease-in-out infinite;
}

[data-theme="dark"] .atmo-orb {
    opacity: 0.5;
}

.atmo-orb.orb-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(124, 108, 245, 0.6), transparent 70%);
    top: -10%;
    left: -8%;
    animation-duration: 20s;
}

.atmo-orb.orb-2 {
    width: 380px;
    height: 380px;
    background: radial-gradient(circle, rgba(248, 124, 179, 0.5), transparent 70%);
    top: 40%;
    right: -5%;
    animation-duration: 16s;
    animation-delay: -6s;
}

.atmo-orb.orb-3 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(92, 200, 212, 0.45), transparent 70%);
    bottom: 10%;
    left: 40%;
    animation-duration: 22s;
    animation-delay: -11s;
}

@keyframes orbDrift {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33%       { transform: translate(30px, -20px) scale(1.05); }
    66%       { transform: translate(-20px, 25px) scale(0.96); }
}

/* Floating water drop shapes */
.atmo-drop {
    position: absolute;
    border-radius: 50% 50% 50% 50% / 65% 65% 35% 35%;
    opacity: 0;
    animation: dropFloat 12s ease-in-out infinite;
}

.atmo-drop.drop-1 {
    width: 14px; height: 18px;
    background: rgba(245, 200, 50, 0.65);
    top: 8%; left: 8%;
    animation-duration: 11s;
    animation-delay: 0s;
}

.atmo-drop.drop-2 {
    width: 10px; height: 13px;
    background: rgba(245, 200, 50, 0.7);
    top: 40%; left: 14%;
    animation-duration: 14s;
    animation-delay: -4s;
}

.atmo-drop.drop-3 {
    width: 18px; height: 23px;
    background: rgba(245, 200, 50, 0.55);
    top: 65%; right: 10%;
    animation-duration: 9s;
    animation-delay: -7s;
}

.atmo-drop.drop-4 {
    width: 8px; height: 11px;
    background: rgba(245, 200, 50, 0.7);
    top: 25%; right: 8%;
    animation-duration: 13s;
    animation-delay: -2s;
}

.atmo-drop.drop-5 {
    width: 12px; height: 16px;
    background: rgba(245, 200, 50, 0.6);
    top: 55%; left: 52%;
    animation-duration: 10s;
    animation-delay: -9s;
}

.atmo-drop.drop-6 {
    width: 9px; height: 12px;
    background: rgba(245, 200, 50, 0.65);
    top: 75%; left: 32%;
    animation-duration: 12s;
    animation-delay: -5s;
}

.atmo-drop.drop-7 {
    width: 15px; height: 20px;
    background: rgba(245, 200, 50, 0.5);
    top: 35%; left: 72%;
    animation-duration: 8s;
    animation-delay: -3s;
}

@keyframes dropFloat {
    0%   { opacity: 0; transform: translateY(0) scale(0.8); }
    15%  { opacity: 0.75; }
    85%  { opacity: 0.75; }
    100% { opacity: 0; transform: translateY(70px) scale(1.1); }
}

/* Ensure hero content sits above atmosphere */
.hero-container,
.hero-wave {
    position: relative;
    z-index: 1;
}

/* ===================================
   Hero Pill (community badge)
   =================================== */

.hero-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 1rem;
    background: rgba(124, 108, 245, 0.1);
    border: 1px solid rgba(124, 108, 245, 0.25);
    border-radius: 999px;
    color: var(--primary);
    font-size: 0.82rem;
    font-weight: 600;
    font-family: var(--font-primary);
    letter-spacing: 0.02em;
    margin-bottom: 1.25rem;
    animation: fadeInUp 0.6s ease 0.05s backwards;
    text-transform: lowercase;
}

.pill-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--primary);
    animation: pillPulse 2.5s ease-in-out infinite;
    flex-shrink: 0;
}

@keyframes pillPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50%       { transform: scale(1.5); opacity: 0.5; }
}

/* ===================================
   Hero Badge (legacy, keep styles)
   =================================== */

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(124, 108, 245, 0.1);
    border: 1px solid rgba(124, 108, 245, 0.2);
    border-radius: 50px;
    color: var(--primary);
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.badge-icon {
    animation: sparkle 1.5s infinite;
}

@keyframes sparkle {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.hero-title {
    font-family: var(--font-primary);
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.title-word {
    display: inline-block;
    animation: fadeInUp 0.8s ease backwards;
}

/* Force the rotating word onto its own line consistently */
.title-break {
    display: none;
}

@media (min-width: 0px) {
    .title-break { display: block; }
}

#hero-rotating-word {
    display: inline-block;
    min-width: 9ch; /* keep width stable across words */
}

.title-word:nth-child(1) {
    animation-delay: 0.1s;
}

.title-word:nth-child(2) {
    animation-delay: 0.2s;
}

.title-word:nth-child(3) {
    animation-delay: 0.3s;
}

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

.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
}

/* Rotating word animation */
.rotating-word-enter {
    opacity: 0;
    transform: translateY(20px);
}
.rotating-word-enter-active {
    opacity: 1;
    transform: translateY(0);
    transition: all 400ms ease;
}
.rotating-word-exit {
    opacity: 1;
    transform: translateY(0);
}
.rotating-word-exit-active {
    opacity: 0;
    transform: translateY(-20px);
    transition: all 300ms ease;
}

.hero-description {
    font-size: 1.25rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 2rem;
    animation: fadeIn 1s ease 0.5s backwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Hero Actions */
.hero-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 3rem;
    animation: fadeIn 1s ease 0.7s backwards;
}

.hero-btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all var(--transition-base);
    font-family: var(--font-primary);
}

.hero-btn.primary {
    background: var(--gradient-primary);
    color: white;
    position: relative;
    overflow: hidden;
}

.hero-btn.primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s ease;
}

.hero-btn.primary:hover::before {
    left: 100%;
}

.hero-btn.primary:hover {
    transform: translateY(-3px);
}

.btn-arrow {
    transition: transform var(--transition-base);
}

.hero-btn.primary:hover .btn-arrow {
    transform: translateX(5px);
}

.hero-btn.glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
}

.hero-btn.glass:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.play-icon {
    transition: transform var(--transition-base);
}

.hero-btn.glass:hover .play-icon {
    transform: scale(1.2);
}

/* Discord-styled hero button */
.hero-btn.discord {
    background: #5865F2;
    color: #fff;
    text-decoration: none;
}

.hero-btn.discord:hover {
    background: #4752c4;
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(88, 101, 242, 0.35);
}

/* Hero Stats */
.hero-stats {
    display: flex;
    gap: 2rem;
    animation: fadeIn 1s ease 0.9s backwards;
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.stat-number {
    font-size: 1.85rem;
    font-weight: 800;
    color: var(--primary);
    font-family: var(--font-primary);
    line-height: 1;
}

.stat-suffix {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--primary);
    font-family: var(--font-primary);
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.stat-divider {
    width: 1px;
    background: var(--gray-light);
}

/* Hero Visual */
.hero-visual {
    position: relative;
    animation: slideInRight 1s ease;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-visual::before {
    content: '';
    position: absolute;
    width: 70%;
    height: 70%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(124, 108, 245, 0.25) 0%, rgba(248, 124, 179, 0.12) 50%, transparent 70%);
    filter: blur(50px);
    z-index: 0;
    animation: orbDrift 15s ease-in-out infinite;
}

.hero-image {
    position: relative;
    z-index: 1;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Floating Cards */
.floating-card {
    background: var(--card-bg);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-xl);
    position: absolute;
    transition: all var(--transition-base);
}

.main-card {
    width: 400px;
    height: 300px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translate(-50%, -50%) translateY(0);
    }
    50% {
        transform: translate(-50%, -50%) translateY(-20px);
    }
}

.card-header {
    padding: 1rem;
    border-bottom: 1px solid var(--gray-light);
}

.card-dots {
    display: flex;
    gap: 0.5rem;
}

.card-dots span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--gray-light);
}

.card-dots span:nth-child(1) {
    background: #ff5f57;
}

.card-dots span:nth-child(2) {
    background: #ffbd2e;
}

.card-dots span:nth-child(3) {
    background: #28ca42;
}

.card-body {
    padding: 2rem;
    display: flex;
    align-items: flex-end;
    height: calc(100% - 50px);
}

.demo-chart {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
    width: 100%;
}

.chart-bar {
    flex: 1;
    background: var(--gradient-primary);
    border-radius: 8px 8px 0 0;
    height: var(--height);
    animation: growUp 1s ease backwards;
    animation-delay: calc(var(--index, 0) * 0.1s);
}

@keyframes growUp {
    from {
        height: 0;
    }
}

.chart-bar:nth-child(1) { --index: 1; }
.chart-bar:nth-child(2) { --index: 2; }
.chart-bar:nth-child(3) { --index: 3; }
.chart-bar:nth-child(4) { --index: 4; }
.chart-bar:nth-child(5) { --index: 5; }

/* Mini Cards */
.mini-card-1 {
    width: 200px;
    padding: 1rem;
    top: 20px;
    right: -50px;
    animation: slideIn 1s ease 0.3s backwards, floatMini 4s ease-in-out infinite;
}

.mini-card-2 {
    width: 200px;
    padding: 1rem;
    bottom: 20px;
    left: -50px;
    animation: slideIn 1s ease 0.5s backwards, floatMini 4s ease-in-out infinite 2s;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes floatMini {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.mini-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.mini-icon {
    font-size: 1.5rem;
}

.mini-text {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Orbit Animation */
.orbit-container {
    position: absolute;
    width: 500px;
    height: 500px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.orbit {
    width: 100%;
    height: 100%;
    border: 2px dashed rgba(124, 108, 245,0.2);
    border-radius: 50%;
    animation: rotate 20s linear infinite;
}

.orbit-dot {
    position: absolute;
    width: 20px;
    height: 20px;
    background: var(--gradient-primary);
    border-radius: 50%;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    box-shadow: 0 0 20px rgba(124, 108, 245,0.5);
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Hero Wave */
.hero-wave {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 120px;
    overflow: hidden;
    z-index: 1;
}

.hero-wave svg {
    width: 100%;
    height: 100%;
    display: block;
}

.hero-wave path {
    fill: var(--bg-color);
    animation: wave 12s ease-in-out infinite;
}

.hero-wave::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: var(--bg-color);
}


@keyframes wave {
    0% {
        d: path("M0,50 C150,20 350,80 600,60 C850,40 1050,70 1440,50 L1440,120 L0,120 Z");
    }
    50% {
        d: path("M0,60 C150,30 350,70 600,50 C850,30 1050,60 1440,40 L1440,120 L0,120 Z");
    }
    100% {
        d: path("M0,50 C150,20 350,80 600,60 C850,40 1050,70 1440,50 L1440,120 L0,120 Z");
    }
}

/* ===================================
   Features Section
   =================================== */

.features-section {
    padding: 80px 0 32px; /* closer to bottom while section still extends */
    background: linear-gradient(180deg, var(--bg-color) 0%, var(--bg-secondary) 100%);
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
    position: relative;
}

.features-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 700px 400px at 80% 30%, rgba(124, 108, 245, 0.05) 0%, transparent 70%);
    pointer-events: none;
}

.container {
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 0 2rem;
    box-sizing: border-box;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-label {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(124, 108, 245,0.1);
    color: var(--primary);
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.section-title {
    font-family: var(--font-primary);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.section-description {
    font-size: 1.25rem;
    color: var(--text-secondary);
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

@media (max-width: 768px) {
    .features-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

.feature-card {
    position: relative;
    background: var(--card-bg);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    transition: all var(--transition-base);
    border: 1px solid var(--gray-light);
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity var(--transition-base);
    z-index: -1;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-2xl);
    border-color: transparent;
}

.feature-card:hover::before {
    opacity: 0.05;
}

.feature-card.featured {
    background: var(--gradient-primary);
    color: white;
    transform: scale(1.05);
    box-shadow: var(--shadow-2xl);
}

.featured-badge {
    position: absolute;
    top: -10px;
    right: 20px;
    background: var(--accent);
    color: white;
    padding: 0.25rem 1rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.feature-icon {
    position: relative;
    width: 60px;
    height: 60px;
    margin-bottom: 1.5rem;
}

.icon-bg {
    position: absolute;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    opacity: 0.1;
    border-radius: var(--border-radius);
    animation: pulse 2s infinite;
}

.feature-icon svg {
    position: relative;
    width: 100%;
    height: 100%;
    color: var(--primary);
}

.featured .feature-icon svg {
    color: white;
}

.featured .icon-bg {
    background: white;
    opacity: 0.2;
}

.feature-title {
    font-family: var(--font-primary);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.feature-description {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

/* Visual snippets that mirror real tracker UI */
.feature-snippet {
    position: relative;
    border: 1px solid var(--gray-light);
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 0.75rem;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    margin-bottom: 1rem;
}

.snippet-sessions .session-row { 
    display: flex; justify-content: space-between; 
    padding: 0.4rem 0.6rem; 
    background: var(--card-bg); border: 1px solid var(--gray-light); 
    border-radius: 8px; margin-bottom: 0.5rem;
}
.snippet-sessions .type { font-weight: 700; }
.snippet-sessions .meta { color: var(--text-secondary); font-size: 0.85rem; }

.snippet-stats { display: flex; align-items: flex-end; height: 90px; gap: 8px; }
.snippet-stats .bar { width: 16%; background: var(--gradient-primary); height: var(--h); border-radius: 6px 6px 0 0; animation: growUp 1s ease; }

.snippet-play { display: grid; grid-template-columns: 1fr auto; gap: 0.6rem; align-items: center; }
.snippet-play .meter { width: 100%; height: 10px; background: #e9edf1; border-radius: 999px; position: relative; overflow: hidden; }
[data-theme="dark"] .snippet-play .meter { background: #2a2a2a; }
.snippet-play .fill { position: absolute; left: 0; top: 0; bottom: 0; width: var(--level); background: var(--gradient-primary); border-radius: 999px; transition: width 0.6s ease; }
.snippet-play .pill { padding: 0.3rem 0.6rem; border-radius: 999px; background: rgba(124, 108, 245,0.15); color: var(--primary); font-weight: 700; font-size: 0.85rem; border: 1px solid rgba(124,108,245,0.25); }
.snippet-play .drink-stack { display: flex; gap: 6px; grid-column: 1 / -1; }
.snippet-play .cup { width: 18px; height: 24px; border-radius: 4px; border: 2px solid var(--gray-light); position: relative; overflow: hidden; }
.snippet-play .cup::after { content: ''; position: absolute; left: 0; bottom: 0; width: 100%; height: var(--fill); background: #7fc4ff; }
[data-theme="dark"] .snippet-play .cup { border-color: #444; }

.snippet-anon { display: flex; justify-content: space-between; align-items: center; }
.snippet-anon .anon-badge { padding: 0.35rem 0.7rem; border-radius: 8px; background: rgba(255,255,255,0.1); border: 1px solid var(--gray-light); font-weight: 700; }
.snippet-anon .anon-hint { color: var(--text-secondary); font-size: 0.85rem; }

.snippet-friends { display: flex; gap: 8px; }
.snippet-friends .avatar-bubble { width: 32px; height: 32px; border-radius: 50%; background: var(--gradient-primary); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; box-shadow: var(--shadow-sm); }

/* Profile snippet */
.snippet-profile { display: grid; grid-template-columns: 42px 1fr; gap: 10px; align-items: start; }
.snippet-profile .p-avatar { width: 42px; height: 42px; border-radius: 50%; background: var(--gradient-primary); color: #fff; display:flex; align-items:center; justify-content:center; font-weight: 800; }
.snippet-profile .p-info { display: grid; gap: 4px; }
.snippet-profile .p-name { font-weight: 800; }
.snippet-profile .p-bio { font-size: 0.9rem; color: var(--text-secondary); }
.snippet-profile .p-links { display:flex; gap:6px; flex-wrap: wrap; }
.snippet-profile .p-link { font-size: 0.8rem; padding: 0.2rem 0.5rem; border-radius: 999px; background: rgba(124,108,245,0.15); color: var(--primary); border:1px solid rgba(124,108,245,0.25); }
.snippet-profile .p-link.private { background: rgba(0,0,0,0.06); color: var(--text-secondary); border-color: var(--gray-light); }

/* Drinks snippet */
.snippet-drinks { display: grid; gap: 8px; }
.snippet-drinks .drink-input { display: grid; grid-template-columns: 100px 1fr auto; gap: 8px; }
.snippet-drinks .drink-input .ml { padding: 0.4rem 0.6rem; border:1px solid var(--gray-light); border-radius: 8px; background: var(--card-bg); color: var(--text-primary); }
.snippet-drinks .drink-input .type { padding: 0.4rem 0.6rem; border:1px solid var(--gray-light); border-radius: 8px; background: var(--card-bg); color: var(--text-primary); }
.snippet-drinks .drink-input .add { padding: 0.4rem 0.8rem; border-radius: 8px; border:1px solid var(--gray-light); background: var(--bg-color); }
.snippet-drinks .drink-list { display: grid; gap: 6px; }
.snippet-drinks .drink-row { display:flex; justify-content: space-between; background: var(--card-bg); border:1px solid var(--gray-light); border-radius: 8px; padding: 0.35rem 0.6rem; }
.snippet-drinks .time { color: var(--text-secondary); font-size: 0.85rem; }
.snippet-drinks .quick-row { display:flex; gap:6px; }
.snippet-drinks .quick { padding: 0.3rem 0.6rem; border-radius: 999px; border:1px solid var(--gray-light); background: var(--bg-color); }

/* Challenge snippet */
.snippet-challenge { display: grid; gap: 8px; }
.snippet-challenge .challenge-header { display:flex; align-items:center; gap: 8px; }
.snippet-challenge .badge { padding: 0.2rem 0.5rem; border-radius: 999px; font-size: 0.75rem; border:1px solid var(--gray-light); }
.snippet-challenge .badge.pee { background: rgba(126, 214, 223, 0.2); color:#3aa; }
.snippet-challenge .badge.poop { background: rgba(255, 159, 67, 0.2); color:#b76b2d; }
.snippet-challenge .title { font-weight: 800; }
.snippet-challenge .reward { margin-left:auto; font-weight: 800; color: var(--primary); }
.snippet-challenge .challenge-controls { display:flex; align-items:center; gap: 8px; }
.snippet-challenge .diff { margin-left: auto; color: var(--text-secondary); font-size: 0.85rem; }
.snippet-challenge .timer { padding: 0.35rem 0.6rem; border-radius: 8px; border:1px solid var(--gray-light); background: var(--card-bg); font-family: 'Courier New', monospace; }
.snippet-challenge .start { padding: 0.35rem 0.8rem; border-radius: 8px; background: var(--gradient-primary); color:#fff; border:none; }

/* Currency snippet */
.snippet-currency { display: grid; gap: 8px; }
.snippet-currency .balance { font-weight: 800; display:flex; justify-content: space-between; }
.snippet-currency .amount { color: var(--primary); }
.snippet-currency .earn-row, .snippet-currency .shop-row { display:flex; align-items:center; gap: 8px; }
.snippet-currency .earn, .snippet-currency .buy { padding: 0.35rem 0.8rem; border-radius: 8px; border:1px solid var(--gray-light); background: var(--bg-color); }
.snippet-currency .hint { color: var(--text-secondary); font-size: 0.85rem; }

/* Friends add snippet */
.snippet-friends-add { display:grid; gap: 8px; }
.snippet-friends-add .search input { width:100%; padding: 0.4rem 0.6rem; border:1px solid var(--gray-light); border-radius: 8px; background: var(--card-bg); color: var(--text-primary); }
.snippet-friends-add .result { display:flex; align-items:center; gap: 8px; padding: 0.35rem 0.6rem; border:1px solid var(--gray-light); border-radius: 8px; background: var(--card-bg); }
.snippet-friends-add .result .avatar { width:24px; height:24px; border-radius:50%; background: var(--gradient-primary); color:#fff; display:flex; align-items:center; justify-content:center; font-weight:800; }
.snippet-friends-add .result .u { font-weight:700; }
.snippet-friends-add .result .req { margin-left:auto; padding: 0.3rem 0.6rem; border-radius: 999px; border:1px solid var(--gray-light); background: var(--bg-color); }

/* Holding timer snippet */
.snippet-holding { display:grid; gap: 8px; }

/* Permission snippet */
.snippet-permission { display:grid; gap:8px; }
.snippet-permission .perm-row { display:flex; align-items:center; gap: 8px; }
.snippet-permission .perm-row .request { padding: 0.35rem 0.8rem; border-radius: 8px; background: var(--bg-color); border:1px solid var(--gray-light); }
.snippet-permission .perm-row .request.pee { border-color: #4aa3df; }
.snippet-permission .perm-row .request.poop { border-color: #b76b2d; }
.snippet-permission .perm-row .chance { color: var(--text-secondary); font-size: 0.9rem; }
.snippet-permission .cooldown { display:grid; grid-template-columns: 1fr auto; gap:8px; align-items:center; }
.snippet-permission .cooldown-bar { height: 8px; border-radius: 999px; background: rgba(0,0,0,0.08); position: relative; overflow:hidden; }
[data-theme="dark"] .snippet-permission .cooldown-bar { background: #2a2a2a; }
.snippet-permission .cooldown-fill { position:absolute; left:0; top:0; bottom:0; width: var(--cool); background: var(--gradient-primary); }
.snippet-permission .cd-time { font-weight: 700; }

.featured .feature-description {
    color: rgba(255, 255, 255, 0.9);
}

.feature-tags {
    display: flex;
    gap: 0.5rem;
}

.tag {
    padding: 0.25rem 0.75rem;
    background: rgba(124, 108, 245,0.1);
    color: var(--primary);
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
}

.featured .tag {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

/* AOS-like animations */
[data-aos="fade-up"] {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

[data-aos="fade-up"].aos-animate {
    opacity: 1;
    transform: translateY(0);
}

/* ===================================
   Collage Showcase
   =================================== */

.collage-showcase {
    position: relative;
    margin-top: 2rem;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

.collage-wrap {
    position: relative;
    max-width: 1100px;
    width: 100%;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 20px;
    padding: 10px;
    box-sizing: border-box;
}

.collage-item {
    position: relative;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: var(--shadow-2xl);
    background: var(--card-bg);
    border: 1px solid var(--gray-light);
    transform: rotate(var(--rot, 0deg));
    transition: transform var(--transition-slow), box-shadow var(--transition-base);
}

.collage-item.large { grid-column: 1 / span 7; }
.collage-item.medium { grid-column: 8 / span 5; }

/* second medium shifts below on desktop */
.collage-item.medium:nth-of-type(3) { grid-column: 6 / span 7; grid-row: 2; }

.collage-item img {
    width: 100%;
    height: auto;
    display: block;
}

.collage-item figcaption {
    position: absolute;
    left: 16px;
    bottom: 16px;
    right: 16px;
    background: linear-gradient( to top, rgba(0,0,0,0.55), rgba(0,0,0,0.0) );
    color: #fff;
    padding: 16px;
    border-radius: 14px;
}

.collage-item h3 {
    font-family: var(--font-primary);
    font-size: 1.15rem;
    margin-bottom: 4px;
}

.collage-item p {
    font-size: 0.95rem;
    line-height: 1.4;
    color: rgba(255,255,255,0.9);
}

.tilt:hover {
    transform: rotate(0deg) translateY(-6px) scale(1.01);
    box-shadow: 0 28px 65px rgba(124,108,245,0.30);
}

.collage-decor.bubble-1,
.collage-decor.bubble-2 {
    position: absolute;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(124,108,245,0.25) 0%, transparent 70%);
    filter: blur(10px);
    z-index: -1;
}

.collage-decor.bubble-1 { top: -20px; left: -10px; }
.collage-decor.bubble-2 { bottom: -10px; right: 20px; }

.collage-decor.ring {
    position: absolute;
    width: 320px;
    height: 320px;
    border: 2px dashed rgba(124,108,245,0.3);
    border-radius: 50%;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: -1;
    animation: rotate 24s linear infinite;
}

@media (max-width: 1024px) {
    .collage-item.large { grid-column: 1 / -1; }
    .collage-item.medium { grid-column: 1 / -1; }
    .collage-item.medium:nth-of-type(3) { grid-column: 1 / -1; grid-row: auto; }
}

@media (max-width: 560px) {
    .collage-wrap { gap: 14px; }
    .collage-item figcaption { left: 12px; right: 12px; bottom: 12px; padding: 12px; }
    .collage-item h3 { font-size: 1.05rem; }
    .collage-item p { font-size: 0.9rem; }
}

/* ===================================
   CTA Section
   =================================== */

.cta-section {
    padding: 100px 0;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-color) 100%);
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(124, 108, 245,0.1) 0%, transparent 70%);
    top: -250px;
    right: -250px;
    animation: float 10s ease-in-out infinite;
}

.cta-content {
    text-align: center;
    margin-bottom: 3rem;
}

.cta-title {
    font-family: var(--font-primary);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    margin-bottom: 1rem;
}

.cta-description {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.cta-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.cta-btn {
    padding: 1rem 2.5rem;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    transition: all var(--transition-base);
    text-decoration: none;
    font-family: var(--font-primary);
}

.cta-btn.primary {
    background: var(--gradient-primary);
    color: white;
    position: relative;
    overflow: hidden;
}

.btn-shine {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: shine 3s infinite;
}

@keyframes shine {
    0% {
        left: -100%;
    }
    50%, 100% {
        left: 100%;
    }
}

.cta-btn.primary:hover {
    transform: translateY(-3px) scale(1.05);
}

.cta-btn.discord {
    background: #5865F2;
    color: white;
}

.cta-btn.discord:hover {
    background: #4752c4;
    transform: translateY(-3px);
    box-shadow: 0 20px 40px rgba(88, 101, 242, 0.4);
}

/* CTA Visual */
.cta-visual {
    position: relative;
    display: flex;
    justify-content: center;
    margin-top: 4rem;
}

.cta-image-wrapper {
    position: relative;
}

.cta-glow {
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(124, 108, 245,0.3) 0%, transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    filter: blur(60px);
    animation: pulse 3s infinite;
}

.cta-stats-card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-xl);
    display: flex;
    align-items: center;
    gap: 1rem;
    animation: float 4s ease-in-out infinite;
}

.stats-icon {
    font-size: 2rem;
}

.stats-content {
    display: flex;
    flex-direction: column;
}

.stats-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.stats-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* ===================================
   Footer
   =================================== */

/* Floating footer row */
.floating-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin: 64px auto 8px;
    flex-wrap: wrap;
}

.floating-footer .floating-credit {
    margin: 0;
}

/* Fixed bottom GoFundMe footer for inner pages */
.page-gfm-footer {
    position: fixed;
    bottom: 1.25rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 200;
}

/* On chat page the bottom center overlaps the message input, move to bottom-right */
.chat-page .page-gfm-footer {
    left: auto;
    right: 1.25rem;
    transform: none;
}

/* GoFundMe button */
.gofundme-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.9rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(0, 0, 0, 0.06);
    backdrop-filter: blur(14px);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    transition: background 0.2s, transform 0.15s;
}

.gofundme-btn:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateY(-1px);
}

.gofundme-btn .gfm-icon {
    color: #e05c5c;
    font-size: 1rem;
}

[data-theme="dark"] .gofundme-btn {
    background: rgba(20, 26, 32, 0.7);
    border-color: rgba(255, 255, 255, 0.06);
    color: var(--text-secondary);
}

[data-theme="dark"] .gofundme-btn:hover {
    background: rgba(30, 38, 46, 0.9);
}

/* Floating credit */
.floating-credit {
    position: static;
    bottom: auto;
    left: auto;
    transform: none;
    display: block;
    width: max-content;
    margin: 64px auto 8px; /* keep space above, minimal at bottom */
    padding: 0.5rem 0.9rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(0, 0, 0, 0.06);
    backdrop-filter: blur(14px);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
}

/* Age and terms confirmation. Used by the register form and by both anonymous
   entry modals (login page and dashboard), so it lives here rather than in
   login.css. Deliberately quieter than a .form-group label so it reads as a
   footnote to the form rather than another field. */
.form-consent {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    margin: -0.5rem 0 1.25rem;
    font-size: 0.8125rem;
    line-height: 1.4;
    text-align: left;
    color: var(--text-secondary);
    cursor: pointer;
}

/* The policy links open in a new tab so a half filled form is never lost. */
.form-consent a {
    color: var(--primary-color);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.form-consent a:hover {
    color: var(--primary-dark);
}

.form-consent input[type="checkbox"] {
    flex-shrink: 0;
    width: 1rem;
    height: 1rem;
    margin: 0.05rem 0 0;
    accent-color: var(--primary-color);
    cursor: pointer;
}

/* Legal links, same glass pill as .floating-credit / .gofundme-btn so it reads as
   part of the footer set. One pill holding both links rather than two more pills:
   it keeps the footer at three objects instead of four. Type matches the sibling
   pills exactly (size, weight and colour) so the row looks like one set. */
.legal-links {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    width: max-content;
    padding: 0.5rem 0.9rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(0, 0, 0, 0.06);
    backdrop-filter: blur(14px);
    box-shadow: var(--shadow-sm);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
}

.legal-links a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-fast);
}

.legal-links a:hover {
    color: var(--primary-color);
}

.legal-links .legal-sep {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.35;
}

[data-theme="dark"] .legal-links {
    background: rgba(20, 26, 32, 0.7);
    border-color: rgba(255, 255, 255, 0.06);
    color: var(--text-secondary);
}

[data-theme="dark"] .floating-credit {
    background: rgba(20, 26, 32, 0.7);
    border-color: rgba(255, 255, 255, 0.06);
    color: var(--text-secondary);
}

/* ===================================
   Modal Styles
   =================================== */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-container {
    background: var(--modal-bg);
    backdrop-filter: blur(20px);
    border-radius: var(--border-radius-xl);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-2xl);
    transform: scale(0.9) translateY(20px);
    transition: all var(--transition-spring);
    display: flex;
    flex-direction: column;
}

.modal-overlay.active .modal-container {
    transform: scale(1) translateY(0);
}

/* Scrollbar styling for modal */
.modal-container::-webkit-scrollbar {
    width: 10px;
}

.modal-container::-webkit-scrollbar-track {
    background: transparent;
}

.modal-container::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--primary, #7c6cf5) 0%, var(--accent, #f87cb3) 100%);
    border-radius: 999px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

.modal-container::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--accent, #f87cb3) 0%, var(--primary, #7c6cf5) 100%);
    background-clip: padding-box;
}

[data-theme="dark"] .modal-container::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #7a21db, #fc466b);
    border-color: rgba(0, 0, 0, 0.2);
    background-clip: padding-box;
}

.modal-header {
    padding: 2rem 2rem 1rem;
    border-bottom: 1px solid var(--gray-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-family: var(--font-primary);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-base);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.modal-close:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
    transform: rotate(90deg);
}

.modal-body {
    padding: 2rem;
}

.modal-description {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.input-group {
    margin-bottom: 1.5rem;
}

.modal-input {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--gray-light);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: all var(--transition-base);
    background: var(--bg-color);
    color: var(--text-primary);
}

.modal-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(124, 108, 245,0.1);
}

.input-hint {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.modal-footer {
    padding: 1rem 2rem 2rem;
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

.modal-btn {
    padding: 0.9rem 1.25rem;
    border: none;
    border-radius: 999px;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition-base);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    height: 48px;
    font-family: var(--font-primary);
}

.modal-btn.secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.modal-btn.secondary:hover {
    background: var(--gray-light);
}

.modal-btn.primary {
    background: var(--gradient-primary);
    color: white;
    position: relative;
    overflow: hidden;
}

.modal-btn.primary:hover {
    transform: translateY(-2px);
}

.modal-btn.primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.35), transparent);
    transition: left 0.6s ease;
}

.modal-btn.primary:hover::before { left: 100%; }

.modal-btn.secondary {
    background: transparent;
    border: 2px solid var(--gray-light);
}

.modal-btn.secondary:hover {
    background: var(--bg-secondary);
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* ===================================
   Responsive Design
   =================================== */

@media (max-width: 1024px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-content {
        margin-top: 2rem;
    }
    
    .hero-visual {
        display: flex;
        justify-content: center;
        margin-top: 2rem;
        max-width: 500px;
        margin-left: auto;
        margin-right: auto;
    }
    
    .hero-visual .hero-image {
        width: 100%;
        height: auto;
    }
    
    .hero-actions {
        justify-content: center;
    }
    
    .hero-stats {
        justify-content: center;
    }
    
    .features-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
}

@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }
    
    .nav-actions {
        display: none;
    }
    
    .mobile-toggle {
        display: flex;
    }
    
    .hero-content {
        margin-top: 3rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
        margin-top: 1rem;
    }
    
    .hero-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .hero-btn {
        width: 100%;
        justify-content: center;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .footer-links {
        grid-template-columns: 1fr;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
    }
    
    .cta-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .cta-btn {
        width: 100%;
        justify-content: center;
    }
    
    .hero-stats {
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    .stat-divider {
        display: none;
    }
    
    .hero-container {
        padding: 0 1rem;
    }
    
    .container {
        padding: 0 1rem;
    }
    
    .modal-container {
        width: 95%;
        max-height: 85vh;
        margin: 1rem;
    }
}

@media (max-width: 480px) {
    .hero-content {
        margin-top: 3.5rem;
    }
    
    .hero-title {
        font-size: 2rem;
        margin-top: 1.5rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .hero-visual {
        max-width: 400px;
    }
    
    .hero-btn {
        padding: 0.85rem 1.5rem;
        font-size: 1rem;
    }
    
    .hero-stats {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
    }
    
    .stat-item {
        text-align: center;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .section-description {
        font-size: 1rem;
    }
    
    .feature-card {
        padding: 1.25rem;
    }
    
    .cta-title {
        font-size: 1.5rem;
    }
    
    .cta-description {
        font-size: 1rem;
    }
    
    .modal-header {
        padding: 1.5rem 1.25rem 0.75rem;
    }
    
    .modal-body {
        padding: 1.25rem;
    }
    
    .modal-footer {
        padding: 0.75rem 1.25rem 1.25rem;
        flex-direction: column;
    }
    
    .modal-btn {
        width: 100%;
    }
}

@media (max-width: 360px) {
    .hero-content {
        margin-top: 4rem;
    }
    
    .hero-title {
        font-size: 1.75rem;
        margin-top: 2rem;
    }
    
    .hero-section {
        padding: 30px 0 80px;
    }
    
    .section-header {
        margin-bottom: 2rem;
    }
    
    .hero-visual {
        max-width: 320px;
    }
}

/* ===================================
   Utility Classes
   =================================== */

.text-center {
    text-align: center;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.hidden {
    display: none !important;
}

.visible {
    visibility: visible !important;
    opacity: 1 !important;
}

/* ===================================
   Online Status Dropdown
   =================================== */

.online-status-wrapper {
    position: relative;
    display: inline-block;
}

#online-status-btn {
    transition: all 0.2s ease;
}

#online-status-btn:hover {
    transform: translateY(-1px);
}

#online-status-btn .dropdown-arrow {
    font-size: 0.6rem;
    margin-left: 4px;
    transition: transform 0.2s ease;
    opacity: 0.7;
}

#online-status-btn.active .dropdown-arrow {
    transform: rotate(180deg);
}

.online-users-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 280px;
    max-width: 320px;
    max-height: 400px;
    background: #ffffff;
    border: 1px solid var(--gray-light);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    overflow: hidden;
}

[data-theme="dark"] .online-users-dropdown {
    background: #1e1935;
    border-color: rgba(255, 255, 255, 0.1);
}

.online-users-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.online-users-dropdown .dropdown-header {
    padding: 14px 16px;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-primary);
    border-bottom: 1px solid var(--gray-light);
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.online-users-dropdown .dropdown-header::before {
    content: '';
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    animation: pulse-online 2s ease-in-out infinite;
}

@keyframes pulse-online {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(0.9); }
}

.online-users-list {
    list-style: none;
    margin: 0;
    padding: 8px;
    max-height: 320px;
    overflow-y: auto;
}

.online-users-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 12px;
    transition: background 0.15s ease;
}

.online-users-list li:hover {
    background: var(--bg-secondary);
}

.online-users-list li a {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
    width: 100%;
}

.online-users-list .user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    flex-shrink: 0;
    overflow: hidden;
    position: relative;
}

.online-users-list .user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}


.online-users-list .user-info {
    flex: 1;
    min-width: 0;
}

.online-users-list .user-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.online-users-list .user-status {
    font-size: 0.8rem;
    color: #10b981;
    font-weight: 500;
}

.online-users-list .empty-state {
    text-align: center;
    padding: 24px 16px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.online-users-list .empty-state::before {
    content: '👀';
    display: block;
    font-size: 1.5rem;
    margin-bottom: 8px;
}

/* Scrollbar for dropdown */
.online-users-list::-webkit-scrollbar {
    width: 6px;
}

.online-users-list::-webkit-scrollbar-track {
    background: transparent;
}

.online-users-list::-webkit-scrollbar-thumb {
    background: var(--gray-light);
    border-radius: 999px;
}

.online-users-list::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* Mobile adjustments */
@media (max-width: 640px) {
    .online-users-dropdown {
        min-width: 260px;
        right: -20px;
    }
}