/* ============================================
   NightLifeOnline - Clean Dark Design
   ============================================ */

:root {
    --bg-dark: #0a0a0a;
    --bg-section: #0f0f11;
    --bg-card: #141416;
    --bg-card-hover: #1a1a1e;
    --bg-input: #161618;

    --red: #e63946;
    --red-hover: #d1303c;
    --red-dark: #b02a35;
    --red-subtle: rgba(230, 57, 70, 0.08);

    --text: #e4e4e7;
    --text-secondary: #8b8b96;
    --text-muted: #52525b;

    --border: rgba(255, 255, 255, 0.06);
    --border-light: rgba(255, 255, 255, 0.1);

    --success: #22c55e;
    --success-bg: rgba(34, 197, 94, 0.08);
    --warning: #f59e0b;
    --warning-bg: rgba(245, 158, 11, 0.08);
    --error: #ef4444;
    --error-bg: rgba(239, 68, 68, 0.08);
    --info: #3b82f6;
    --info-bg: rgba(59, 130, 246, 0.08);

    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;

    --font: 'Inter', -apple-system, sans-serif;
    --font-display: 'Outfit', 'Inter', sans-serif;
}

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: var(--font);
    background: var(--bg-dark);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

::-webkit-scrollbar {
    width: 5px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 3px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 32px;
}

.text-red {
    color: var(--red);
}

/* ======================
   NAVBAR (Landing)
   ====================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: background 0.3s ease, border 0.3s ease;
}

.navbar.scrolled {
    background: rgba(10, 10, 10, 0.95);
    border-bottom: 1px solid var(--border);
}

.navbar-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.navbar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text);
}

.logo-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    background: var(--red);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1px;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 0.8rem;
    color: white;
}

.logo-icon.small {
    width: 28px;
    height: 28px;
    font-size: 0.65rem;
}

.navbar-brand {
    font-family: var(--font-display);
    font-size: 1.0625rem;
    font-weight: 700;
}

.navbar-links {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-link {
    padding: 7px 16px;
    font-size: 0.8125rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    letter-spacing: 0.05em;
    transition: color 0.2s ease;
    border-radius: var(--radius-sm);
    cursor: pointer;
}

.nav-link:hover,
.nav-link.active {
    color: #fff;
}

.navbar-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text);
    cursor: pointer;
    padding: 6px;
}

.mobile-menu {
    display: none;
    padding: 8px 32px 16px;
    flex-direction: column;
    gap: 2px;
}

.mobile-menu.open {
    display: flex;
}

.mobile-menu .nav-link {
    padding: 10px 14px;
}

/* ======================
   HERO
   ====================== */
.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-bg-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.02);
    animation: heroZoom 30s ease-in-out infinite alternate;
}

@keyframes heroZoom {
    0% {
        transform: scale(1.02);
    }

    100% {
        transform: scale(1.08);
    }
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(10, 10, 10, 0.65) 0%, rgba(10, 10, 10, 0.35) 40%, rgba(10, 10, 10, 0.85) 100%);
}

.hero-particles {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

.hero-container {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 140px 32px 80px;
}

.hero-tag {
    display: inline-block;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--red);
    margin-bottom: 20px;
    padding: 5px 16px;
    border: 1px solid rgba(230, 57, 70, 0.2);
    border-radius: 20px;
    background: rgba(230, 57, 70, 0.05);
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(2.2rem, 6vw, 4.2rem);
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: 20px;
}

