:root {
    --bg-color: #050505;
    --text-main: #e0e0e0;
    --text-muted: #a0a0a0;

    /* Scroll-based Neon Color */
    --neon-color: #00ff00;

    /* Time-based Rainbow Color (for D20 & Text) */
    --time-color: #00ff00;

    --font-heading: 'Orbitron', sans-serif;
    --font-body: 'Rajdhani', sans-serif;

    --glass: rgba(255, 255, 255, 0.03);
    --border: 1px solid rgba(255, 255, 255, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    font-size: 1.25rem;
    overflow-x: hidden;
}

/* Ambient Glow Background */
.ambient-glow {
    position: fixed;
    top: 50%;
    left: 50%;
    width: 100vw;
    height: 100vh;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle at center, var(--neon-color), transparent 70%);
    opacity: 0.15;
    /* Subtle enough to not blind, bright enough to be visible */
    pointer-events: none;
    z-index: -1;
    transition: background 0.1s linear;
    /* Smooth transition handled by JS mostly, but this helps */
}

/* Grid Overlay */
body::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%),
        linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
    background-size: 100% 2px, 3px 100%;
    pointer-events: none;
    z-index: 1000;
    opacity: 0.4;
    /* Reduced opacity for subtlety */
}

.container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 2rem;
}

h1,
h2,
h3,
h4,
.logo {
    font-family: var(--font-heading);
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Navbar */
.navbar {
    padding: 2rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(5, 5, 5, 0.8);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 100;
}

@media (max-width: 768px) {
    .navbar {
        padding: 0.8rem 0;
    }
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    color: white;
    text-decoration: none;
    text-shadow: 0 0 10px var(--neon-color);
}

.cursor {
    animation: blink 1s infinite;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
    align-items: center;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
    font-size: 1.1rem;
}

/* Nav link hover removed */

.btn-primary {
    background: transparent;
    color: var(--time-color);
    border: 2px solid var(--time-color);
    /* Initial solid border */
    padding: 0.8rem 2rem;
    text-decoration: none;
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 700;
    transition: all 0.3s;
    box-shadow: 0 0 10px var(--time-color), inset 0 0 5px var(--time-color);

}

/* Pac-Man removed */
.btn-primary:hover {
    background: var(--time-color);
    color: black;
    box-shadow: 0 0 20px var(--time-color);
}

.btn-discord {
    background: #5865F2;
    /* Discord Blurple */
    color: white;
    border: 1px solid #5865F2;
    padding: 0.8rem 2rem;
    text-decoration: none;
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 700;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(88, 101, 242, 0.4);
}

.btn-discord {
    position: relative;
    /* For fireworks anchoring */
    overflow: visible;
    /* Let fireworks fly out */
}

/* Fireworks removed */
.btn-discord:hover {
    background: #4752c4;
    box-shadow: 0 4px 15px rgba(88, 101, 242, 0.4);
}

/* Hero */
.hero {
    padding: 3rem 0 4rem;
    text-align: center;
}

@media (max-width: 768px) {
    .hero {
        padding: 1.5rem 0 2.5rem;
    }
}

.hero-visual {
    margin-bottom: 1.25rem;
    position: relative;
    display: inline-block;
}

#d20-canvas {
    width: 240px;
    height: 240px;
    background-color: #000;
    /* Requested "glack bsvkground" */
    border-radius: 50%;
    /* Optional: make the container round or keep it square. I'll keep it square but maybe blend it. */
    background: radial-gradient(circle, #000 60%, transparent 100%);
    /* So it blends better? No, user said black background. */
    background: #000;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.8);
    /* Depth */
}

.hero-text h1 {
    font-size: 4rem;
    line-height: 1;
    margin-bottom: 1rem;
    color: white;
}

.hero-text h1 .highlight {
    color: var(--time-color);
    text-shadow: 0 0 20px var(--time-color);
}

.hero-text p {
    font-family: 'Courier New', monospace;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
}

/* Sections */
section {
    padding: 6rem 0;
}

.text-center {
    text-align: center;
    margin-bottom: 4rem;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: white;
    border-bottom: 2px solid var(--neon-color);
    display: inline-block;
    padding-bottom: 0.5rem;
}

.subtitle {
    font-family: var(--font-body);
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-top: 1rem;
}

/* Features */
.feature-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.feature-item {
    background: var(--glass);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 2rem;
    transition: transform 0.3s, border-color 0.3s;
    position: relative;
    overflow: hidden;
}

.feature-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--neon-color);
    opacity: 0.5;
}

.feature-item:hover {
    border-color: var(--neon-color);
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
}

.feature-item h3 {
    margin-bottom: 1rem;
    font-size: 1.25rem;
    color: white;
}

.feature-item p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* Events */
.events-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.event-card {
    background: rgba(10, 10, 10, 0.8);
    border: 1px solid var(--neon-color);
    transition: transform 0.3s;
    width: 100%;
}

.event-horizontal {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    padding: 2.5rem;
}

.event-horizontal .card-content {
    flex: 1.5;
    text-align: left;
    position: relative;
    z-index: 2;
}

.wireframe-canvas {
    max-width: 100%;
    height: auto;
    display: block;
}


