/* Modern Landing Page Styles */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg: linear-gradient(135deg, #03040a 0%, #05060f 100%);
    --surface: rgba(5,6,15,0.98);
    --text: #eef2ff;
    --muted: #9ca3af;
    --accent: #c084fc;
    --shadow: 0 10px 30px rgba(0,0,0,0.6);
    --border: rgba(255,255,255,0.06);
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
}

/* Loading Screen */
.loading-screen {
    position: fixed;
    inset: 0;
    background: linear-gradient(135deg, #03040a 0%, #05060f 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 1;
    animation: fadeOutLoading 0.6s ease-in 2.4s forwards;
}

.loading-spinner {
    text-align: center;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top: 3px solid rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    animation: spin 1.2s linear infinite;
    margin: 0 auto 20px;
}

.loading-spinner p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.1rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes fadeOutLoading {
    to {
        opacity: 0;
        visibility: hidden;
    }
}


.layout {
    display: grid;
    grid-template-columns: auto 1fr;
    min-height: 100vh;
}

.sidebar {
    width: 90px;
    background: rgba(5, 6, 15, 0.98);
    border-right: 1px solid rgba(255,255,255,0.06);
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow: hidden;
    transition: width 0.35s ease, background 0.35s ease;
}

.sidebar:hover {
    width: 260px;
}

.sidebar-brand {
    display: flex;
    gap: 16px;
    align-items: center;
    min-height: 76px;
}

.sidebar-brand img {
    width: 64px;
    height: 64px;
    object-fit: contain;
    border-radius: 18px;
    background: rgba(255,255,255,0.06);
    padding: 10px;
}

.brand-name,
.brand-tag {
    opacity: 0;
    transition: opacity 0.25s ease;
}

.sidebar:hover .brand-name,
.sidebar:hover .brand-tag {
    opacity: 1;
}

.brand-name {
    display: block;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #eef2ff;
}

.brand-tag {
    display: block;
    font-size: 0.85rem;
    color: var(--muted);
}

.sidebar-status {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 24px;
    padding: 18px 16px;
    display: grid;
    gap: 8px;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.sidebar:hover .sidebar-status {
    opacity: 1;
}

.sidebar-status span {
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.18em;
    color: var(--muted);
}

.sidebar-status strong {
    font-size: 1.7rem;
    letter-spacing: 0.08em;
}

.sidebar-nav {
    display: grid;
    gap: 10px;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 14px;
    color: var(--muted);
    text-decoration: none;
    padding: 14px 12px;
    border-radius: 18px;
    transition: background 0.25s ease, color 0.25s ease;
    font-weight: 500;
    white-space: nowrap;
}

.nav-icon {
    display: inline-flex;
    width: 32px;
    justify-content: center;
    color: #eef2ff;
}

.nav-label {
    opacity: 0;
    transform: translateX(-10px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.sidebar:hover .nav-label {
    opacity: 1;
    transform: translateX(0);
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    color: #eef2ff;
    background: rgba(255,255,255,0.12);
}

.sidebar-footer {
    margin-top: auto;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.sidebar:hover .sidebar-footer {
    opacity: 1;
}

.btn-secondary,
.btn-ghost,
.cta-button,
.cta-link {
    border: none;
    cursor: pointer;
    font-weight: 600;
}

.btn-secondary {
    width: 100%;
    padding: 14px 18px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    color: #eef2ff;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.main-content {
    padding: 36px 40px;
    position: relative;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.topbar-dot-grid {
    width: 90px;
    height: 24px;
    background: radial-gradient(circle at 10% 20%, rgba(255,255,255,0.45) 2px, transparent 2px),
                radial-gradient(circle at 50% 60%, rgba(255,255,255,0.35) 2px, transparent 2px);
    background-size: 16px 16px;
    opacity: 0.35;
}

.topbar-actions .btn-ghost {
    padding: 12px 18px;
    border-radius: 999px;
    color: #eef2ff;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
}

.hero-panel {
    display: grid;
    grid-template-columns: 1fr 520px;
    gap: 42px;
    align-items: center;
    min-height: calc(100vh - 120px);
    position: relative;
    overflow: hidden;
}

.hero-panel::before,
.hero-panel::after {
    content: '';
    position: absolute;
    pointer-events: none;
}

.hero-panel::before {
    inset: 0;
    background: radial-gradient(circle at 70% 30%, rgba(255, 255, 255, 0.18), transparent 18%),
                radial-gradient(circle at 15% 85%, rgba(255, 255, 255, 0.08), transparent 16%);
    opacity: 0.65;
}

.hero-panel::after {
    width: 420px;
    height: 420px;
    top: 10%;
    right: -80px;
    border-radius: 20%;
    background: rgba(255,255,255,0.06);
    box-shadow: 0 0 120px rgba(255,255,255,0.1);
}

.hero-copy {
    position: relative;
    z-index: 1;
}

.hero-copy .eyebrow {
    display: inline-flex;
    margin-bottom: 18px;
    color: var(--accent);
    letter-spacing: 0.35em;
    text-transform: uppercase;
    font-size: 1.1rem;
    text-shadow: 0 0 12px rgba(255,255,255,0.35);
}

.hero-copy h1 {
    font-size: clamp(2.8rem, 3.5vw, 4.8rem);
    line-height: 0.92;
    max-width: 780px;
    margin-bottom: 24px;
}

.hero-copy p {
    max-width: 600px;
    font-size: 1.05rem;
    color: var(--muted);
    margin-bottom: 28px;
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    margin-bottom: 28px;
}

.cta-button {
    padding: 16px 28px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.12);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 20px 40px rgba(255, 255, 255, 0.12);
}

.cta-link {
    color: var(--text);
    background: rgba(255,255,255,0.08);
    padding: 16px 24px;
    border-radius: 10px;
    text-decoration: none;
    border: 1px solid rgba(255,255,255,0.12);
}

.hero-badges {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.hero-badges span {
    display: inline-flex;
    padding: 10px 16px;
    border-radius: 10px;
    background: rgba(255,255,255,0.05);
    color: var(--muted);
    font-size: 0.9rem;
}

.hero-visual {
    position: relative;
    min-height: 520px;
    display: grid;
    place-items: center;
}

.grid-ring {
    position: absolute;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,0.16), transparent 52%);
    filter: blur(1px);
    animation: spinRing 18s linear infinite;
}

/* Custom animated buttons and file inputs for forums modals */
.btn {
    display: inline-block;
    padding: 10px 14px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    font-weight: 700;
    letter-spacing: 0.02em;
    transition: transform 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
    background: linear-gradient(90deg, rgba(255,255,255,0.06), rgba(255,255,255,0.03));
    color: #eef2ff;
    box-shadow: 0 6px 18px rgba(8,6,20,0.6);
}
.btn:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(8,6,20,0.7); }
.btn:active { transform: translateY(-1px) scale(0.995); }

.btn-primary {
    background: linear-gradient(90deg, rgba(128,0,255,0.95), rgba(99,102,241,0.95));
    color: white;
    box-shadow: 0 10px 40px rgba(99,102,241,0.18), inset 0 -2px 0 rgba(0,0,0,0.08);
}

.btn-ghost {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.06);
    color: var(--text);
}

.btn-icon { display:inline-flex; align-items:center; gap:8px; }

/* file input wrapper */
.file-input-wrapper { display:flex; gap:8px; align-items:center; }
.file-input-label {
    padding:8px 12px; border-radius:8px; background:rgba(255,255,255,0.04); cursor:pointer; border:1px solid rgba(255,255,255,0.06); color:var(--text);
}
.file-input-filename { font-size:0.85rem; color:var(--muted); max-width:140px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }

/* Modal tweaks */
#signup-modal, #login-modal { border: 1px solid rgba(255,255,255,0.04); }
#profile-modal { border: 1px solid rgba(255,255,255,0.04); }

/* Make all modal buttons use our btn styles by default */
#signup-modal button, #login-modal button, #profile-modal button { min-width:100px; }

/* Style dynamically created buttons too */
button { font-family: inherit; }


.capsules {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.capsule {
    position: absolute;
    width: 120px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(90deg, rgba(255,255,255,0.95), rgba(255,255,255,0.25));
    box-shadow: 0 0 30px rgba(255,255,255,0.32), inset 0 0 8px rgba(255,255,255,0.55);
    filter: drop-shadow(0 0 18px rgba(255,255,255,0.2));
    transform-style: preserve-3d;
}

.capsule::before,
.capsule::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 10px;
}

.capsule::before {
    background: rgba(255,255,255,0.14);
    transform: translateZ(0) scale(0.96);
}

.capsule::after {
    background: radial-gradient(circle at 20% 50%, rgba(255,255,255,0.92), transparent 40%);
}

.capsule-1 {
    top: 18%;
    left: 40%;
    --capsule-rot: 15deg;
    animation: floatCapsule 8s ease-in-out infinite;
}

.capsule-2 {
    top: 50%;
    right: 28%;
    width: 160px;
    height: 44px;
    --capsule-rot: -10deg;
    animation: floatCapsule 10s ease-in-out infinite reverse;
}

.capsule-3 {
    bottom: 16%;
    left: 20%;
    width: 140px;
    height: 42px;
    --capsule-rot: 8deg;
    animation: floatCapsule 9s ease-in-out infinite;
}

.capsule-4 {
    bottom: 34%;
    right: 16%;
    width: 130px;
    height: 38px;
    --capsule-rot: -20deg;
    animation: floatCapsule 11s ease-in-out infinite reverse;
}

.hero-card {
    position: relative;
    width: 100%;
    max-width: 380px;
    padding: 36px;
    border-radius: 10px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.15);
    box-shadow: var(--shadow);
    backdrop-filter: blur(24px);
    z-index: 2;
    transition: transform 0.35s ease;
}
.hero-card2 {
    width: 1400px;
    max-width: 100%;
    padding: 36px;
    border-radius: 10px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.15);
    box-shadow: var(--shadow);
    backdrop-filter: blur(24px);
    transition: transform 0.35s ease;
}

