/* ============================================
   DETERCITY RP — CSS Global
   Style Dark / Criminel / Premium
   ============================================ */

:root {
    --red:        #CC0022;
    --red-dark:   #8B0000;
    --red-glow:   rgba(204, 0, 34, 0.6);
    --gold:       #D4AF37;
    --gold-light: #F5CC5A;
    --black:      #09090C;
    --dark:       #0E0E12;
    --dark2:      #141418;
    --glass:      rgba(255, 255, 255, 0.04);
    --glass-border: rgba(255, 255, 255, 0.08);
    --text:       #E8E8EC;
    --text-dim:   #888897;
    --font-title: 'Bebas Neue', sans-serif;
    --font-body:  'Montserrat', sans-serif;
    --radius:     12px;
    --trans:      0.35s ease;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

/* Accessible hidden (SEO) */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

body {
    background: var(--black);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }

/* ===================== PAGE LOADER ===================== */
#page-loader {
    position: fixed;
    inset: 0;
    background: var(--black);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}
#page-loader.hidden { opacity: 0; visibility: hidden; }

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

.loader-title {
    display: block;
    font-family: var(--font-title);
    font-size: 4rem;
    letter-spacing: 8px;
    color: var(--red);
    margin-bottom: 2rem;
    text-shadow: 0 0 30px var(--red-glow);
}

.loader-bar {
    width: 260px;
    height: 3px;
    background: rgba(255,255,255,0.1);
    border-radius: 2px;
    overflow: hidden;
    margin: 0 auto;
}
.loader-fill {
    height: 100%;
    width: 0;
    background: var(--red);
    animation: loaderAnim 1.6s ease forwards;
}
@keyframes loaderAnim { to { width: 100%; } }

/* ===================== NAVBAR ===================== */
#navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    padding: 0;
    transition: background var(--trans);
}
#navbar.scrolled {
    background: rgba(9, 9, 12, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
}
.nav-inner {
    max-width: 1300px;
    margin: 0 auto;
    padding: 18px 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.nav-logo {
    font-family: var(--font-title);
    font-size: 1.8rem;
    letter-spacing: 3px;
    color: #fff;
}
.nav-logo span { color: var(--red); }
.nav-links {
    list-style: none;
    display: flex;
    gap: 2.5rem;
    align-items: center;
}
.nav-links a {
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--text-dim);
    transition: color var(--trans);
}
.nav-links a:hover { color: #fff; }
.nav-discord {
    background: #5865F2;
    color: #fff !important;
    padding: 8px 20px;
    border-radius: 6px;
    transition: opacity var(--trans) !important;
}
.nav-discord:hover { opacity: 0.85; }

.hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; }
.hamburger span { display: block; width: 24px; height: 2px; background: #fff; border-radius: 2px; }

/* ===================== HERO ===================== */
#hero {
    position: relative;
    height: 100vh;
    min-height: 700px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
}
.hero-video-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}
#bg-video {
    width: 100%; height: 100%;
    object-fit: cover;
    opacity: 0.4;
}
.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(9,9,12,0.4) 0%,
        rgba(9,9,12,0.6) 50%,
        rgba(9,9,12,1) 100%
    );
}
.hero-content {
    position: relative;
    z-index: 2;
    padding: 0 1rem;
    animation: heroFadeIn 1.2s ease 1.8s both;
}
@keyframes heroFadeIn {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}

.hero-badge {
    display: inline-block;
    border: 1px solid var(--red);
    color: var(--red);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    padding: 6px 16px;
    border-radius: 4px;
    margin-bottom: 1.5rem;
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 var(--red-glow); }
    50%       { box-shadow: 0 0 0 8px transparent; }
}

/* ===================== GLITCH EFFECT ===================== */
.glitch {
    font-family: var(--font-title);
    font-size: clamp(4rem, 10vw, 9rem);
    letter-spacing: 6px;
    color: #fff;
    position: relative;
    display: inline-block;
    text-shadow: 0 0 40px rgba(255,255,255,0.15);
}
.glitch::before, .glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
}
.glitch::before {
    color: var(--red);
    animation: glitch1 3.5s infinite;
    clip-path: polygon(0 0, 100% 0, 100% 35%, 0 35%);
}
.glitch::after {
    color: var(--gold);
    animation: glitch2 3.5s infinite;
    clip-path: polygon(0 65%, 100% 65%, 100% 100%, 0 100%);
}
@keyframes glitch1 {
    0%, 90%, 100% { transform: translate(0); }
    92%           { transform: translate(-4px, 2px); }
    94%           { transform: translate(4px, -2px); }
    96%           { transform: translate(-2px, 0); }
}
@keyframes glitch2 {
    0%, 90%, 100% { transform: translate(0); }
    92%           { transform: translate(4px, -2px); }
    94%           { transform: translate(-4px, 2px); }
    96%           { transform: translate(2px, 0); }
}