.hero-desc {
    color: var(--text-secondary);
    font-size: 1.0625rem;
    max-width: 520px;
    margin: 0 auto 32px;
    line-height: 1.7;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

.hero-connect {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: 30px;
}

.connect-label {
    font-size: 0.8125rem;
    color: var(--text-muted);
    font-weight: 500;
}

.connect-ip {
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.8125rem;
    color: var(--red);
    font-weight: 600;
    background: none;
    border: none;
    padding: 0;
}

.hero-scroll {
    position: absolute;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    color: rgba(255, 255, 255, 0.25);
    cursor: pointer;
    animation: scrollBounce 2.5s ease-in-out infinite;
}

@keyframes scrollBounce {

    0%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    50% {
        transform: translateX(-50%) translateY(6px);
    }
}

/* ======================
   BUTTONS
   ====================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-md);
    font-family: var(--font);
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    text-decoration: none;
    letter-spacing: 0.03em;
    white-space: nowrap;
}

.btn-primary {
    background: var(--red);
    color: white;
}

.btn-primary:hover {
    background: var(--red-hover);
}

.btn-outline {
    background: transparent;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-outline:hover {
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.04);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-light);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    padding: 8px 14px;
    border: none;
}

.btn-ghost:hover {
    color: var(--text);
}

.btn-success {
    background: var(--success);
    color: white;
    border: none;
}

.btn-success:hover {
    background: #1ea550;
}

.btn-danger {
    background: var(--error);
    color: white;
    border: none;
}

.btn-danger:hover {
    background: #d63b3b;
}

.btn-lg {
    padding: 14px 32px;
    font-size: 0.875rem;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.75rem;
}

.btn-full {
    width: 100%;
}

.btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ======================
   SECTIONS (Landing)
   ====================== */
.section {
    padding: 90px 0;
    position: relative;
}

.section-dark {
    background: var(--bg-section);
}

.section-rules {
    background: var(--bg-dark);
}

.section-badge {
    display: inline-block;
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--red);
    margin-bottom: 14px;
    padding: 4px 14px;
    border: 1px solid rgba(230, 57, 70, 0.15);
    border-radius: 16px;
    background: rgba(230, 57, 70, 0.04);
}

.section-heading {
    font-family: var(--font-display);
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.15;
    margin-bottom: 16px;
}

.section-subheading {
    color: var(--text-secondary);
    font-size: 1rem;
    max-width: 560px;
    line-height: 1.7;
    margin-bottom: 40px;
}

/* --- Features Grid --- */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 40px;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 30px 24px;
    transition: border-color 0.2s ease;
}

.feature-card:hover {
    border-color: var(--border-light);
}

.feature-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    background: var(--red-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
    color: var(--red);
}

.feature-card h3 {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 0.8125rem;
    line-height: 1.6;
}

/* --- Split Section (About) --- */
.section-split {
    position: relative;
    min-height: 550px;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.split-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.split-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.split-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(10, 10, 10, 0.96) 0%, rgba(10, 10, 10, 0.85) 50%, rgba(10, 10, 10, 0.5) 100%);
}

.split-content {
    position: relative;
    z-index: 1;
}

.split-text {
    max-width: 520px;
}

.split-desc {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    line-height: 1.75;
    margin-bottom: 16px;
}

/* --- Showcase (Police) --- */
.section-showcase {
    background: var(--bg-dark);
}

.showcase-grid {
    display: grid;
    grid-template-columns: 440px 1fr;
    gap: 50px;
    align-items: center;
}

.showcase-image {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border);
}

.showcase-image img {
    width: 100%;
    height: 320px;
    object-fit: cover;
    display: block;
}

.showcase-image-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(10, 10, 10, 0.2), transparent);
}

.showcase-text p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    line-height: 1.7;
    margin-bottom: 12px;
}

/* --- Faction Cards --- */
.faction-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 40px;
}

.faction-card {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    height: 260px;
    cursor: pointer;
    border: 1px solid var(--border);
    transition: border-color 0.25s ease;
}

.faction-card:hover {
    border-color: var(--border-light);
}

.faction-card-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transition: transform 0.4s ease;
}

.faction-card:hover .faction-card-bg {
    transform: scale(1.04);
}

.faction-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(10, 10, 10, 0.9) 0%, rgba(10, 10, 10, 0.25) 60%, rgba(10, 10, 10, 0.1) 100%);
    z-index: 1;
}

.faction-card-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 24px;
    z-index: 2;
}

.faction-card h3 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    margin-bottom: 6px;
}

.faction-card p {
    color: var(--text-secondary);
    font-size: 0.8125rem;
    line-height: 1.5;
}

/* --- Rules --- */
.rules-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 40px;
}

