:root {
    /* Cosmic Theme (Violent Moons) */
    --bg-dark: #0a0a0c;
    --text-primary: #ededed;
    --text-secondary: #a0a0a0;
    --accent-color: #7b2cbf;
    /* Deep Purple */
    --accent-glow: #9d4edd;
    --button-bg: #E0E0E0;
    --button-text: #000;
    --glass-bg-dark: rgba(255, 255, 255, 0.03);
    --glass-border-dark: rgba(255, 255, 255, 0.05);

    /* Lunarith Theme */
    --lunarith-bg-top: #E6F2FF;
    --lunarith-bg-bottom: #89C4F4;
    --lunarith-primary: #C7A065;
    --lunarith-primary-hover: #b08d55;
    --lunarith-text-main: #1C3757;
    --lunarith-text-muted: rgba(28, 55, 87, 0.7);
    --glass-bg-light: rgba(255, 255, 255, 0.3);
    --glass-border-light: rgba(255, 255, 255, 0.6);
    --card-shadow: 0 4px 15px rgba(28, 55, 87, 0.1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: 'Montserrat', sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    line-height: 1.6;
}

/* Background Overlay for Cosmic Theme */
.background-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 30%, #1a1a2e 0%, #000000 70%);
    z-index: -1;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 1;
    /* Ensure content is above background */
}

/* Typography */
h1,
h2,
h3 {
    font-family: 'Cinzel', serif;
}

a {
    transition: all 0.2s ease;
}

/* Header */
.site-header {
    padding: 2rem 0;
    text-align: center;
}

.site-nav {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 1.5rem;
}

.site-nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.1em;
}

.site-nav a:hover,
.site-nav a.active {
    color: var(--accent-glow);
    text-shadow: 0 0 10px rgba(157, 78, 221, 0.5);
}

.logo-container img {
    max-width: 260px;
    filter: drop-shadow(0 0 15px rgba(157, 78, 221, 0.3));
}

/* Home Page Specifics */
.hero-section {
    text-align: center;
    padding: 4rem 0;
    animation: fadeIn 1.5s ease-out;
}

.tagline {
    font-size: 1.2rem;
    color: var(--text-secondary);
    letter-spacing: 0.2rem;
    text-transform: uppercase;
    margin: 1rem 0 3rem;
    background: linear-gradient(to right, #e0e0e0, #a0a0a0);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Cards */
.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.content-card {
    background: var(--glass-bg-dark);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border-dark);
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.content-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 40px rgba(157, 78, 221, 0.1);
    border-color: rgba(157, 78, 221, 0.3);
}

.content-card h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.content-card p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

/* Buttons */
.cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: var(--button-bg);
    color: var(--button-text);
    padding: 1rem 2rem;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.1);
}

.cta-button:hover {
    background-color: #fff;
    transform: scale(1.05);
    box-shadow: 0 0 25px rgba(255, 255, 255, 0.3);
}

.cta-button.secondary {
    background: transparent;
    border: 1px solid var(--text-secondary);
    color: var(--text-secondary);
    box-shadow: none;
}

.cta-button.secondary:hover {
    border-color: var(--text-primary);
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.arrow {
    margin-left: 0.5rem;
    transition: transform 0.3s;
}

.cta-button:hover .arrow {
    transform: translateX(5px);
}

/* Footer */
.site-footer {
    margin-top: auto;
    padding: 3rem 0;
    text-align: center;
    border-top: 1px solid var(--glass-border-dark);
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.footer-links {
    margin-bottom: 1rem;
}

.footer-links a {
    color: var(--text-secondary);
    margin: 0 1rem;
    text-decoration: none;
}

.footer-links a:hover {
    color: var(--text-primary);
}

/* --- Lunarith Page Specifics (Light Theme Adaptation) --- */
body.lunarith-page {
    background: linear-gradient(180deg, var(--lunarith-bg-top) 0%, var(--lunarith-bg-bottom) 100%);
    color: var(--lunarith-text-main);
}

.lunarith-page .background-overlay {
    display: none;
}

.lunarith-page .site-nav a {
    color: var(--lunarith-text-main);
}

.lunarith-page .site-nav a:hover {
    color: var(--lunarith-primary);
    text-shadow: none;
}

.lunarith-hero-image {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto 2rem;
    display: block;
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}

.lunarith-page h1 {
    color: var(--lunarith-text-main);
    font-size: 3rem;
    margin-bottom: 1rem;
}

.lunarith-page h1 span {
    display: block;
    color: var(--lunarith-primary);
    font-size: 0.6em;
    margin-top: 0.5rem;
    letter-spacing: 0.1em;
}

.lunarith-page p {
    color: var(--lunarith-text-muted);
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin: 4rem 0;
}

.feature-item {
    background: var(--glass-bg-light);
    border: 1px solid var(--glass-border-light);
    padding: 2rem;
    border-radius: 1.5rem;
    box-shadow: var(--card-shadow);
    text-align: center;
}

.feature-item h3 {
    color: var(--lunarith-text-main);
    margin-bottom: 0.5rem;
}

/* Leaderboard Table (Lunarith) */
.leaderboard-table {
    width: 100%;
    max-width: 800px;
    margin: 2rem auto;
    background: var(--glass-bg-light);
    border-radius: 1.5rem;
    border: 1px solid var(--glass-border-light);
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
    box-shadow: var(--card-shadow);
}

.leaderboard-table th {
    background: rgba(255, 255, 255, 0.5);
    color: var(--lunarith-text-main);
    padding: 1rem;
    font-weight: 700;
}

.leaderboard-table td {
    padding: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.5);
    color: var(--lunarith-text-main);
}

.rank-badge {
    display: inline-block;
    width: 24px;
    height: 24px;
    background: #ccc;
    color: white;
    border-radius: 50%;
    text-align: center;
    line-height: 24px;
    font-size: 0.8rem;
    font-weight: bold;
}

.rank-1 .rank-badge {
    background: #FFD700;
}

.rank-2 .rank-badge {
    background: #C0C0C0;
}

.rank-3 .rank-badge {
    background: #CD7F32;
}

/* Screenshot styling */
/* Screenshot styling */
.screenshot-gallery {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
    padding: 1rem;
}

.screenshot-img {
    height: auto;
    width: 280px;
    /* Fixed width to ensure consistent grid */
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease;
}

.screenshot-img:hover {
    transform: scale(1.02);
}

/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .site-nav {
        flex-direction: column;
        gap: 1rem;
    }

    .hero-section h1 {
        font-size: 2rem;
    }

    .lunarith-page h1 {
        font-size: 2.5rem;
    }
}