.glitch-small {
    font-family: var(--font-title);
    position: relative;
    display: inline-block;
}

.hero-sub {
    font-family: var(--font-title);
    font-size: clamp(1.4rem, 3vw, 2rem);
    letter-spacing: 4px;
    color: var(--gold);
    margin-top: 0.5rem;
}
.hero-desc {
    font-size: 1rem;
    color: var(--text-dim);
    margin-top: 1rem;
    max-width: 480px;
    margin-left: auto; margin-right: auto;
}
.hero-players {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    padding: 8px 20px;
    border-radius: 30px;
    margin: 2rem 0;
    font-size: 0.9rem;
    font-weight: 600;
}
.player-dot {
    width: 9px; height: 9px;
    background: #00ff88;
    border-radius: 50%;
    animation: pulse 1.5s infinite;
    box-shadow: 0 0 8px #00ff88;
}
.hero-btns {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ===================== BUTTONS ===================== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: all var(--trans);
    cursor: pointer;
}
.btn-lg { padding: 18px 44px; font-size: 1rem; }
.btn-primary {
    background: var(--red);
    color: #fff;
    box-shadow: 0 0 30px var(--red-glow);
}
.btn-primary:hover {
    background: #e0001f;
    transform: translateY(-3px);
    box-shadow: 0 0 50px var(--red-glow);
}
.btn-secondary {
    background: transparent;
    border: 2px solid rgba(255,255,255,0.25);
    color: #fff;
}
.btn-secondary:hover {
    border-color: #fff;
    transform: translateY(-3px);
}

.hero-scroll-hint {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    font-size: 1.5rem;
    color: var(--text-dim);
    animation: bounce 1.5s infinite;
}
@keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50%       { transform: translateX(-50%) translateY(-10px); }
}

/* ===================== SECTIONS ===================== */
section { padding: 100px 0; }

.section-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}
.section-header {
    text-align: center;
    margin-bottom: 4rem;
}
.section-header h2 {
    font-family: var(--font-title);
    font-size: clamp(2.5rem, 5vw, 4rem);
    letter-spacing: 3px;
    line-height: 1;
    margin-bottom: 1rem;
}
.section-header p {
    color: var(--text-dim);
    font-size: 1.05rem;
    max-width: 550px;
    margin: 0 auto;
}
.highlight { color: var(--red); }

/* ===================== FEATURES ===================== */
#features { background: var(--dark); }
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}
.feat-card {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 2rem;
    transition: all var(--trans);
    backdrop-filter: blur(10px);
}
.feat-card:hover {
    border-color: var(--red);
    transform: translateY(-6px);
    box-shadow: 0 20px 60px rgba(0,0,0,0.4), 0 0 20px var(--red-glow);
}
.feat-icon { font-size: 2.5rem; margin-bottom: 1rem; }
.feat-card h3 {
    font-family: var(--font-title);
    font-size: 1.5rem;
    letter-spacing: 2px;
    margin-bottom: 0.75rem;
    color: var(--gold);
}
.feat-card p { color: var(--text-dim); font-size: 0.9rem; line-height: 1.7; }

