/* --- Root Variables & Reset --- */
:root {
    --primary-color: #62be28; /* Homebrew logo green */
    --primary-hover: #4e9b1d;
    --accent-blue: #4ba3e3;   /* Homebrew logo sky blue */
    --bg-dark: #12161a;       /* Deep slate/charcoal background */
    --card-bg: #1a2229;       /* Lighter slate for contrast cards */
    --text-main: #f0f2f5;
    --text-muted: #a0aec0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    overflow-x: hidden;
}

/* --- Navigation Bar --- */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 8%;
    position: absolute;
    width: 100%;
    z-index: 10;
    background: linear-gradient(to bottom, rgba(0,0,0,0.7), transparent);
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 2px;
    color: var(--accent-blue); /* Left side text is blue */
}

.nav-logo span {
    color: var(--primary-color); /* Right side text is green */
}

.logo-img {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    object-fit: cover;
}

.nav-links {
    display: flex;
    list-style: none;
    align-items: center;
}

.nav-links li {
    margin-left: 30px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 600;
    transition: color 0.3s ease;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--primary-color);
}

.nav-links .btn-store {
    background-color: var(--primary-color);
    color: #000;
    padding: 8px 20px;
    border-radius: 5px;
}

.nav-links .btn-store:hover {
    background-color: var(--primary-hover);
    color: #000;
    box-shadow: 0 0 15px var(--primary-color);
}

/* --- Hero Section --- */
.hero {
    position: relative;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    /* Uses the updated background.png file */
    background: url('/rules/background.png') no-repeat center center/cover fixed;
}

/* Dark Overlay for Readability */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.45);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 20px;
}

.hero-logo-container {
    margin-bottom: 15px;
}

.hero-main-logo {
    width: 120px;
    height: 120px;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.5);
}

.server-title {
    font-size: 4.5rem;
    font-weight: 900;
    letter-spacing: 4px;
    margin-bottom: 10px;
    text-shadow: 0 4px 15px rgba(0,0,0,0.6);
    color: var(--accent-blue); /* Left side text blue */
}

.server-title span {
    color: var(--primary-color); /* Right side text green */
}

.server-tagline {
    font-size: 1.3rem;
    color: var(--text-main);
    margin-bottom: 25px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.8);
}

/* Status Widget */
.status-widget {
    display: inline-flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.6);
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 35px;
}

.status-dot {
    width: 10px;
    height: 10px;
    background-color: var(--primary-color);
    border-radius: 50%;
    margin-right: 10px;
    box-shadow: 0 0 8px var(--primary-color);
}

/* Buttons */
.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.btn {
    padding: 14px 30px;
    font-size: 1rem;
    font-weight: 700;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.primary-btn {
    background-color: var(--primary-color);
    color: #000;
}

.primary-btn:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(98, 190, 40, 0.4);
}

.secondary-btn {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    border: 1px solid rgba(255,255,255,0.2);
    backdrop-filter: blur(5px);
}

.secondary-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    border-color: var(--accent-blue);
    box-shadow: 0 6px 20px rgba(75, 163, 227, 0.2);
}

/* Copy Alert Popup */
.copy-alert {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: -50px;
    background: var(--accent-blue);
    color: #fff;
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: 700;
    opacity: 0;
    transition: opacity 0.3s, bottom 0.3s;
    pointer-events: none;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.copy-alert.show {
    opacity: 1;
    bottom: -30px;
}

/* --- Features Section --- */
.features {
    padding: 80px 8%;
    background-color: var(--bg-dark);
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: 2.5rem;
    font-weight: 800;
}

.divider {
    width: 60px;
    height: 4px;
    background-color: var(--primary-color);
    border: none;
    margin: 15px auto 0 auto;
    border-radius: 2px;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.feature-card {
    background-color: var(--card-bg);
    padding: 40px 30px;
    border-radius: 10px;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid rgba(255,255,255,0.03);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
    border-color: rgba(98, 190, 40, 0.2);
}

.icon-wrapper {
    font-size: 2.5rem;
    color: var(--accent-blue);
    margin-bottom: 20px;
}

.feature-card h3 {
    margin-bottom: 15px;
    font-size: 1.4rem;
}

.feature-card p {
    color: var(--text-muted);
    line-height: 1.6;
}

/* --- Footer --- */
.footer {
    text-align: center;
    padding: 40px;
    background-color: #0d1013;
    color: var(--text-muted);
    font-size: 0.9rem;
    border-top: 1px solid rgba(255,255,255,0.05);
}

/* --- Responsive Adjustments --- */
@media (max-width: 768px) {
    .navbar { padding: 20px 4%; }
    .nav-links { display: none; }
    .server-title { font-size: 3rem; }
    .hero-buttons { flex-direction: column; gap: 10px; }
}

/* --- Pretty Rules Page Styling --- */
.rules-page {
    background: var(--bg-dark);
}

.rules-hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 140px 8% 80px 8%;
    /* Reuses your beautiful background image */
    background: url('background.png') no-repeat center center/cover fixed;
}

/* Dark overlay matching the homepage style */
.rules-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(18, 22, 26, 0.65); /* slightly deeper overlay for text clarity */
    z-index: 1;
}

.rules-content-wrapper {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1100px;
}

.rules-hero .section-title {
    margin-bottom: 40px;
}

.rules-hero .section-title h2 {
    font-size: 3rem;
    font-weight: 900;
    letter-spacing: 2px;
    color: var(--text-main);
    text-shadow: 0 4px 10px rgba(0,0,0,0.5);
}

.rules-hero .subtitle {
    color: var(--text-main);
    margin-top: 10px;
    font-size: 1.1rem;
}

/* Glassmorphism Grid Layout */
.pretty-rules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 25px;
}

.pretty-rule-card {
    background: rgba(26, 34, 41, 0.75); /* Semi-transparent card background */
    backdrop-filter: blur(10px);        /* Blurs the background behind the card */
    -webkit-backdrop-filter: blur(10px);
    padding: 35px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.pretty-rule-card:hover {
    transform: translateY(-3px);
    border-color: var(--accent-blue);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

/* Big stylized rule numbers */
.rule-num {
    font-size: 2.5rem;
    font-weight: 900;
    color: rgba(75, 163, 227, 0.15); /* Soft glowing blue tint */
    position: absolute;
    top: 20px;
    right: 25px;
    font-family: monospace;
}

.pretty-rule-card h3 {
    font-size: 1.3rem;
    margin-bottom: 12px;
    color: var(--accent-blue);
    font-weight: 700;
    letter-spacing: 0.5px;
}

.pretty-rule-card p {
    color: var(--text-main);
    line-height: 1.6;
    font-size: 1rem;
    opacity: 0.9;
}

/* Responsive view for smaller screens */
@media (max-width: 768px) {
    .pretty-rules-grid {
        grid-template-columns: 1fr;
    }
    .rules-hero {
        padding: 120px 4% 60px 4%;
    }
}
.rules-hero .server-word {
    color: var(--accent-blue);
}

.rules-hero .rules-word {
    color: var(--primary-color);
}