/* ==========================================
   Nexus Common Styles - All Pages
   Shared: variables, reset, header, footer, mobile menu
   ========================================== */

/* Reset & Base */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --bg-primary: #120808;
    --bg-secondary: #1a0c0c;
    --bg-card: #201010;
    --bg-card-hover: #2c1818;
    --border-color: rgba(255, 100, 100, 0.1);
    --border-hover: rgba(255, 100, 100, 0.2);
    --text-primary: #e8e4e2;
    --text-secondary: rgba(255, 235, 230, 0.55);
    --text-muted: rgba(255, 235, 230, 0.35);
    --gold: #d4af37;
    --gold-light: #f4d03f;
    --red: #c62828;
    --red-light: #e53935;
    --green: #43a047;
    --discord: #5865F2;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-heading: 'Cinzel', serif;
    --radius: 6px;
    --radius-lg: 10px;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* Full-page background image + dark overlay */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: url('/images/background.jpg') center center / cover no-repeat;
    z-index: -3;
}

body::after {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(18, 8, 8, 0.82);
    z-index: -2;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    display: block;
}

/* ==========================================
   Header - Desktop
   ========================================== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    height: 84px;
    display: flex;
    align-items: center;
}

/* Desktop: logo absolute left, nav centered */
.site-logo {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    flex-shrink: 0;
    z-index: 1;
}

.logo-img {
    height: 110px;
    width: auto;
    object-fit: contain;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

/* Nav */
.site-nav {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-item {
    padding: 8px 14px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    border-bottom: 2px solid transparent;
    transition: color 0.2s, border-color 0.2s;
    white-space: nowrap;
}

.nav-item:hover {
    color: var(--text-primary);
}

.nav-item.active {
    color: var(--text-primary);
    border-bottom-color: var(--red);
}

/* Auth buttons */
.header-auth {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.btn-header {
    padding: 6px 16px;
    font-size: 0.82rem;
    font-weight: 600;
    border-radius: var(--radius);
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-login {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border-color);
}

.btn-login:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--border-hover);
}

.btn-signup {
    color: #fff;
    background: transparent;
    border: 1px solid var(--text-secondary);
}

.btn-signup:hover {
    border-color: var(--text-primary);
    color: #fff;
}

.btn-profile {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-color);
}

.profile-avatar {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--gold);
    color: #1a1a2e;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
}

/* Mobile toggle - hidden on desktop */
.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.mobile-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text-primary);
    transition: all 0.3s;
}

.mobile-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 999;
}

.mobile-overlay.active {
    display: block;
}

/* ==========================================
   Footer
   ========================================== */
.ft {
    position: relative;
    margin-top: 60px;
    overflow: hidden;
}

.ft-glow {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    opacity: 0.5;
}

.ft-inner {
    max-width: 800px;
    margin: 0 auto;
    padding: 50px 20px 30px;
    text-align: center;
}

.ft-top {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    margin-bottom: 30px;
}

.ft-logo img {
    height: 120px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 4px 20px rgba(212, 175, 55, 0.15));
    transition: filter 0.3s;
}

.ft-logo:hover img {
    filter: drop-shadow(0 4px 30px rgba(212, 175, 55, 0.3));
}

.ft-tagline {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    color: var(--text-muted);
    letter-spacing: 2px;
    text-transform: uppercase;
}

.ft-socials {
    display: flex;
    gap: 12px;
    margin-top: 4px;
}

.ft-social {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 1.2rem;
    transition: all 0.3s;
}

.ft-social:hover {
    color: #fff;
    background: var(--discord);
    border-color: var(--discord);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(88, 101, 242, 0.3);
}

.ft-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 24px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.ft-nav a {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    padding: 4px 8px;
    transition: color 0.2s;
}

.ft-nav a:hover {
    color: var(--gold);
}

.ft-dot {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--text-muted);
    flex-shrink: 0;
}

.ft-bottom {
    padding: 20px 0 0;
}

.ft-bottom p {
    font-size: 0.78rem;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

/* ==========================================
   Responsive - Mobile Header
   ========================================== */
@media (max-width: 768px) {
    .site-header {
        height: 60px;
    }

    /* On mobile: logo is centered, not absolute-left */
    .site-logo {
        position: absolute;
        left: 50%;
        transform: translate(-50%, -50%);
    }

    .logo-img {
        height: 80px;
    }

    /* Container becomes space-between for hamburger on right */
    .header-container {
        justify-content: flex-end;
        padding: 0 16px;
    }

    .site-nav {
        display: none;
    }

    .site-nav.open {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        bottom: 0;
        background: var(--bg-secondary);
        padding: 12px 0;
        gap: 0;
        z-index: 1000;
        overflow-y: auto;
    }

    .site-nav.open .nav-item {
        padding: 14px 24px;
        font-size: 1rem;
        border-bottom: 1px solid var(--border-color);
        border-left: none;
    }

    .site-nav.open .nav-item.active {
        border-bottom-color: var(--border-color);
        color: var(--red);
    }

    .header-auth {
        display: none;
    }

    .mobile-toggle {
        display: flex;
    }

    .mobile-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .mobile-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    /* Footer mobile */
    .ft-logo img {
        height: 90px;
    }

    .ft-tagline {
        font-size: 0.8rem;
        letter-spacing: 1px;
    }

    .ft-dot {
        display: none;
    }

    .ft-nav {
        gap: 4px;
    }

    .ft-nav a {
        padding: 6px 10px;
    }

    .ft {
        margin-top: 40px;
    }

    .ft-inner {
        padding: 35px 16px 25px;
    }
}

@media (max-width: 480px) {
    .site-header {
        height: 52px;
    }

    .logo-img {
        height: 68px;
    }

    .site-nav.open {
        top: 52px;
    }
}
