:root {
    --color-primary: #dc2626;
    --color-secondary: #7f1d1d;
    --color-light-red: #f50000;
    --bg-dark: #000;
    --glass-bg: rgb(6,6,6);
    --glass-border: rgba(220,38,38,0.25);
    --glass-shadow: rgba(220,38,38,0.15);

    --radius: 14px;
    --transition-speed: 0.25s;

    --gradient-primary: linear-gradient(90deg, #7f1d1d, #dc2626, #ff3b3b);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Segoe UI', Arial, sans-serif;
    color: var(--color-primary);
    background: var(--bg-dark);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Subtle animated background glow */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -3;
    pointer-events: none;
    background:
        radial-gradient(circle at center, rgba(220,38,38,0.12), transparent 60%),
        radial-gradient(2px 2px at 15% 20%, rgba(255,0,0,0.25), transparent),
        radial-gradient(2px 2px at 55% 40%, rgba(255,0,0,0.2), transparent),
        radial-gradient(1.5px 1.5px at 75% 75%, rgba(255,0,0,0.25), transparent);
    animation: slowPulse 8s ease-in-out infinite alternate,
               particlesDriftReverse 90s linear infinite;
}

@keyframes slowPulse {
    from { transform: scale(1); opacity: 0.4; }
    to { transform: scale(1.1); opacity: 0.7; }
}

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
    padding-right: 1em;
    border-bottom: 1px solid rgba(127,29,29,0.4);
    flex-wrap: wrap;
}

header img {
    height: 60px;
    transition: transform 0.3s ease;
    justify-self: anchor-center;
}

header img:hover {
    transform: scale(1.05);
}

img {
    justify-self: anchor-center;
}

nav a {
    margin-left: 20px;
    text-decoration: none;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--color-primary);
    transition: all var(--transition-speed) ease;
    text-shadow: 0 0 8px rgba(255,0,0,0.6);
}

nav a:hover {
    color: var(--color-light-red);
    text-shadow: 0 0 8px rgba(255,0,0,0.9);
}

/* Main */
main {
    flex-grow: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 4rem 2rem;
}

.container {
    max-width: 900px;
    width: 100%;
    text-align: left;
    padding: 3rem;
    border-radius: 2rem;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 0 40px var(--glass-shadow);
    animation: fadeIn 1s ease forwards;
}

.container2 {
    max-width: 900px;
    width: 100%;
    text-align: center;
    padding: 3rem;
    border-radius: 2rem;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 0 40px var(--glass-shadow);
    animation: fadeIn 1s ease forwards;
}

/* Animated separator */
.separator {
    width: 120px;
    height: 4px;
    margin: 2rem auto;
    border-radius: 10px;
    background: var(--gradient-primary);
    background-size: 200% 200%;
    animation: gradientMove 4s linear infinite;
}

@keyframes gradientMove {
    0% { background-position: 0% 50%; }
    100% { background-position: 100% 50%; }
}

.tagline {
    font-size: 1.125rem;
    margin-bottom: 1.5rem;
    color: var(--color-light-red);
    text-shadow: 0 0 8px rgba(255,0,0,0.6);
    text-align: center;
}

/* Neon Buttons */
.button-group {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.btn-primary, .btn-secondary {
    padding: 1rem 2.5rem;
    border-radius: var(--radius);
    text-decoration: none;
    text-transform: uppercase;
    font-weight: bold;
    transition: all var(--transition-speed) ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
}

.btn-primary {
    background: rgba(9, 9, 9);
    border: 1px solid rgba(245,0,0,0.4);
    color: var(--color-light-red);
    box-shadow: 0 0 10px rgba(245,0,0,0.4);
    width: 200px;
    justify-content: center;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow:
        0 0 10px rgba(255,0,0,0.7),
        0 0 25px rgba(255,0,0,0.6),
        0 0 50px rgba(255,0,0,0.4);
}

.btn-secondary {
    background: rgba(9, 9, 9);
    border: 1px solid rgba(245,0,0,0.4);
    color: var(--color-light-red);
    box-shadow: 0 0 10px rgba(245,0,0,0.4);
    width: 200px;
    justify-content: center;
}

.btn-secondary:hover {
    transform: translateY(-3px);
    box-shadow:
        0 0 10px rgba(255,0,0,0.7),
        0 0 25px rgba(255,0,0,0.6),
        0 0 50px rgba(255,0,0,0.4);
}

/* Features */
.features {
    border-top: 1px solid rgba(127,29,29,0.4);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2.5rem;
    max-width: 1100px;
    margin: auto;
    text-align: center;
}

.features h3 {
    color: var(--color-light-red);
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
    text-shadow: 0 0 8px rgba(255,0,0,0.6);
}

.features p {
    color: var(--color-light-red);
    text-shadow: 0 0 8px rgba(255,0,0,0.6);
}

/* Footer */
footer {
    padding: 1rem;
    text-align: center;
    font-size: 0.875rem;
    color: var(--color-secondary);
    border-top: 1px solid rgba(127,29,29,0.4);
    text-shadow: 0 0 8px rgba(255,0,0,0.6);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(25px);}
    to { opacity: 1; transform: translateY(0);}
}