/* ===================== FACTIONS ===================== */
#factions { background: var(--black); }
.factions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
}
.faction-card {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 2rem;
    transition: all var(--trans);
    position: relative;
    overflow: hidden;
}
.faction-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 4px; height: 100%;
}
.faction-card.law::before   { background: #3a7bd5; }
.faction-card.bac::before   { background: #9b27af; }
.faction-card.gend::before  { background: #1a6b3c; }
.faction-card.samu::before  { background: #c0392b; }
.faction-card.sdis::before  { background: #e67e22; }
.faction-card.justice::before  { background: var(--gold); }
.faction-card.criminal::before { background: var(--red); }

.faction-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    border-color: rgba(255,255,255,0.15);
}
.faction-icon { font-size: 2.5rem; margin-bottom: 1rem; }
.faction-card h3 {
    font-family: var(--font-title);
    font-size: 1.6rem;
    letter-spacing: 2px;
    margin-bottom: 0.75rem;
}
.faction-card p { color: var(--text-dim); font-size: 0.9rem; margin-bottom: 1.5rem; }

.faction-grades {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 1.5rem;
}
.faction-grades span {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--glass-border);
    padding: 4px 10px;
    border-radius: 4px;
    color: var(--text-dim);
}

.faction-tag {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: 4px;
    background: rgba(255,255,255,0.08);
    color: #fff;
}
.criminal-tag { background: rgba(204,0,34,0.25); color: var(--red); }

/* ===================== MODS ===================== */
#mods { background: var(--dark2); }
.mods-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}
.mod-card {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 2rem;
    position: relative;
    transition: all var(--trans);
    overflow: hidden;
}
.mod-card:hover {
    border-color: var(--gold);
    box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 20px rgba(212, 175, 55, 0.2);
    transform: translateY(-6px);
}
.mod-badge {
    position: absolute;
    top: 16px; right: 16px;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    background: var(--red);
    color: #fff;
    padding: 4px 10px;
    border-radius: 4px;
}
.mod-icon { font-size: 2.5rem; margin-bottom: 1rem; }
.mod-card h3 {
    font-family: var(--font-title);
    font-size: 1.5rem;
    letter-spacing: 2px;
    margin-bottom: 0.75rem;
    color: var(--gold);
}
.mod-card p { color: var(--text-dim); font-size: 0.9rem; margin-bottom: 1.5rem; }
.mod-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.mod-tags span {
    font-size: 0.7rem;
    font-weight: 600;
    border: 1px solid var(--glass-border);
    padding: 3px 10px;
    border-radius: 4px;
    color: var(--text-dim);
}

/* ===================== RULES ===================== */
#rules { background: var(--black); }
.rules-list {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}
.rule-item {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 2rem;
    transition: all var(--trans);
}
.rule-item:hover { border-color: var(--red); }
.rule-number {
    font-family: var(--font-title);
    font-size: 3rem;
    color: var(--red);
    line-height: 1;
    min-width: 50px;
    opacity: 0.6;
}
.rule-content h3 {
    font-family: var(--font-title);
    font-size: 1.5rem;
    letter-spacing: 2px;
    margin-bottom: 0.5rem;
    color: var(--gold);
}
.rule-content p { color: var(--text-dim); font-size: 0.95rem; }

/* ===================== CTA ===================== */
#cta {
    background: linear-gradient(135deg, var(--red-dark), #1a0005);
    text-align: center;
    padding: 120px 0;
    border-top: 1px solid rgba(204,0,34,0.3);
}
.cta-inner h2 {
    font-family: var(--font-title);
    font-size: clamp(2.5rem, 5vw, 4rem);
    letter-spacing: 3px;
    margin-bottom: 1rem;
}
.cta-inner p { color: rgba(255,255,255,0.7); font-size: 1.1rem; margin-bottom: 2.5rem; }

/* ===================== FOOTER ===================== */
footer {
    background: #060608;
    border-top: 1px solid var(--glass-border);
    padding: 3rem 1rem;
    text-align: center;
}
.footer-logo {
    font-family: var(--font-title);
    font-size: 2rem;
    letter-spacing: 4px;
    color: var(--red);
    margin-bottom: 0.75rem;
}
footer p { color: var(--text-dim); font-size: 0.85rem; margin-bottom: 0.5rem; }
.footer-links a { color: var(--text-dim); margin: 0 8px; transition: color var(--trans); }
.footer-links a:hover { color: #fff; }
.footer-copy { margin-top: 1.5rem; font-size: 0.75rem; }

/* ===================== REVEAL ANIMATIONS ===================== */
[data-reveal] {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}
[data-reveal].revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ===================== RESPONSIVE ===================== */
@media (max-width: 768px) {
    .nav-links { display: none; position: absolute; top: 100%; left: 0; right: 0;
        flex-direction: column; background: rgba(9,9,12,0.98);
        padding: 1.5rem 2rem; gap: 1.5rem; border-bottom: 1px solid var(--glass-border); }
    .nav-links.open { display: flex; }
    .hamburger { display: flex; }
    .glitch { font-size: 3.5rem; }
    .rule-item { flex-direction: column; gap: 1rem; }
    .rule-number { font-size: 2rem; }
    .faction-card, .feat-card, .mod-card { min-width: unset; }
    .btn-lg { padding: 14px 28px; font-size: 0.9rem; }
}