.rule-item {
    display: flex;
    gap: 16px;
    padding: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}

.rule-num {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 900;
    color: var(--red);
    opacity: 0.4;
    line-height: 1;
    flex-shrink: 0;
}

.rule-item h4 {
    font-family: var(--font-display);
    font-size: 0.9375rem;
    font-weight: 600;
    margin-bottom: 3px;
}

.rule-item p {
    color: var(--text-secondary);
    font-size: 0.8125rem;
    line-height: 1.5;
}

/* --- CTA --- */
.section-cta {
    position: relative;
    min-height: 380px;
    display: flex;
    align-items: center;
    overflow: hidden;
    text-align: center;
}

.cta-bg {
    position: absolute;
    inset: 0;
}

.cta-bg-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cta-overlay {
    position: absolute;
    inset: 0;
    background: rgba(10, 10, 10, 0.82);
}

.cta-content {
    position: relative;
    z-index: 1;
}

.cta-heading {
    font-family: var(--font-display);
    font-size: clamp(1.75rem, 4vw, 2.75rem);
    font-weight: 900;
    letter-spacing: -0.02em;
    margin-bottom: 12px;
}

.cta-desc {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 28px;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* --- Footer --- */
.footer {
    border-top: 1px solid var(--border);
    padding: 32px 0;
    background: var(--bg-dark);
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.9375rem;
    margin-bottom: 4px;
}

.footer-copy {
    color: var(--text-muted);
    font-size: 0.75rem;
}

.footer-links {
    display: flex;
    gap: 20px;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.75rem;
    transition: color 0.15s;
}

.footer-links a:hover {
    color: var(--text-secondary);
}

/* ======================
   NAVBAR LOGGED-IN STATE
   ====================== */
.auth-nav-links {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.nav-divider {
    width: 1px;
    height: 18px;
    background: rgba(255, 255, 255, 0.1);
    margin: 0 8px;
}

.navbar-user {
    display: flex;
    align-items: center;
    position: relative;
    margin-left: 12px;
}

.nav-user-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    transition: background 0.15s;
}

.nav-user-toggle:hover {
    background: rgba(255, 255, 255, 0.05);
}

.nav-user-avatar {
    width: 30px;
    height: 30px;
    border-radius: var(--radius-sm);
    background: var(--red);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.7rem;
    color: white;
    font-family: var(--font-display);
    overflow: hidden;
}

.nav-user-name {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.nav-dropdown-arrow {
    color: var(--text-muted);
    transition: transform 0.2s;
}

.nav-dropdown.open~.nav-user-toggle .nav-dropdown-arrow,
.navbar-user .nav-dropdown.open+.nav-dropdown-arrow {
    transform: rotate(180deg);
}

/* --- Dropdown Panel --- */
.nav-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 200px;
    background: #121214;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 6px;
    z-index: 1000;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    animation: dropdownSlide 0.15s ease;
}

.nav-dropdown.open {
    display: block;
}

@keyframes dropdownSlide {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.nav-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: background 0.1s, color 0.1s;
    cursor: pointer;
    white-space: nowrap;
}

.nav-dropdown-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
}

.nav-dropdown-item svg {
    flex-shrink: 0;
    color: var(--text-muted);
}

.nav-dropdown-divider {
    height: 1px;
    background: var(--border);
    margin: 4px 8px;
}

.nav-dropdown-logout {
    color: var(--red);
}

.nav-dropdown-logout:hover {
    background: rgba(229, 62, 62, 0.08);
    color: var(--red);
}

.nav-dropdown-logout svg {
    color: var(--red);
}

.nav-badge {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--red);
    margin-left: 4px;
    vertical-align: middle;
}

/* ======================
   INLINE DASHBOARD SECTION
   ====================== */
.section-dashboard {
    background: var(--bg-section);
    border-top: 1px solid var(--border);
    padding: 60px 0 80px;
    min-height: 400px;
}

/* ======================
   LOGIN MODAL
   ====================== */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9000;
    background: rgba(0, 0, 0, 0.65);
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.15s ease;
}

