/* IMPORTS */
@import url('https://fonts.googleapis.com/css2?family=Rajdhani:wght@300;500;700&family=Inter:wght@300;400;600&display=swap');

/* RESET & VARIABLES */
:root {
    --bg-dark: #050505;
    --bg-panel: #0f0f13;
    --primary: #7b2cbf; /* Deep Purple */
    --accent: #e0aaff; /* Light Neon Purple */
    --secondary: #4361ee; /* Electric Blue */
    --text-main: #ffffff;
    --text-muted: #94a1b2;
    --glass: rgba(15, 15, 19, 0.7);
    --glass-border: rgba(255, 255, 255, 0.08);
    --neon-shadow: 0 0 10px rgba(123, 44, 191, 0.5), 0 0 20px rgba(123, 44, 191, 0.3);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(67, 97, 238, 0.08), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(123, 44, 191, 0.08), transparent 25%);
}

h1, h2, h3, h4 {
    font-family: 'Rajdhani', sans-serif;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* UTILITIES & ANIMATIONS */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

@keyframes glowPulse {
    0% { box-shadow: 0 0 5px var(--primary); }
    50% { box-shadow: 0 0 20px var(--primary), 0 0 10px var(--secondary); }
    100% { box-shadow: 0 0 5px var(--primary); }
}

@keyframes slideInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes glitch {
    0% { transform: translate(0); }
    20% { transform: translate(-2px, 2px); }
    40% { transform: translate(-2px, -2px); }
    60% { transform: translate(2px, 2px); }
    80% { transform: translate(2px, -2px); }
    100% { transform: translate(0); }
}

/* NAVIGATION */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 20px 0;
    background: rgba(5, 5, 5, 0.8);
    backdrop-filter: blur(15px);
    z-index: 1000;
    border-bottom: 1px solid var(--glass-border);
}

.nav-flex {
    display: grid;
    /* 1fr (Left), auto (Center), 1fr (Right) ensures the middle is perfectly centered */
    grid-template-columns: 1fr auto 1fr; 
    align-items: center;
    height: 100%;
}

.logo {
    display: flex;
    align-items: center;
    /* Keeps logo strictly on the left */
    justify-self: start; 
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
    text-shadow: 0 0 10px var(--primary);
}

.logo span { color: var(--secondary); }

.nav-links {
    display: flex;
    gap: 30px;
    list-style: none;
    /* Keeps links strictly in the center */
    justify-self: center; 
    margin: 0;
}

.nav-btn-container {
    justify-self: end;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    transition: var(--transition);
    position: relative;
    font-family: 'Rajdhani', sans-serif;
    font-size: 1.1rem;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0%;
    height: 2px;
    background: var(--secondary);
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--text-main);
}

.nav-links a:hover::after {
    width: 100%;
}

.btn-cta {
    padding: 10px 25px;
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--accent);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border-radius: 4px;
    text-transform: uppercase;
    font-family: 'Rajdhani', sans-serif;
}

.btn-cta:hover {
    background: var(--primary);
    color: #fff;
    box-shadow: var(--neon-shadow);
}

/* HERO SECTION */
/* REPLACE YOUR EXISTING .hero CSS WITH THIS */

.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;

    /* THE BACKGROUND MAGIC */
    background: 
        /* Layer 1: The Dark Gradient Fade */
        linear-gradient(
            to bottom,
            rgba(5, 5, 5, 0.5) 0%,      /* Top: 50% darkness */
            rgba(5, 5, 5, 0.8) 60%,     /* Middle: 80% darkness */
            var(--bg-dark) 100%         /* Bottom: 100% match to body color */
        ),
        /* Layer 2: The Image (Replace 'bg.jpg' with your file) */
        url('background.png'); 
    
    background-size: cover;
    background-position: center center;
    background-attachment: fixed; /* Creates a cool parallax effect when scrolling */
}

.hero-content {
    z-index: 2;
    animation: slideInUp 1s ease-out;
}

.hero h1 {
    font-size: 5rem;
    line-height: 1;
    margin-bottom: 20px;
    text-shadow: 0 0 20px rgba(123, 44, 191, 0.4);
}

.glitch-text {
    position: relative;
}

.glitch-text::before,
.glitch-text::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.glitch-text::before {
    left: 2px;
    text-shadow: -1px 0 #ff00c1;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch 5s infinite linear alternate-reverse;
}

.glitch-text::after {
    left: -2px;
    text-shadow: -1px 0 #00fff9;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch 5s infinite linear alternate-reverse;
}

.hero p {
    font-size: 1.5rem;
    color: var(--text-muted);
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* RULES SECTION */
.section-title {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 60px;
    color: var(--text-main);
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--secondary);
    margin: 10px auto 0;
    box-shadow: 0 0 10px var(--secondary);
}

.rules-section {
    padding: 100px 0;
    position: relative;
}

.rules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.rule-card {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    padding: 30px;
    border-radius: 12px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.rule-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: var(--neon-shadow);
}

.rule-card h3 {
    color: var(--accent);
    margin-bottom: 15px;
    font-size: 1.4rem;
}

