/* --- VARIABLES --- */
:root {
    --bg-dark: #050505;
    --neon-green: #00ff9d; /* The Unity/Matrix Green */
    --neon-purple: #bd00ff;
    --grid-line: rgba(0, 255, 157, 0.15);
    --text-white: #ffffff;
    --text-muted: #8892b0;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-white);
    font-family: 'Rajdhani', sans-serif; /* Tech Font */
    overflow-x: hidden;
    margin: 0;
}

/* FONTS */
.orbitron { font-family: 'Orbitron', sans-serif; letter-spacing: 2px; }
.rajdhani-lg { font-size: 1.2rem; }

/* --- BACKGROUND GRID (TRON STYLE) --- */
.grid-floor {
    position: fixed;
    top: 50%; left: 0; width: 100%; height: 50%;
    background: 
        linear-gradient(transparent 50%, var(--bg-dark) 100%),
        linear-gradient(90deg, var(--grid-line) 1px, transparent 1px),
        linear-gradient(var(--grid-line) 1px, transparent 1px);
    background-size: 50px 50px;
    transform: perspective(500px) rotateX(60deg);
    z-index: -2;
    opacity: 0.5;
    animation: gridMove 20s linear infinite;
}

@keyframes gridMove { from { background-position: 0 0; } to { background-position: 0 1000px; } }

.scanline {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to bottom, transparent 50%, rgba(0, 255, 157, 0.02) 50%);
    background-size: 100% 4px;
    z-index: -1;
    pointer-events: none;
}

/* --- UTILS --- */
.text-neon { color: var(--neon-green); text-shadow: 0 0 10px var(--neon-green); }
.text-purple { color: var(--neon-purple); }
.text-gray { color: var(--text-muted); }

.bg-hud { background: rgba(0, 255, 157, 0.03); border: 1px solid rgba(0, 255, 157, 0.1); }
.bg-darker-panel { background: #0a0a0a; }
.border-y-neon { border-top: 1px solid rgba(0, 255, 157, 0.3); border-bottom: 1px solid rgba(0, 255, 157, 0.3); }
.border-end-neon { border-right: 1px solid rgba(0, 255, 157, 0.3); }
.border-neon { border: 1px solid var(--neon-green); }

@media (max-width: 768px) { .border-end-neon { border-right: none; border-bottom: 1px solid rgba(0,255,157,0.3); padding-bottom: 20px; } }

/* --- HERO --- */
.game-hero { padding: 100px 0; min-height: 90vh; display: flex; align-items: center; }
.badge-unity { border: 1px solid var(--neon-green); color: var(--neon-green); display: inline-block; padding: 5px 20px; font-family: 'Orbitron', sans-serif; margin-bottom: 20px; font-size: 0.8rem; clip-path: polygon(10% 0, 100% 0, 100% 80%, 90% 100%, 0 100%, 0 20%); background: rgba(0,255,157,0.1); }

/* Glitch Text Effect */
.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 red; clip: rect(24px, 550px, 90px, 0); animation: glitch-anim 3s infinite linear alternate-reverse; }
.glitch-text::after { left: -2px; text-shadow: -1px 0 blue; clip: rect(85px, 550px, 140px, 0); animation: glitch-anim 2s infinite linear alternate-reverse; }

@keyframes glitch-anim {
    0% { clip: rect(10px, 9999px, 30px, 0); }
    20% { clip: rect(80px, 9999px, 100px, 0); }
    100% { clip: rect(0, 0, 0, 0); }
}

