
/* ============================================================
    CSS VARIABLES & DARK THEME PALETTE
   ============================================================ */
:root {
    --bg-canvas: #090b10;
    --bg-surface: #10141e;
    --bg-surface-elevated: #161b29;
    --bg-card: rgba(22, 27, 41, 0.7);
    --bg-card-hover: rgba(30, 37, 56, 0.85);

    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-highlight: rgba(139, 92, 246, 0.3);
    --border-glow: rgba(139, 92, 246, 0.5);

    --text-main: #f3f4f6;
    --text-muted: #94a3b8;
    --text-dim: #64748b;

    --primary: #8b5cf6;
    --primary-hover: #7c3aed;
    --primary-active: #6d28d9;
    --primary-glow: rgba(139, 92, 246, 0.4);

    --accent-cyan: #06b6d4;
    --accent-emerald: #10b981;
    --accent-pink: #ec4899;

    --gradient-brand: linear-gradient(135deg, #a855f7 0%, #6366f1 50%, #3b82f6 100%);
    --gradient-surface: linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0) 100%);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --transition-base: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Reset & Base Setup */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

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

body {
    background-color: var(--bg-canvas);
    color: var(--text-main);
    font-family: var(--font-sans);
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
    width: 100%;
    position: relative;
}

/* Ambient Background Glows */
.ambient-glow {
    position: absolute;
    top: -150px;
    left: 50%;
    transform: translateX(-50%);
    width: 700px;
    height: 450px;
    background: radial-gradient(circle, rgba(124, 58, 237, 0.25) 0%, rgba(59, 130, 246, 0.12) 40%, transparent 70%);
    pointer-events: none;
    filter: blur(80px);
    z-index: 0;
}

.ambient-glow-secondary {
    position: absolute;
    top: 600px;
    right: -100px;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.15) 0%, transparent 60%);
    pointer-events: none;
    filter: blur(90px);
    z-index: 0;
}

/* Container Utility */
.container {
    width: 100%;
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 1.5rem;
    position: relative;
    z-index: 1;
}

/* ============================================================
    STICKY HEADER
    ============================================================ */
.site-header {
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    background: rgba(9, 11, 16, 0.75);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border-subtle);
    transition: var(--transition-base);
}

.header-nav {
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    text-decoration: none;
    color: var(--text-main);
    font-weight: 800;
    font-size: 1.25rem;
    letter-spacing: -0.02em;
}

.logo-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    background: var(--gradient-brand);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(139, 92, 246, 0.4);
}

.logo-icon svg {
    width: 20px;
    height: 20px;
    stroke: #ffffff;
    fill: none;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.93rem;
    transition: var(--transition-base);
}

.nav-links a:hover {
    color: var(--text-main);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* ============================================================
    BUTTONS & INTERACTIVE ELEMENTS
    ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.7rem 1.4rem;
    font-size: 0.93rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: var(--transition-base);
    cursor: pointer;
    border: 1px solid transparent;
    outline: none;
    font-family: inherit;
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background: var(--primary);
    color: #ffffff;
    box-shadow: 0 4px 18px var(--primary-glow);
}

.btn-primary:hover {
    background: var(--primary-hover);
    box-shadow: 0 6px 24px rgba(139, 92, 246, 0.6);
    transform: translateY(-1px);
}

.btn-outline {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-main);
    border-color: var(--border-subtle);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.btn-lg {
    padding: 0.95rem 1.8rem;
    font-size: 1.05rem;
    border-radius: var(--radius-lg);
}

/* ============================================================
    HERO SECTION
    ============================================================ */
.hero-section {
    padding: 5.5rem 0 4rem;
    text-align: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.9rem;
    border-radius: var(--radius-full);
    background: rgba(139, 92, 246, 0.12);
    border: 1px solid var(--border-highlight);
    color: #c4b5fd;
    font-size: 0.82rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.hero-badge-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent-emerald);
    box-shadow: 0 0 8px var(--accent-emerald);
}

.hero-title {
    font-size: clamp(2.3rem, 5.5vw, 3.8rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.03em;
    margin-bottom: 1.25rem;
    max-width: 820px;
    margin-left: auto;
    margin-right: auto;
}

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

.hero-subtitle {
    font-size: clamp(1.05rem, 2vw, 1.2rem);
    color: var(--text-muted);
    max-width: 620px;
    margin: 0 auto 2.5rem;
    line-height: 1.6;
}

/* Interactive Game Entry Card */
.join-box-wrapper {
    max-width: 540px;
    margin: 0 auto 2rem;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    padding: 1.8rem;
    box-shadow: 0 20px 45px -10px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.05);
    position: relative;
}