.modal-overlay.open {
    display: flex;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal-card {
    background: #121214;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    padding: 36px 32px;
    max-width: 400px;
    width: 90%;
    position: relative;
    animation: modalSlide 0.2s ease;
}

@keyframes modalSlide {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-close {
    position: absolute;
    top: 14px;
    right: 18px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
}

.modal-close:hover {
    color: var(--text);
}

.login-logo {
    text-align: center;
    margin-bottom: 28px;
}

.login-logo .logo-icon {
    margin: 0 auto;
}

.login-title {
    font-family: var(--font-display);
    font-size: 1.375rem;
    font-weight: 700;
    margin-top: 14px;
}

.login-subtitle {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 500;
}

/* --- Discord Login Button --- */
.btn-discord {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 12px 20px;
    background: #5865F2;
    color: #fff;
    border: none;
    border-radius: var(--radius-md);
    font-family: var(--font);
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease;
    margin-bottom: 16px;
}

.btn-discord:hover {
    background: #4752C4;
    transform: translateY(-1px);
}

.btn-discord:active {
    transform: translateY(0);
}

.btn-discord svg {
    flex-shrink: 0;
}

/* --- Login Divider --- */
.login-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 12px 0 16px;
}

.login-divider::before,
.login-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.login-divider span {
    font-size: 0.6875rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

/* --- Team Search --- */
.team-search-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.team-search-input {
    flex: 1;
    padding: 8px 12px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-family: var(--font);
    font-size: 0.8125rem;
}

.team-search-input:focus {
    border-color: var(--red);
    outline: none;
}

.team-search-results {
    margin-top: 4px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    max-height: 180px;
    overflow-y: auto;
}

.search-result-item {
    padding: 8px 12px;
    font-size: 0.8125rem;
    cursor: pointer;
    transition: background 0.1s;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.search-result-item:hover {
    background: rgba(255, 255, 255, 0.04);
}

.search-result-item .text-muted {
    font-size: 0.6875rem;
}

/* --- Forms --- */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 5px;
}

input,
select,
textarea {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text);
    font-family: var(--font);
    font-size: 0.875rem;
    transition: border-color 0.15s ease;
    outline: none;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--red);
}

input::placeholder,
textarea::placeholder {
    color: var(--text-muted);
}

textarea {
    resize: vertical;
    min-height: 90px;
}

select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}

.form-error {
    background: var(--error-bg);
    color: var(--error);
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.8125rem;
    margin-bottom: 12px;
    border: 1px solid rgba(239, 68, 68, 0.15);
}

.login-accounts {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.login-accounts-title {
    font-size: 0.625rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
    margin-bottom: 8px;
    text-align: center;
}

.account-chips {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.account-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: border-color 0.15s ease;
    color: var(--text);
    font-family: var(--font);
    text-align: left;
    width: 100%;
}

.account-chip:hover {
    border-color: var(--red);
}

.chip-role {
    font-size: 0.5625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--red);
    background: var(--red-subtle);
    padding: 2px 7px;
    border-radius: 3px;
    min-width: 50px;
    text-align: center;
}

.chip-email {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ======================
   DASHBOARD (Logged in)
   ====================== */
.topnav {
    height: 56px;
    background: var(--bg-dark);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 200;
}

.topnav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 32px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.topnav-left {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.topnav-brand {
    font-family: var(--font-display);
    font-size: 0.9375rem;
    font-weight: 700;
}

.topnav-center {
    display: flex;
    align-items: center;
    gap: 1px;
    margin-left: auto;
    margin-right: 16px;
}

.topnav-link {
    padding: 6px 12px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.15s ease;
    border: none;
    background: none;
    font-family: var(--font);
    border-radius: var(--radius-sm);
    white-space: nowrap;
    position: relative;
}

.topnav-link:hover {
    color: var(--text-secondary);
}

.topnav-link.active {
    color: var(--red);
}

.topnav-link .link-badge {
    position: absolute;
    top: 3px;
    right: 3px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--red);
}

.topnav-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.topnav-user {
    display: flex;
    align-items: center;
    gap: 6px;
}

.user-avatar-sm {
    width: 26px;
    height: 26px;
    border-radius: var(--radius-sm);
    background: var(--red);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.65rem;
    color: white;
}

.topnav-username {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.topnav-role-badge {
    font-size: 0.5rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--red);
    background: var(--red-subtle);
    padding: 2px 6px;
    border-radius: 3px;
}

.dash-content {
    min-height: calc(100vh - 56px);
    background: var(--bg-dark);
}

/* ======================
   DASHBOARD COMPONENTS
   ====================== */
.content-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 32px 60px;
}