.canvas-wrapper {
    flex: 0 0 200px;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wireframe-video {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}


.event-image-side {
    flex: 0 0 350px;
    height: 250px;
    overflow: hidden;
    border-radius: 4px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
}

.event-image-side img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-wrapper {
    height: 350px;
    background: #111;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--neon-color);
    border-bottom: 1px solid var(--neon-color);
    font-family: 'Courier New', monospace;
    letter-spacing: -1px;
}

.card-content {
    padding: 1.5rem;
}

.card-content h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.card-content p {
    color: var(--text-muted);
    font-size: 1rem;
}

/* Footer */
.footer {
    padding: 3rem 0;
    text-align: center;
    border-top: 1px solid var(--neon-color);
    margin-top: 4rem;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Gamer Decorations */
.gamer-decorations {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -2;
    /* Ensure it's behind everything */
    overflow: hidden;
}

.deco-icon {
    position: absolute;
    font-size: 2rem;
    color: var(--neon-color);
    opacity: 0.2;
    font-family: 'Courier New', monospace;
    animation: float 6s ease-in-out infinite;
    text-shadow: 0 0 5px var(--neon-color);
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-20px) rotate(10deg);
    }
}

/* Meeple Neon Centerpiece */
.meeple-container {
    text-align: center;
    border-color: var(--time-color);
    /* Override default border */
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.5), inset 0 0 20px rgba(0, 0, 0, 0.5);
}

.neon-meeple {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    display: block;
    filter: drop-shadow(0 0 5px var(--neon-color));
    transition: filter 0.3s;
}

.meeple-container:hover .neon-meeple {
    filter: drop-shadow(0 0 15px var(--neon-color));
}

.pulse-heart {
    animation: heartBeat 1.5s infinite;
    transform-origin: 50% 25%;
}

@keyframes heartBeat {
    0% {
        transform: scale(1);
    }

    14% {
        transform: scale(1.3);
    }

    28% {
        transform: scale(1);
    }

    42% {
        transform: scale(1.3);
    }

    70% {
        transform: scale(1);
    }
}

/* Pixel Corners Utility (Optional usage) */
.pixel-corners {
    clip-path: polygon(0 10px, 10px 10px, 10px 0,
            calc(100% - 10px) 0, calc(100% - 10px) 10px, 100% 10px,
            100% calc(100% - 10px), calc(100% - 10px) calc(100% - 10px), calc(100% - 10px) 100%,
            10px 100%, 10px calc(100% - 10px), 0 calc(100% - 10px));
}

/* Contact Info */
.contact-info {
    margin-top: 1rem;
    color: var(--text-muted);
}

.contact-info a {
    color: var(--neon-color);
    text-decoration: none;
    transition: all 0.3s;
}

.contact-info a:hover {
    text-shadow: 0 0 10px var(--neon-color);
    color: #fff;
}

/* Contact Box */
.contact-box {
    background: rgba(20, 20, 20, 0.8);
    border: 1px solid var(--neon-color);
    padding: 4rem 2rem;
    position: relative;
    overflow: hidden;
}

.contact-box::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, var(--neon-color) 0%, transparent 70%);
    opacity: 0.05;
    animation: rotate 20s linear infinite;
    pointer-events: none;
}

@keyframes rotate {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Hero Buttons */
.cta-group {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.btn-donate {
    background: transparent;
    color: var(--text-muted);
    border: 2px solid rgba(255, 255, 255, 0.15);
    padding: 0.8rem 2rem;
    text-decoration: none;
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 700;
    transition: all 0.3s;
    box-shadow: none;
}

.btn-donate:hover {
    border-color: #fff;
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    transform: translateY(-2px);
}

/* Mute Toggle Button */
.mute-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(10, 10, 10, 0.8);
    border: 2px solid var(--neon-color);
    box-shadow: 0 0 15px var(--neon-color), inset 0 0 10px var(--neon-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1001;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.mute-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 0 25px var(--neon-color), inset 0 0 15px var(--neon-color);
}

.mute-btn:active {
    transform: scale(0.95);
}

.mute-icon {
    font-size: 1.5rem;
    line-height: 1;
    filter: drop-shadow(0 0 5px var(--neon-color));
    transition: filter 0.3s ease;
}

.mute-btn.muted {
    border-color: var(--text-muted);
    box-shadow: none;
    opacity: 0.5;
}

.mute-btn.muted .mute-icon {
    filter: none;
}

/* --- MOBILE RESPONSIVENESS --- */

@media (max-width: 992px) {
    .hero-text h1 {
        font-size: 3.5rem;
    }
}

@media (max-width: 768px) {
    body {
        font-size: 1.1rem;
    }

    .container {
        padding: 0 1.5rem;
    }

    .navbar {
        padding: 0.5rem 0;
    }

    .nav-links {
        display: none;
        /* Simplification: many modern mobile sites hide links or use a burger. For now, let's keep it simple or stack them. */
    }

    .hero {
        padding: 6rem 0 4rem;
        min-height: 80vh;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .hero-visual {
        margin-bottom: 2rem;
        transform: scale(1);
    }

    .hero-text h1 {
        font-size: 2.8rem;
    }

    h2 {
        font-size: 2rem;
    }

    /* Event Cards Mobile Strategy */
    .event-horizontal {
        flex-direction: column;
        padding: 1.5rem;
        gap: 1.5rem;
        width: 100%;
        box-sizing: border-box;
    }

    .canvas-wrapper {
        flex: 0 0 auto;
        width: 100%;
        max-width: 300px;
        height: auto;
        aspect-ratio: 1/1;
        margin: 0 auto;
    }

    .event-image-side {
        display: none;
    }

    .card-content {
        padding: 0;
        text-align: center !important;
    }

    .card-content h3 {
        font-size: 1.5rem;
    }

    .feature-row {
        grid-template-columns: 1fr;
    }

    .mute-btn {
        bottom: 1rem;
        right: 1rem;
        width: 50px;
        height: 50px;
    }
}

@media (max-width: 480px) {
    .hero-text h1 {
        font-size: 2.2rem;
    }

    .cta-group {
        flex-direction: column;
        width: 100%;
    }

    .btn-discord,
    .btn-donate,
    .btn-primary {
        width: 100%;
        text-align: center;
    }

    .contact-box {
        padding: 2rem 1rem;
    }
}