.btn-neon {
    background: transparent; color: var(--neon-green); padding: 15px 40px; font-weight: 700; text-decoration: none; 
    border: 2px solid var(--neon-green); font-family: 'Orbitron', sans-serif; transition: 0.3s;
    clip-path: polygon(10% 0, 100% 0, 100% 70%, 90% 100%, 0 100%, 0 30%);
}
.btn-neon:hover { background: var(--neon-green); color: #000; box-shadow: 0 0 30px var(--neon-green); }

/* --- 3D CUBE ANIMATION --- */
.cube-container { width: 200px; height: 200px; perspective: 1000px; margin: 0 auto; }
.cube { width: 100%; height: 100%; position: relative; transform-style: preserve-3d; animation: spin 10s infinite linear; }
.face { position: absolute; width: 200px; height: 200px; border: 2px solid var(--neon-green); background: rgba(0,255,157,0.1); display: flex; align-items: center; justify-content: center; font-size: 2rem; font-weight: bold; color: white; font-family: 'Orbitron'; box-shadow: 0 0 20px rgba(0,255,157,0.2) inset; }
.front { transform: translateZ(100px); }
.back { transform: rotateY(180deg) translateZ(100px); }
.right { transform: rotateY(90deg) translateZ(100px); }
.left { transform: rotateY(-90deg) translateZ(100px); }
.top { transform: rotateX(90deg) translateZ(100px); }
.bottom { transform: rotateX(-90deg) translateZ(100px); }

@keyframes spin { from { transform: rotateX(0) rotateY(0); } to { transform: rotateX(360deg) rotateY(360deg); } }

/* --- PHYSICS LAB --- */
.lab-console { border: 1px solid #333; background: #000; box-shadow: 0 10px 50px rgba(0,255,157,0.2); }
.lab-header { background: #111; padding: 10px 20px; border-bottom: 1px solid #333; display: flex; justify-content: space-between; align-items: center; font-family: 'Orbitron'; color: #ccc; }
.bg-code { background: #080808; border-right: 1px solid #333; font-family: 'Consolas', monospace; color: #ccc; }
.bg-sim { background: #111; height: 400px; overflow: hidden; }

/* Syntax Highlighting */
.c-type { color: #569cd6; } .c-key { color: #c586c0; } .c-var { color: #9cdcfe; } .c-bool { color: #569cd6; }

/* Physics World */
.game-world { width: 100%; height: 100%; position: relative; border-bottom: 2px solid var(--neon-green); }
.game-object { position: absolute; background: transparent; border: 2px solid white; transition: top 0.5s ease-in; }
.box { width: 50px; height: 50px; left: 20%; top: 50px; border-color: var(--neon-green); box-shadow: 0 0 10px var(--neon-green); }
.circle { width: 50px; height: 50px; border-radius: 50%; left: 50%; top: 20px; border-color: var(--neon-purple); box-shadow: 0 0 10px var(--neon-purple); }
.triangle { width: 0; height: 0; border-left: 25px solid transparent; border-right: 25px solid transparent; border-bottom: 50px solid cyan; background: transparent !important; left: 80%; top: 80px; filter: drop-shadow(0 0 5px cyan); border-top: none; }

/* Gravity Classes */
.falling { top: 348px !important; transform: rotate(15deg); }
.floating { animation: float 3s infinite ease-in-out; }

@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-20px); } }

/* Switch */
.switch { position: relative; display: inline-block; width: 40px; height: 20px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #333; transition: .4s; border-radius: 20px; }
.slider:before { position: absolute; content: ""; height: 14px; width: 14px; left: 3px; bottom: 3px; background-color: white; transition: .4s; border-radius: 50%; }
input:checked + .slider { background-color: var(--neon-green); }
input:checked + .slider:before { transform: translateX(20px); }

/* --- QUEST CARDS --- */
.quest-card { background: rgba(255,255,255,0.05); padding: 20px; border-left: 4px solid var(--neon-purple); clip-path: polygon(0 0, 100% 0, 100% 100%, 10px 100%, 0 90%); }
.icon-quest { font-size: 1.5rem; color: var(--neon-purple); }
.loot-box { background: rgba(255,255,255,0.05); padding: 30px; border: 1px solid rgba(255,255,255,0.1); transition: 0.3s; }
.loot-box:hover { border-color: var(--neon-green); transform: scale(1.05); box-shadow: 0 0 20px rgba(0,255,157,0.2); }

.outcome-item { background: rgba(0,0,0,0.5); border: 1px solid #333; padding: 12px 20px; margin-bottom: 10px; display: block; clip-path: polygon(0 0, 100% 0, 95% 100%, 0% 100%); }