.page-header {
    margin-bottom: 28px;
}

.page-title {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 6px;
}

.page-subtitle {
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Grids */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

/* Cards */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    gap: 10px;
}

.card-title {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
}

.card-body {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.65;
}

/* Stats */
.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.stat-label {
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.stat-value {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
}

.stat-value.red {
    color: var(--red);
}

.stat-value.green {
    color: var(--success);
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: 14px;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.badge-success {
    background: var(--success-bg);
    color: var(--success);
    border: 1px solid rgba(34, 197, 94, 0.12);
}

.badge-warning {
    background: var(--warning-bg);
    color: var(--warning);
    border: 1px solid rgba(245, 158, 11, 0.12);
}

.badge-danger {
    background: var(--error-bg);
    color: var(--error);
    border: 1px solid rgba(239, 68, 68, 0.12);
}

.badge-info {
    background: var(--info-bg);
    color: var(--info);
    border: 1px solid rgba(59, 130, 246, 0.12);
}

.badge-neutral {
    background: rgba(130, 130, 130, 0.08);
    color: var(--text-muted);
    border: 1px solid rgba(130, 130, 130, 0.1);
}

/* Table */
.table-container {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background: var(--bg-section);
}

th {
    padding: 10px 16px;
    text-align: left;
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-bottom: 1px solid var(--border);
}

td {
    padding: 12px 16px;
    font-size: 0.8125rem;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border);
}

tr:last-child td {
    border-bottom: none;
}

tr:hover td {
    background: rgba(255, 255, 255, 0.01);
}

/* Tabs */
.tabs {
    display: flex;
    gap: 2px;
    background: var(--bg-section);
    padding: 3px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    overflow-x: auto;
}

.tab {
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.15s;
    border: none;
    background: none;
    font-family: var(--font);
    white-space: nowrap;
}

.tab:hover {
    color: var(--text-secondary);
}

.tab.active {
    background: var(--bg-card);
    color: var(--text);
}

/* Section headers */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    gap: 10px;
}

.section-title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* WL Banner */
.wl-status-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-radius: var(--radius-md);
    margin-bottom: 24px;
    font-weight: 500;
    font-size: 0.875rem;
}

.wl-status-banner.whitelisted {
    background: var(--success-bg);
    border: 1px solid rgba(34, 197, 94, 0.12);
    color: var(--success);
}

.wl-status-banner.not-whitelisted {
    background: var(--warning-bg);
    border: 1px solid rgba(245, 158, 11, 0.12);
    color: var(--warning);
}

/* Quiz */
.quiz-progress {
    margin-bottom: 24px;
}

.quiz-progress-bar {
    height: 4px;
    background: var(--bg-section);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 6px;
}

.quiz-progress-fill {
    height: 100%;
    background: var(--red);
    border-radius: 2px;
    transition: width 0.2s;
}

.quiz-progress-text {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.quiz-question {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    margin-bottom: 16px;
}

.quiz-question-number {
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--red);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 8px;
}

.quiz-question-text {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 20px;
    line-height: 1.6;
}

.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.quiz-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: border-color 0.15s;
    font-family: var(--font);
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-align: left;
    width: 100%;
}

.quiz-option:hover {
    border-color: var(--border-light);
    color: var(--text);
}

.quiz-option.selected {
    border-color: var(--red);
    color: var(--text);
}

.quiz-option-marker {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.625rem;
    font-weight: 700;
    transition: all 0.15s;
}

.quiz-option.selected .quiz-option-marker {
    border-color: var(--red);
    background: var(--red);
    color: white;
}

.quiz-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
}