.hero-card3 {
    width: 1400px;
    max-width: 100%;
    padding: 36px;
    border-radius: 10px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.15);
    box-shadow: var(--shadow);
    backdrop-filter: blur(24px);
    transition: transform 0.35s ease;
}


.hero-card3:hover {
    transform: translateY(-8px) perspective(900px) rotateX(2deg) rotateY(3deg);
}

.hero-card:hover {
    transform: translateY(-8px) perspective(900px) rotateX(2deg) rotateY(3deg);
}

.hero-card-head {
    width: 72px;
    height: 72px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    margin-bottom: 24px;
    background: rgba(255, 255, 255, 0.12);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08);
}

.hero-card-head span {
    color: white;
    font-size: 2rem;
    font-weight: 900;
}

.hero-card p {
    color: var(--muted);
    line-height: 1.8;
}

.section-block {
    margin-top: 64px;
    padding: 20px 0;
}

.section-grid {
    display: grid;
    grid-template-columns: 1.25fr 0.9fr;
    gap: 24px;
}

.section-card,
.stats-card,
.contact-panel {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    padding: 32px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.18);
}

.section-card h2 {
    font-size: 2.4rem;
    margin-bottom: 20px;
}

.section-card p {
    color: var(--muted);
    line-height: 1.8;
}

