:root {
    --accent: #ce422b; /* Rust sarkanā */
    --accent-glow: rgba(206, 66, 43, 0.4);
    --bg: #0a0a0a;
    --card-bg: rgba(255, 255, 255, 0.03);
    --border: rgba(255, 255, 255, 0.1);
}

* {
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background-color: var(--bg);
    color: white;
    font-family: 'Rajdhani', sans-serif;
    overflow-x: hidden;
    /* Svarīgi: paslēpjam īsto kursoru */
    cursor: none !important;
}

/* Three.js Kanvasa fons */
#three-canvas {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1;
    pointer-events: none;
}

.accent { color: var(--accent); }

/* --- NAVIGĀCIJA --- */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 10%;
    z-index: 100;
    background: linear-gradient(to bottom, rgba(0,0,0,0.8), transparent);
    backdrop-filter: blur(10px);
}

.logo {
    font-family: 'Bebas Neue', cursive;
    font-size: 2rem;
    letter-spacing: 2px;
}

.nav-links a {
    color: white;
    text-decoration: none;
    margin-left: 30px;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
    transition: 0.3s;
    cursor: none !important; /* Lai custom kursors strādātu */
}

.nav-links a:hover { color: var(--accent); }

.server-status {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    padding: 6px 12px;
    border-radius: 4px;
    border: 1px solid var(--border);
    font-weight: 700;
    font-size: 0.7rem; /* Mazāks teksts */
    letter-spacing: 1px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.7);
}

.pulse {
    width: 6px; /* Mazāks punkts */
    height: 6px;
    background: #2ecc71;
    border-radius: 50%;
    margin-right: 8px;
    box-shadow: 0 0 8px #2ecc71;
    animation: pulse-animation 2s infinite;
}

@keyframes pulse-animation {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 10px rgba(46, 204, 113, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(46, 204, 113, 0); }
}

/* --- PROGRESS BAR (Jaunums) --- */
.progress-container {
    position: fixed;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    height: 200px;
    width: 2px;
    background: rgba(255,255,255,0.1);
    z-index: 1000;
    border-radius: 10px;
}

.progress-bar {
    width: 100%;
    height: 0%;
    background: var(--accent);
    box-shadow: 0 0 15px var(--accent);
    transition: height 0.1s linear;
}

/* --- CUSTOM CURSOR (Jaunums) --- */
.cursor, .cursor-follower {
    position: fixed;
    border-radius: 50%;
    pointer-events: none;
    z-index: 10000;
    transform: translate(-50%, -50%);
}

.cursor {
    width: 6px;
    height: 6px;
    background-color: var(--accent);
}

.cursor-follower {
    width: 30px;
    height: 30px;
    border: 1px solid var(--accent);
    transition: transform 0.1s ease-out, width 0.3s, height 0.3s, background 0.3s;
}

.cursor-active {
    width: 60px;
    height: 60px;
    background: rgba(206, 66, 43, 0.15);
    border: 1px solid var(--accent);
}

/* --- GLITCH EFEKTS (Jaunums) --- */
.glitch {
    position: relative;
    display: inline-block;
}

.glitch::before, .glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: transparent;
    /* Nomainām clip pret caurspīdīgumu sākumā */
    opacity: 0;
    font-family: 'Bebas Neue', cursive;
}

.glitch:hover::before {
    left: 2px;
    /* Rozā/Sarkanā blāzma */
    text-shadow: 0 0 10px #ff00c1;
    filter: blur(2px);
    opacity: 0.8;
    animation: glitch-anim 0.2s infinite linear alternate-reverse;
}

.glitch:hover::after {
    left: -2px;
    /* Ciāna/Zilganā blāzma */
    text-shadow: 0 0 10px #00fff9;
    filter: blur(1.5px);
    opacity: 0.8;
    animation: glitch-anim2 0.2s infinite linear alternate-reverse;
}