/* Responsive */
@media (max-width: 768px) {
    header {
        justify-content: center;
        flex-direction: column;
        gap: 1rem;
    }

    .button-group {
        flex-direction: column;
        place-items: anchor-center;
    }
}

/* =========================
   Dense Particle Background
   Still Lightweight
========================= */

/* Far layer */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -3;

    background-image:
        radial-gradient(rgba(255, 0, 0, 0.25) 1px, transparent 1px),
        radial-gradient(rgba(255, 0, 0, 0.2) 1px, transparent 1px);

    background-size: 120px 120px, 200px 200px;
    background-position: 0 0, 50px 50px;

    animation: particlesDriftSlow 120s linear infinite;
    opacity: 0.35;
}

/* Near layer */
body::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -2;

    background-image:
        radial-gradient(rgba(255, 0, 0, 0.5) 1.5px, transparent 1.5px),
        radial-gradient(rgba(255, 0, 0, 0.4) 1.5px, transparent 1.5px);

    background-size: 80px 80px, 140px 140px;
    background-position: 0 0, 40px 40px;

    animation: particlesDrift 60s linear infinite;
    opacity: 0.5;
}

/* Movement */
@keyframes particlesDrift {
    from { transform: translateY(0); }
    to   { transform: translateY(-1000px); }
}

@keyframes particlesDriftSlow {
    from { transform: translateY(0); }
    to   { transform: translateY(800px); }
}

#particles {
    position: fixed;
    inset: 0;
    z-index: -5;
    pointer-events: none;
}

.server-header {
    height: 250px;
    transition: height 0.3s ease;
}

/* Mobile adjustment */
@media (max-width: 825px) {
    .server-header {
        height: 60px;
    }
}

/* =========================
   Rules Page Styling
========================= */

.rules-container {
    padding: 1rem;
    max-width: 900px;
}

.rules-header {
    text-align: center;
    margin-bottom: 2.5rem;
    text-shadow: 0 0 10px rgba(245,0,0,1);
}

.rules-header h1 {
    font-size: 2.5rem;
    color: #f50000;
    margin-bottom: 1rem;
}

.rules-header p {
    color: #e32424;
}

.rules-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: center;
}

.rule-card {
    display: flex;
    gap: 1rem;
    padding: 1.5rem;
    border-radius: 16px;
    background: rgb(6,6,6);
    border: 1px solid rgba(220,38,38,0.25);
    transition: 0.3s ease;
    width: 750px;
    height: 135px;
    align-items: center;
}

.rule-card:hover {
    background: rgba(40,0,0,0.85);
    transform: translateY(-4px);
    box-shadow: 0 0 25px rgba(255,0,0,0.4);
}

.rule-number {
    min-width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(127,29,29,0.8);
    color: #ff3b3b;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    box-shadow: 0 0 10px rgba(255,0,0,0.5);
}

.rule-content h3 {
    margin: 0 0 0.5rem 0;
    color: #e32424;
    text-shadow: 0 0 6px rgba(245,0,0,1);
    text-align: left;
}

.rule-content p {
    margin: 0;
    color: rgba(225, 35, 35, 1);
    line-height: 1.6;
}