.quiz-result {
    text-align: center;
    padding: 40px 20px;
}

.quiz-result-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quiz-result-icon.pass {
    background: var(--success-bg);
    border: 1px solid rgba(34, 197, 94, 0.15);
    color: var(--success);
}

.quiz-result-icon.fail {
    background: var(--error-bg);
    border: 1px solid rgba(239, 68, 68, 0.15);
    color: var(--error);
}

.quiz-result-title {
    font-family: var(--font-display);
    font-size: 1.375rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.quiz-result-score {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

/* Applications */
.application-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    margin-bottom: 12px;
}

.application-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    gap: 10px;
    flex-wrap: wrap;
}

.application-applicant {
    font-weight: 600;
    font-size: 0.9375rem;
}

.application-body {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 14px;
}

.application-field {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.application-field-label {
    font-size: 0.625rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    font-weight: 600;
}

.application-field-value {
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.application-motivation {
    margin-bottom: 14px;
}

.application-motivation p {
    color: var(--text-secondary);
    font-size: 0.8125rem;
    line-height: 1.55;
    background: rgba(255, 255, 255, 0.02);
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    border-left: 2px solid var(--red);
}

.application-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.empty-state {
    text-align: center;
    padding: 48px 20px;
    color: var(--text-muted);
}

.empty-state-title {
    font-family: var(--font-display);
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.empty-state-text {
    font-size: 0.875rem;
    max-width: 360px;
    margin: 0 auto;
}

/* Dashboard Welcome */
.dashboard-welcome {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    margin-bottom: 28px;
}

.dashboard-welcome h2 {
    font-family: var(--font-display);
    font-size: 1.375rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.dashboard-welcome p {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.connect-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 18px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.connect-card code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8125rem;
    color: var(--red);
    font-weight: 600;
    background: var(--red-subtle);
    padding: 4px 10px;
    border-radius: 4px;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 12px 18px;
    border-radius: var(--radius-md);
    font-size: 0.8125rem;
    font-weight: 500;
    z-index: 9999;
    animation: toastIn 0.2s ease;
    max-width: 320px;
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes toastOut {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
        transform: translateY(12px);
    }
}

.toast-success {
    background: #1a2e1a;
    border: 1px solid rgba(34, 197, 94, 0.15);
    color: var(--success);
}

.toast-error {
    background: #2e1a1a;
    border: 1px solid rgba(239, 68, 68, 0.15);
    color: var(--error);
}

.toast-info {
    background: #1a1e2e;
    border: 1px solid rgba(59, 130, 246, 0.15);
    color: var(--info);
}

/* ======================
   RESPONSIVE
   ====================== */
@media (max-width: 900px) {
    .navbar-links {
        display: none;
    }

    .navbar-toggle {
        display: block;
    }

    .features-grid,
    .faction-cards,
    .rules-grid {
        grid-template-columns: 1fr;
    }

    .showcase-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }

    .topnav-center {
        display: none;
    }

    .topnav-user {
        display: none;
    }

    .section {
        padding: 50px 0;
    }
}

@media (max-width: 600px) {
    .container {
        padding: 0 16px;
    }

    .hero-container {
        padding: 110px 16px 50px;
    }

    .content-inner {
        padding: 20px 16px 48px;
    }

    .faction-card {
        height: 200px;
    }
}

/* Utility */
.mt-12 {
    margin-top: 12px;
}

.mt-16 {
    margin-top: 16px;
}

.mt-20 {
    margin-top: 20px;
}

.mt-24 {
    margin-top: 24px;
}

.mb-12 {
    margin-bottom: 12px;
}

.mb-16 {
    margin-bottom: 16px;
}

.mb-20 {
    margin-bottom: 20px;
}

.mb-24 {
    margin-bottom: 24px;
}

.mb-36 {
    margin-bottom: 36px;
}

.gap-10 {
    gap: 10px;
}

.flex {
    display: flex;
}

.flex-wrap {
    flex-wrap: wrap;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.text-sm {
    font-size: 0.8125rem;
}

.text-muted {
    color: var(--text-muted);
}

.font-semibold {
    font-weight: 600;
}