.stats-card {
    display: grid;
    gap: 18px;
}

.stats-card div {
    background: rgba(255,255,255,0.05);
    padding: 24px;
    border-radius: 10px;
}

.stats-card strong {
    display: block;
    font-size: 2rem;
    margin-bottom: 8px;
}

.stats-card span {
    color: var(--muted);
}

.section-title {
    font-size: 2.4rem;
    margin-bottom: 1.5rem;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.feature-card {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    padding: 30px;
    min-height: 240px;
    transition: transform 0.4s ease, border-color 0.4s ease, background 0.4s ease;
}

.feature-card:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.18);
}

.feature-icon {
    display: inline-flex;
    width: 56px;
    height: 56px;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    margin-bottom: 20px;
    background: rgba(255, 255, 255, 0.1);
    color: #06070d;
    font-size: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.feature-card h3 {
    font-size: 1.35rem;
    margin-bottom: 14px;
    color: #eef2ff;
}

.feature-card p {
    color: var(--muted);
}

.contact-panel {
    display: grid;
    gap: 24px;
}

.contact-panel h2 {
    margin-bottom: 12px;
    font-size: 2.2rem;
}

.contact-panel p {
    color: var(--muted);
    max-width: 480px;
}

.discord-container {
    display: grid;
    gap: 24px;
    max-width: 480px;
}

.discord-button {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    transition: all 0.3s ease;
}

.discord-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 60px rgba(255, 255, 255, 0.15);
}

.discord-hint {
    color: var(--muted);
    font-size: 0.95rem;
    margin-top: -12px;
}

.discord-hint2 {
    color: var(--muted);
    font-size: 0.95rem;
    margin-top: -12px;
    left: 100px;
}

.fade-in {
    opacity: 0;
    transform: translateY(20px);
    animation: slideIn 0.8s ease-out forwards;
}

.fade-in-section {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-section.fade-in {
    opacity: 1;
    transform: translateY(0);
}

@keyframes slideIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Utility animation classes */
.animate {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease var(--delay, 0s), transform 0.6s ease var(--delay, 0s);
}
.animate.in-view {
    opacity: 1;
    transform: translateY(0);
}

.animate-scale { transform: scale(0.96) translateY(8px); }
.animate-scale.in-view { transform: scale(1) translateY(0); }

.animate-zoom { transform: scale(0.9); }
.animate-zoom.in-view { transform: scale(1); }

.animate-rotate { transform: rotate(-6deg) translateY(10px); }
.animate-rotate.in-view { transform: rotate(0deg) translateY(0); }

/* Stagger container: children with .stagger-item will animate with incremental delays */
.stagger .stagger-item {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.5s ease var(--delay, 0s), transform 0.5s ease var(--delay, 0s);
}
.stagger .stagger-item.in-view {
    opacity: 1;
    transform: translateY(0);
}

@keyframes spinRing {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes floatCapsule {
    0%, 100% { transform: translateY(0px) rotate(var(--capsule-rot, 0deg)); }
    50% { transform: translateY(-28px) rotate(var(--capsule-rot, 0deg)); }
}

@media (max-width: 1180px) {
    .layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: relative;
        height: auto;
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border);
    }

    .main-content {
        padding: 24px;
    }

    .hero-panel {
        grid-template-columns: 1fr;
        min-height: auto;
    }
}

@media (max-width: 820px) {
    .sidebar {
        padding: 24px 18px;
    }

    .hero-copy h1 {
        font-size: 2.8rem;
    }

    .topbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .feature-grid {
        grid-template-columns: 1fr;
    }

    .section-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .hero-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .hero-badges {
        justify-content: center;
    }

    .contact-panel {
        padding: 24px;
    }
}