/* Pārveidoti Keyframes, lai tie radītu vibrāciju un izplūdumu (fuzzy) */
@keyframes glitch-anim {
    0% { transform: translate(0); filter: blur(1px); opacity: 0.4; }
    25% { transform: translate(-2px, 1px); filter: blur(3px); opacity: 0.8; }
    50% { transform: translate(2px, -1px); filter: blur(2px); opacity: 0.6; }
    75% { transform: translate(-1px, -2px); filter: blur(4px); opacity: 0.9; }
    100% { transform: translate(1px, 2px); filter: blur(1px); opacity: 0.5; }
}

@keyframes glitch-anim2 {
    0% { transform: translate(0); filter: blur(2px); opacity: 0.6; }
    33% { transform: translate(2px, -2px); filter: blur(1px); opacity: 0.9; }
    66% { transform: translate(-2px, 2px); filter: blur(4px); opacity: 0.5; }
    100% { transform: translate(1px, -1px); filter: blur(2px); opacity: 0.8; }
}

/* --- SEKCIJAS UN SATURS --- */
.section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 100px 10%;
    position: relative;
    z-index: 2;
}

/* Animācija tagad notiek caur script.js un ScrollTrigger */
.content {
    max-width: 700px;
}

.align-right { margin-left: auto; text-align: right; }
.center { margin: 0 auto; text-align: center; }

.tag {
    font-size: 0.9rem;
    letter-spacing: 3px;
    color: var(--accent);
    margin-bottom: 15px;
    font-weight: 700;
}

h1 {
    font-family: 'Bebas Neue', cursive;
    font-size: clamp(3rem, 10vw, 6.5rem);
    line-height: 0.85;
    margin: 0;
}

p {
    font-size: 1.15rem;
    color: #bbb;
    margin-top: 25px;
    line-height: 1.6;
}

/* --- STATISTIKA UN SARAKSTI --- */
.stats {
    display: flex;
    gap: 40px;
    margin: 35px 0;
}

.stat-item span {
    font-weight: 700;
    color: var(--accent);
    font-size: 0.8rem;
    letter-spacing: 1px;
}

.feature-list {
    list-style: none;
    padding: 0;
    margin-top: 30px;
    display: inline-block;
    text-align: left;
}

.feature-list li {
    margin-bottom: 12px;
    font-size: 1.1rem;
    color: #ddd;
    border-left: 2px solid var(--accent);
    padding-left: 15px;
}

.grid-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 40px;
}

.grid-item {
    background: var(--card-bg);
    padding: 25px;
    border: 1px solid var(--border);
    border-radius: 4px;
    transition: 0.3s;
}

.grid-item:hover {
    border-color: var(--accent);
    background: rgba(255,255,255,0.05);
}

.grid-item h3 {
    margin: 0 0 10px 0;
    font-family: 'Bebas Neue';
    letter-spacing: 1px;
}

/* --- POGAS UN IP BLOKS --- */
.btn-primary, .btn-join, .btn-secondary {
    cursor: none !important;
    font-family: 'Bebas Neue';
    letter-spacing: 1px;
    transition: 0.3s;
    text-transform: uppercase;
}

.btn-primary, .btn-join {
    background: var(--accent);
    color: white;
    border: none;
    padding: 18px 45px;
    font-size: 1.4rem;
    margin-top: 20px;
}

.btn-primary:hover, .btn-join:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px var(--accent-glow);
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 1px solid white;
    padding: 18px 45px;
    font-size: 1.4rem;
    margin-top: 20px;
}

.btn-secondary:hover { background: white; color: black; }

.ip-display {
    background: rgba(255,255,255,0.05);
    border: 2px dashed var(--accent);
    padding: 20px;
    margin: 30px auto;
    display: inline-block;
    cursor: none !important;
    transition: 0.3s;
}

.ip-display:hover { background: rgba(206, 66, 43, 0.1); }