.join-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.code-input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.code-input-prefix {
    position: absolute;
    left: 1.1rem;
    color: var(--text-dim);
    font-weight: 700;
    font-family: var(--font-mono);
    font-size: 1.2rem;
    pointer-events: none;
}

.code-input {
    width: 100%;
    background: rgba(9, 11, 16, 0.85);
    border: 1.5px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 0.95rem 1rem 0.95rem 2.5rem;
    color: #ffffff;
    font-family: var(--font-mono);
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    outline: none;
    transition: var(--transition-base);
}

.code-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.25);
}

.code-input::placeholder {
    letter-spacing: normal;
    font-size: 1rem;
    font-family: var(--font-sans);
    color: var(--text-dim);
    text-transform: none;
    font-weight: 400;
}

.join-action-row {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.join-action-row .btn {
    flex: 1 1 200px;
}

.helper-text {
    font-size: 0.82rem;
    color: var(--text-dim);
    margin-top: 0.5rem;
}

/* Notification / Toast feedback box */
.status-toast {
    display: none;
    margin-top: 1rem;
    padding: 0.75rem;
    font-size: 0.85rem;
    border-radius: var(--radius-sm);
    text-align: center;
}
.status-toast.show {
    display: block;
}
.status-toast.info {
    background: rgba(139, 92, 246, 0.15);
    border: 1px solid var(--border-highlight);
    color: #ddd6fe;
}

/* ============================================================
    ABOUT & FEATURES SECTION
    ============================================================ */
.about-section {
    padding: 5rem 0 6rem;
    position: relative;
}

.section-header {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 3.5rem;
}

.section-tag {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--primary);
    margin-bottom: 0.5rem;
    display: block;
}

.section-title {
    font-size: clamp(1.8rem, 3.5vw, 2.4rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 0.8rem;
}

.section-desc {
    color: var(--text-muted);
    font-size: 1rem;
}

.grid-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 2rem;
    transition: var(--transition-base);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
}

.feature-card:hover {
    transform: translateY(-4px);
    border-color: rgba(139, 92, 246, 0.4);
    background: var(--bg-card-hover);
    box-shadow: 0 16px 32px -8px rgba(0, 0, 0, 0.6);
}

.feature-icon-wrapper {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
}

.icon-cyan {
    background: rgba(6, 182, 212, 0.12);
    color: var(--accent-cyan);
    border: 1px solid rgba(6, 182, 212, 0.25);
}

.icon-purple {
    background: rgba(139, 92, 246, 0.12);
    color: var(--primary);
    border: 1px solid rgba(139, 92, 246, 0.25);
}

.icon-pink {
    background: rgba(236, 72, 153, 0.12);
    color: var(--accent-pink);
    border: 1px solid rgba(236, 72, 153, 0.25);
}

.icon-emerald {
    background: rgba(16, 185, 129, 0.12);
    color: var(--accent-emerald);
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.feature-icon-wrapper svg {
    width: 24px;
    height: 24px;
    stroke-width: 2;
    stroke: currentColor;
    fill: none;
}

.feature-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.6rem;
    color: var(--text-main);
}

.feature-text {
    color: var(--text-muted);
    font-size: 0.92rem;
    line-height: 1.6;
}

/* ============================================================
    FOOTER
    ============================================================ */
.site-footer {
    border-top: 1px solid var(--border-subtle);
    background: #06080c;
    padding: 4rem 0 2rem;
    margin-top: 3rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3.5rem;
}

.footer-brand-col p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 1rem;
    max-width: 320px;
}

.footer-heading {
    color: var(--text-main);
    font-size: 0.88rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1.2rem;
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition-base);
}

.footer-links a:hover {
    color: var(--text-main);
}

.footer-bottom {
    border-top: 1px solid var(--border-subtle);
    padding-top: 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--text-dim);
    font-size: 0.85rem;
    flex-wrap: wrap;
    gap: 1rem;
}

/* Responsive Queries */
@media (max-width: 868px) {
    .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    }
    .nav-links {
    display: none;
    }
}

@media (max-width: 520px) {
    .footer-grid {
    grid-template-columns: 1fr;
    }
    .join-box-wrapper {
    padding: 1.25rem;
    }
    .join-action-row .btn {
    width: 100%;
    }
}