.rule-card p {
    color: var(--text-muted);
    line-height: 1.6;
}

.rule-number {
    position: absolute;
    top: -20px;
    right: -20px;
    font-size: 6rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.03);
    font-family: 'Rajdhani', sans-serif;
}

/* DEVLOG SECTION */
.devlog-section {
    padding: 100px 0;
    background: rgba(0,0,0,0.2);
}

.devlog-container {
    max-width: 800px;
    margin: 0 auto;
}

.devlog-entry {
    background: var(--bg-panel);
    border-left: 4px solid var(--secondary);
    padding: 25px;
    margin-bottom: 30px;
    position: relative;
    animation: slideInUp 0.5s ease-out;
}

.devlog-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 10px;
}

.devlog-date {
    font-family: 'Rajdhani';
    color: var(--secondary);
    font-weight: 700;
}

.devlog-version {
    background: rgba(67, 97, 238, 0.2);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    color: var(--secondary);
}

.devlog-content ul {
    list-style-position: inside;
    color: var(--text-muted);
}

.devlog-content li {
    margin-bottom: 8px;
}

/* COMMANDS PAGE SPECIFIC */
.commands-wrapper {
    padding-top: 150px;
    min-height: 100vh;
}

.cmd-search {
    width: 100%;
    padding: 15px 25px;
    background: var(--bg-panel);
    border: 1px solid var(--glass-border);
    color: white;
    font-family: 'Inter';
    font-size: 1.1rem;
    margin-bottom: 50px;
    border-radius: 8px;
    transition: var(--transition);
}

.cmd-search:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(123, 44, 191, 0.2);
}

.cmd-category {
    margin-bottom: 50px;
}

.cmd-category h2 {
    color: var(--accent);
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.cmd-table {
    width: 100%;
    border-collapse: collapse;
}

.cmd-table th {
    text-align: left;
    padding: 15px;
    color: var(--secondary);
    font-family: 'Rajdhani';
    font-size: 1.2rem;
}

.cmd-table td {
    padding: 15px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    color: var(--text-muted);
}

.cmd-table tr:hover td {
    background: rgba(123, 44, 191, 0.1);
    color: white;
}

.badge-admin {
    background: rgba(255, 59, 48, 0.2);
    color: #ff3b30;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.7rem;
    text-transform: uppercase;
}

.badge-user {
    background: rgba(48, 209, 88, 0.2);
    color: #30d158;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.7rem;
    text-transform: uppercase;
}

/* FOOTER */
footer {
    padding: 50px 0;
    text-align: center;
    border-top: 1px solid var(--glass-border);
    margin-top: 50px;
}

.discord-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #5865F2;
    color: white;
    padding: 12px 30px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.discord-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(88, 101, 242, 0.4);
}
/* --- NEW ADDITIONS FOR LOGO & FILTERS --- */

/* Logo Image Styling */
.nav-logo-img {
    height: 50px; /* Adjust based on your logo's aspect ratio */
    width: auto;
    margin-right: 15px;
    vertical-align: middle;
    filter: drop-shadow(0 0 5px var(--primary));
    transition: var(--transition);
}

.nav-logo-img:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 0 10px var(--secondary));
}

/* Command Filter Area */
.filter-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
    justify-content: center;
}

.filter-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-muted);
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 600;
    text-transform: uppercase;
    transition: var(--transition);
}

.filter-btn:hover, .filter-btn.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 0 15px rgba(123, 44, 191, 0.4);
    border-color: var(--primary);
}

/* New Permission Badges */
.badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    display: inline-block;
    min-width: 80px;
    text-align: center;
}

.badge-citizen { background: rgba(255, 255, 255, 0.1); color: #fff; border: 1px solid rgba(255,255,255,0.2); }
.badge-citizenplus { background: linear-gradient(45deg, #FFD700, #FFA500); color: #000; box-shadow: 0 0 5px #FFD700; }
.badge-leo { background: rgba(0, 122, 255, 0.2); color: #4facfe; border: 1px solid rgba(0, 122, 255, 0.4); }
.badge-gang { background: rgba(255, 59, 48, 0.2); color: #ff3b30; border: 1px solid rgba(255, 59, 48, 0.4); }
.badge-staff { background: rgba(170, 0, 255, 0.2); color: #e0aaff; border: 1px solid rgba(170, 0, 255, 0.4); }
.badge-train { background: rgba(255, 149, 0, 0.2); color: #ff9500; border: 1px solid rgba(255, 149, 0, 0.4); }

/* Hide categories if no rows constitute a match */
.cmd-category.hidden {
    display: none;
}

.nav-logo-img {
    height: 50px;
    width: auto;
    margin-right: 15px;
    vertical-align: middle;
    /* This smooths pixelated edges */
    image-rendering: -webkit-optimize-contrast; 
    /* Adds a slight rounded corner if the image is square */
    border-radius: 8px; 
    /* Smooths the shadow */
    box-shadow: 0 0 15px rgba(123, 44, 191, 0.3); 
    transition: var(--transition);
}