.ip-display span {
    display: block;
    font-family: 'Bebas Neue';
    font-size: 2.5rem;
    color: white;
}

.social-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

/* --- FOOTER UN INDICATORS --- */
.scroll-indicator {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    font-size: 0.7rem;
    letter-spacing: 5px;
    opacity: 0.5;
    font-weight: 700;
}

.footer {
    padding: 50px 10%;
    text-align: center;
    border-top: 1px solid var(--border);
    position: relative;
    z-index: 2;
    background: var(--bg);
}

.footer p { font-size: 0.8rem; opacity: 0.6; }

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    h1 { font-size: 4rem; }
    .nav-links { display: none; }
    .section { padding: 80px 5%; }
    .grid-features { grid-template-columns: 1fr; }
    .stats { flex-direction: column; gap: 15px; }
    .cursor, .cursor-follower { display: none; } /* Paslēpjam kursoru uz mobīlajiem */
    body { cursor: auto !important; }
}
/* Dinamiskā krāsa pulsam (tiek kontrolēta caur JS, bet šeit ir pamats) */
.pulse {
    transition: background 0.5s ease, box-shadow 0.5s ease;
}

.fuzzy-container {
    position: relative;
    display: inline-block;
    width: 100%;
    max-width: 800px;
}

#fuzzy-canvas {
    width: 100%;
    height: auto;
    cursor: pointer;
}

/* Paslēpjam parasto tekstu, ja darbojas Canvas */
.fuzzy-fallback {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

/* Definējam Fuzzy animāciju */
@keyframes fuzzy-glitch {
  0% {
    text-shadow: 0.05em 0 0 rgba(206, 66, 43, 0.75),
                -0.025em -0.05em 0 rgba(0, 255, 255, 0.75),
                0.025em 0.05em 0 rgba(255, 0, 255, 0.75);
  }
  14% {
    text-shadow: 0.05em 0 0 rgba(206, 66, 43, 0.75),
                -0.025em -0.05em 0 rgba(0, 255, 255, 0.75),
                0.025em 0.05em 0 rgba(255, 0, 255, 0.75);
  }
  15% {
    text-shadow: -0.05em -0.025em 0 rgba(206, 66, 43, 0.75),
                0.025em 0.025em 0 rgba(0, 255, 255, 0.75),
                -0.05em -0.05em 0 rgba(255, 0, 255, 0.75);
  }
  49% {
    text-shadow: -0.05em -0.025em 0 rgba(206, 66, 43, 0.75),
                0.025em 0.025em 0 rgba(0, 255, 255, 0.75),
                -0.05em -0.05em 0 rgba(255, 0, 255, 0.75);
  }
  50% {
    text-shadow: 0.025em 0.05em 0 rgba(206, 66, 43, 0.75),
                0.05em 0 0 rgba(0, 255, 255, 0.75),
                0 -0.05em 0 rgba(255, 0, 255, 0.75);
  }
  99% {
    text-shadow: 0.025em 0.05em 0 rgba(206, 66, 43, 0.75),
                0.05em 0 0 rgba(0, 255, 255, 0.75),
                0 -0.05em 0 rgba(255, 0, 255, 0.75);
  }
  100% {
    text-shadow: -0.025em 0 0 rgba(206, 66, 43, 0.75),
                -0.025em -0.025em 0 rgba(0, 255, 255, 0.75),
                -0.025em -0.05em 0 rgba(255, 0, 255, 0.75);
  }
}

/* Piemērojam efektu logo */
.logo {
    position: relative;
    cursor: pointer;
}

/* Efekts ieslēdzas uz hover (vai vari noņemt :hover, lai griežas visu laiku) */
.logo:hover {
    animation: fuzzy-glitch 500ms infinite;
}

/* Pārliecināmies, ka akcenta krāsa neietekmē ēnu */
.logo .accent {
    text-shadow: inherit;
}