/* --- INTEGRATED CSS VARIABLES --- */
:root {
    /* Base Retro Colors */
    --bg-color: #0d1117; 
    --terminal-bg: #161b22;
    --neon-green: #2ea043; 
    --neon-purple: #bc8cff;
    --pixel-white: #c9d1d9;
    --retro-gray: #484f58;
    
    /* Dynamic Admin Variables (Controlled via settings.json) */
    --primary-color: #3b82f6; 
    --accent-color: #1e293b;

    /* Fonts */
    --font-heading: 'Press Start 2P', cursive;
    --font-body: 'VT323', monospace;
}

/* --- RESET & BASE --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-color);
    color: var(--pixel-white);
    font-family: var(--font-body);
    font-size: 20px;
    overflow-x: hidden;
    line-height: 1.6;
}

/* --- CRT SCANLINE EFFECT --- */
body::after {
    content: " ";
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.1) 50%), 
                linear-gradient(90deg, rgba(255, 0, 0, 0.03), rgba(0, 255, 0, 0.01), rgba(0, 0, 255, 0.03));
    z-index: 9999; /* Over everything but non-blocking */
    background-size: 100% 2px, 3px 100%;
    pointer-events: none;
}

/* --- UTILITIES --- */
h1, h2, h3 {
    font-family: var(--font-heading);
    text-transform: uppercase;
    line-height: 1.5;
    color: var(--primary-color);
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

.highlight { color: var(--neon-green); }

/* --- NETLIFY IDENTITY MENU STYLING --- */
/* Makes the login/signup buttons match the pixel vibe */
[data-netlify-identity-menu] {
    font-family: var(--font-body);
    font-size: 1.2rem;
}

[data-netlify-identity-menu] ul {
    list-style: none;
    display: flex;
    gap: 15px;
}

.netlify-identity-button {
    color: var(--neon-green) !important;
    text-transform: uppercase;
    background: none !important;
    border: 1px solid var(--neon-green) !important;
    padding: 5px 10px !important;
    cursor: pointer;
}

/* --- HEADER --- */
header {
    padding: 20px 0;
    border-bottom: 2px solid var(--retro-gray);
    position: sticky;
    top: 0;
    background: var(--bg-color);
    z-index: 100;
}

.nav-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* --- HERO SECTION --- */
.hero {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    text-align: center;
    padding: 40px 20px;
}

.pixel-avatar {
    width: 160px;
    height: 160px;
    object-fit: cover;
    border: 4px solid var(--primary-color);
    box-shadow: 8px 8px 0px var(--accent-color);
    margin-bottom: 30px;
    background-color: var(--terminal-bg);
    image-rendering: pixelated;
    border-radius: 4px;
}

.hero h1 {
    font-size: 2.2rem;
    margin-bottom: 10px;
    color: var(--pixel-white);
}

.hero h1 span#hero-heading {
    display: block;
    font-size: 0.8rem;
    color: var(--neon-purple);
    font-family: var(--font-body);
    letter-spacing: 4px;
    margin-bottom: 10px;
}

.typewriter {
    font-size: 1.6rem;
    color: var(--neon-green);
    min-height: 1.6em;
    margin: 15px 0;
}

.cursor {
    display: inline-block;
    background-color: var(--neon-green);
    width: 10px;
    height: 20px;
    animation: blink 1s infinite;
}

/* --- RPG STATS --- */
.rpg-card {
    background: var(--terminal-bg);
    border: 3px solid var(--primary-color);
    padding: 30px;
    margin-top: 50px;
    box-shadow: 10px 10px 0px rgba(0,0,0,0.5);
}

.stat-item {
    margin-bottom: 25px;
}

.stat-item label {
    display: flex;
    justify-content: space-between;
    font-family: var(--font-heading);
    font-size: 0.65rem;
    margin-bottom: 8px;
}

.xp-text { color: var(--neon-purple); }

.stat-bar-container {
    width: 100%;
    height: 16px;
    background: #000;
    border: 1px solid var(--retro-gray);
    padding: 2px;
}

.stat-bar {
    height: 100%;
    background: var(--neon-green);
    transition: width 1.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* --- PIXEL BUTTON --- */
.btn-pixel {
    font-family: var(--font-heading);
    font-size: 0.7rem;
    padding: 15px 30px;
    background: var(--bg-color);
    color: var(--neon-green);
    border: 2px solid var(--neon-green);
    box-shadow: 5px 5px 0px var(--retro-gray);
    cursor: pointer;
    text-transform: uppercase;
}

.btn-pixel:hover {
    background: var(--neon-green);
    color: var(--bg-color);
    box-shadow: 5px 5px 0px var(--neon-purple);
}

/* --- FOOTER --- */
footer {
    text-align: center;
    padding: 60px 20px;
    color: var(--retro-gray);
    font-family: var(--font-body);
}

/* --- ANIMATIONS --- */
@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

@media (max-width: 768px) {
    .hero h1 { font-size: 1.4rem; }
    .typewriter { font-size: 1.2rem; }
    .pixel-avatar { width: 120px; height: 120px; }
}
