/* =========================================
   1. VARIABLES & RESET (ARCADE DARK MODE)
   ========================================= */
:root {
    /* Neon Palette */
    --brand-blue: #3b82f6;       
    --brand-orange: #f97316;     
    --brand-green: #22c55e;      
    --brand-purple: #a855f7;
    
    /* Surfaces */
    --bg-body: #0f172a;          /* Deep Navy/Black */
    --card-bg: #1e293b;          /* Slate Dark */
    
    /* Cartoon Styling */
    --border-width: 3px;
    --border-color: #000000;     /* Hard black outlines */
    --shadow-color: #000000;
    --text-main: #ffffff;
    --text-muted: #94a3b8;
    
    --radius-card: 20px;
    --radius-btn: 50px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    overflow-x: hidden;
    width: 100%;
    /* subtle grid pattern */
    background-image: radial-gradient(#334155 1px, transparent 1px);
    background-size: 40px 40px;
    
    /* --- NEW FANCY CURSOR (Cyber Arrow) --- */
    cursor: url("data:image/svg+xml,%3Csvg width='32' height='32' viewBox='0 0 32 32' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M2 2L11.5 28L16.5 17.5L27.5 14L2 2Z' fill='url(%23paint0_linear)' stroke='black' stroke-width='2' stroke-linejoin='round'/%3E%3Cdefs%3E%3ClinearGradient id='paint0_linear' x1='2' y1='2' x2='21' y2='28' gradientUnits='userSpaceOnUse'%3E%3Cstop stop-color='%23F97316'/%3E%3Cstop offset='1' stop-color='%2322C55E'/%3E%3C/linearGradient%3E%3C/defs%3E%3C/svg%3E") 2 2, auto;
}

/* Hover State Cursor (Pointer) */
a, button, input, textarea, .pop-btn { 
    cursor: url("data:image/svg+xml,%3Csvg width='32' height='32' viewBox='0 0 32 32' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M2 2L11.5 28L16.5 17.5L27.5 14L2 2Z' fill='url(%23paint0_linear)' stroke='white' stroke-width='2' stroke-linejoin='round'/%3E%3Cdefs%3E%3ClinearGradient id='paint0_linear' x1='2' y1='2' x2='21' y2='28' gradientUnits='userSpaceOnUse'%3E%3Cstop stop-color='%233B82F6'/%3E%3Cstop offset='1' stop-color='%23A855F7'/%3E%3C/linearGradient%3E%3C/defs%3E%3C/svg%3E") 2 2, pointer;
}

h1, h2, h3, h4, .brand-name, .pop-btn { font-family: 'Fredoka', sans-serif; letter-spacing: 0.5px; }

/* =========================================
   2. ARCADE SCROLLBAR (Restored)
   ========================================= */
::-webkit-scrollbar {
    width: 16px;
}
::-webkit-scrollbar-track {
    background: #020617;
    border-left: 2px solid #334155;
}
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--brand-orange), var(--brand-green));
    border: 3px solid #020617; /* Creates a 'floating' look */
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--brand-blue), var(--brand-purple));
}

/* =========================================
   3. LAYOUT ENGINE
   ========================================= */
.container {
    width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px;
    position: relative; z-index: 2;
}
.flex-row { display: flex; align-items: center; justify-content: space-between; gap: 40px; }
.flex-col-center { display: flex; flex-direction: column; align-items: center; text-align: center; }

/* =========================================
   4. CARTOON UI COMPONENTS
   ========================================= */
/* The "Hard" Card Look */
.pop-card {
    background: var(--card-bg);
    border-radius: var(--radius-card);
    border: var(--border-width) solid var(--border-color);
    /* Hard shadow offset */
    box-shadow: 8px 8px 0px var(--shadow-color); 
    padding: 30px;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1); /* Bouncy */
}
.pop-card:hover {
    transform: translateY(-5px) translateX(-5px);
    box-shadow: 13px 13px 0px var(--brand-orange); /* Glows orange on hover */
    border-color: white;
}

/* The "Pressable" 3D Button */
.pop-btn {
    border: var(--border-width) solid var(--border-color);
    padding: 12px 30px;
    border-radius: var(--radius-btn);
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.1s;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
}

.btn-primary {
    background: var(--brand-blue);
    color: white;
    box-shadow: 4px 4px 0px var(--shadow-color);
}
.btn-primary:active {
    transform: translate(4px, 4px);
    box-shadow: 0px 0px 0px var(--shadow-color);
}

.btn-secondary {
    background: white;
    color: var(--bg-body);
    box-shadow: 4px 4px 0px var(--brand-blue);
}
.btn-secondary:active {
    transform: translate(4px, 4px);
    box-shadow: 0px 0px 0px transparent;
}

.btn-login {
    background: var(--brand-orange);
    color: white;
    box-shadow: 3px 3px 0px var(--shadow-color);
    font-size: 0.9rem; padding: 8px 20px;
}
.btn-login:active { transform: translate(3px, 3px); box-shadow: none; }

/* =========================================
   5. NAVIGATION
   ========================================= */
nav {
    width: 100%; height: 80px;
    background: rgba(15, 23, 42, 0.95);
    position: sticky; top: 0; z-index: 999;
    border-bottom: var(--border-width) solid var(--border-color);
    display: flex; align-items: center;
}
.nav-content { display: flex; justify-content: space-between; width: 100%; align-items: center; }
.nav-left { display: flex; align-items: center; gap: 12px; }
.logo-img { height: 80px; width: auto; filter: drop-shadow(2px 2px 0px rgba(255,255,255,0.2)); }
.brand-name { font-family: 'Fredoka', sans-serif; font-size: 3rem; font-weight: 700; color: white;
    -webkit-text-stroke: 1px black; text-shadow: 2px 2px 0px var(--brand-orange); }

/* =========================================
   6. HERO SECTION
   ========================================= */
.hero { padding: 80px 0 100px; position: relative; overflow: hidden; }
.hero-text { flex: 1; max-width: 600px; z-index: 2; }
.hero h1 {
    font-size: clamp(3rem, 5vw, 4.5rem); line-height: 1.1; margin-bottom: 20px; color: white;
    text-shadow: 3px 3px 0px var(--brand-blue); /* Hard text shadow */
}
.hero h1 span { text-shadow: 3px 3px 0px #cbd5e1; color: var(--brand-green); }
.hero p { font-size: 1.2rem; margin-bottom: 35px; color:#cbd5e1 ; line-height: 1.7; font-weight: 500; }
.cta-row { display: flex; gap: 20px; flex-wrap: wrap; }

.hero-visual { flex: 1; display: flex; justify-content: center; position: relative; z-index: 2; }

/* The Floating Game Card */
.hero-card-3d {
    background: var(--card-bg);
    border-radius: 30px;
    padding: 30px;
    width: 100%; max-width: 400px;
    border: var(--border-width) solid var(--border-color);
    box-shadow: 15px 15px 0px var(--brand-purple); /* Cartoon shadow */
    transform: rotate(-3deg);
    animation: float-cartoon 4s ease-in-out infinite;
    text-align: center;
    position: relative;
}
/* Badge on card */
.hero-card-3d::after {
    content: 'LVL 5'; position: absolute; top: -15px; right: -15px;
    background: var(--brand-orange); color: white; font-weight: bold; padding: 5px 15px;
    border: 3px solid black; border-radius: 50px; transform: rotate(10deg);
}

.xp-bar { width: 100%; height: 15px; background: #334155; border-radius: 10px; overflow: hidden; margin-top: 10px; border: 2px solid black; }
.xp-fill { width: 75%; height: 100%; background: var(--brand-green); }

@keyframes float-cartoon {
    0%, 100% { transform: rotate(-3deg) translateY(0); }
    50% { transform: rotate(-3deg) translateY(-15px); }
}

/* =========================================
   7. PARTNERS & FEATURES
   ========================================= */
.partner-section { padding: 30px 0 80px; position: relative; z-index: 2; }
.partner-strip { display: flex; gap: 50px; justify-content: center; flex-wrap: wrap; }
.partner-img { height: 100px; }

.features-section { padding: 80px 0; position: relative; z-index: 2; }
.section-title { font-size: 2.5rem; color: white; margin-bottom: 10px; text-shadow: 3px 3px 0px var(--brand-orange); }
.section-subtitle { color: #cbd5e1; font-size: 1.1rem; }

.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 40px; width: 100%; margin-top: 40px; }
.feature-card {
    text-align: center; padding: 40px 30px;
    background: #1e293b;
    border: var(--border-width) solid var(--border-color);
    border-radius: 20px;
    box-shadow: 8px 8px 0px rgba(0,0,0,0.5);
    transition: 0.2s;
}
.feature-card:hover { 
    transform: translate(-5px, -5px); 
    box-shadow: 13px 13px 0px var(--brand-blue); 
    background: #253248;
}
.f-icon { font-size: 3.5rem; margin-bottom: 20px; display: block; filter: drop-shadow(3px 3px 0px black); }
.feature-card h3 { color: white; margin-bottom: 10px; font-size: 1.4rem; }
.feature-card p { color: #94a3b8; line-height: 1.6; }

/* =========================================
   8. GAMIFICATION
   ========================================= */
.game-section {
    padding: 100px 0;
    background: #020617; /* Darker contrast */
    position: relative; z-index: 2;
    border-top: var(--border-width) solid var(--border-color);
    border-bottom: var(--border-width) solid var(--border-color);
}

.game-text h2 { font-size: 2.8rem; color: var(--brand-orange); margin-bottom: 30px; text-shadow: 2px 2px 0px black; }
.game-list li {
    display: flex; align-items: center; gap: 20px; 
    font-size: 1.2rem; margin-bottom: 25px;
    font-weight: 700; color: white;
}
.check-circle {
    width: 50px; height: 50px; background: var(--brand-green); color: black;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-weight: 900; font-size: 1.5rem; border: 3px solid black;
    box-shadow: 4px 4px 0px black;
}
.game-visual-box {
    flex: 1; height: 420px; background: #cbd5e1;
    border-radius: 30px; border: var(--border-width) solid var(--border-color);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    box-shadow: 12px 12px 0px black;
}

/* =========================================
   9. CONTACT
   ========================================= */
.contact-section { padding: 120px 0; background: var(--bg-body); position: relative; z-index: 2; }

.contact-card {
    display: grid; grid-template-columns: 1fr 1.2fr;
    background: #1e293b;
    border-radius: 30px; overflow: hidden;
    border: var(--border-width) solid var(--border-color);
    box-shadow: 15px 15px 0px black;
    width: 100%;
}

.contact-left {
    background: var(--brand-blue);
    padding: 60px; display: flex; flex-direction: column; justify-content: center;
    border-right: var(--border-width) solid black;
}
.contact-left h2 { color: white; font-size: 2.2rem; margin-bottom: 15px; text-shadow: 2px 2px 0px black; }
.contact-left p { color: white; font-weight: 500; }

.pill {
    background: white; padding: 12px 24px; border-radius: 50px;
    display: inline-flex; align-items: center; gap: 10px;
    font-weight: 700; color: black; margin-top: 25px;
    border: 3px solid black; text-decoration: none;
    box-shadow: 4px 4px 0px black; transition: 0.2s; width: fit-content;
}
.pill:hover { transform: translate(2px, 2px); box-shadow: 2px 2px 0px black; }

.contact-right { padding: 60px; background: #fff; } /* White form for contrast */

.form-group { margin-bottom: 25px; }
.sharp-input {
    width: 100%; padding: 16px 20px;
    border: 3px solid #cbd5e1;
    border-radius: 15px;
    font-size: 1rem; font-family: 'Poppins', sans-serif; font-weight: 600;
    transition: 0.2s;
    background: #f1f5f9; color: #334155;
}
.sharp-input:focus {
    outline: none; border-color: var(--brand-blue);
    background: white;
    box-shadow: 4px 4px 0px var(--brand-blue);
}
.sharp-label { display: block; margin-bottom: 10px; font-weight: 700; color: #334155; font-size: 0.9rem; text-transform: uppercase; }
.status-text { text-align: center; margin-top: 20px; font-weight: bold; color: var(--brand-green); }

/* =========================================
   10. FOOTER (Updated with ServeSmart text)
   ========================================= */
footer { 
    background: #020617; color: #cbd5e1; padding: 60px 0 40px; 
    text-align: center; border-top: var(--border-width) solid var(--border-color); position: relative; z-index: 2;
}
.footer-brand-box {
    display: flex; align-items: center; justify-content: center; gap: 15px; margin-bottom: 20px;
}
.footer-brand-text {
    font-family: 'Fredoka', sans-serif; font-size: 1.8rem; font-weight: 700; color: white;
    -webkit-text-stroke: 1px black; text-shadow: 2px 2px 0px var(--brand-orange);
}
.footer-links a { color: #94a3b8; margin: 0 15px; text-decoration: none; font-weight: 600; transition: 0.3s; }
.footer-links a:hover { color: var(--brand-orange); }
.powered-by { margin-top: 30px; font-size: 0.85rem; font-weight: 500; }
.powered-by a { color: var(--brand-green); text-decoration: none; }

/* =========================================
   11. ANIMATED PARTICLES (Fixed)
   ========================================= */
.particle-container { 
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; 
    z-index: 9999; /* Maximum layer to ensure clicks register */
    pointer-events: none; 
}

.particle { 
    position: absolute; 
    opacity: 0.8; 
    pointer-events: auto; /* Crucial: Allows clicking */
    cursor: crosshair; 
    /* Animation handled by CSS, stopped by JS on click */
    animation: float-particle 30s linear infinite; 
    transition: transform 0.1s, opacity 0.1s;
    /* Add a transparent border to increase clickable area without changing visual size */
    border: 10px solid transparent; 
    background-clip: padding-box;
}

/* EXPLOSION STATE */
.particle.popped {
    /* Force override of movement */
    animation: none !important; 
    transition: none !important;
    
    /* Explosion Visuals */
    transform: scale(5) rotate(45deg) !important; 
    opacity: 0 !important;
    pointer-events: none; 
}

/* Shapes */
.p-circle { border-radius: 50%; }
.p-square { border-radius: 2px; }
/* Triangle fix: Reset transparent border for shape */
.p-tri { 
    border: none; 
    width: 0 !important; height: 0 !important; background: transparent !important;
    border-left: 10px solid transparent; 
    border-right: 10px solid transparent; 
    border-bottom: 20px solid; 
}

@keyframes float-particle {
    0% { transform: translateY(110vh) rotate(0deg); }
    100% { transform: translateY(-20vh) rotate(360deg); }
}

/* =========================================
   12. GAME HUD (Hidden Easter Egg)
   ========================================= */
.game-hud {
    position: fixed; bottom: 20px; left: 20px; 
    z-index: 10000; /* Above particles */
    display: flex; align-items: center; gap: 15px;
    background: rgba(15, 23, 42, 0.95);
    padding: 10px 25px; border-radius: 50px;
    border: 2px solid var(--brand-blue);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.5);
    backdrop-filter: blur(10px);
    
    /* Hidden State */
    opacity: 0;
    visibility: hidden; /* Ensures it doesn't block clicks when hidden */
    transform: translateY(50px) scale(0.8);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Visible State */
.game-hud.visible {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) scale(1) !important;
}

.score-label {
    color: #94a3b8; font-size: 0.7rem; font-weight: 800; text-transform: uppercase; letter-spacing: 1px; display: block;
}

#score-val {
    color: var(--brand-orange); font-size: 1.5rem; font-weight: 700; font-family: 'Courier New', monospace;
    text-shadow: 0 0 10px var(--brand-orange); line-height: 1;
}

.reset-btn {
    background: transparent; border: 2px solid #ef4444; color: #ef4444;
    width: 35px; height: 35px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: 0.2s; font-size: 1.2rem; font-weight: bold;
}
.reset-btn:hover { background: #ef4444; color: white; transform: rotate(90deg); }
/* =========================================
   13. MOBILE
   ========================================= */
@media (max-width: 900px) {
    .flex-row { flex-direction: column; text-align: center; }
    .hero-text { padding-right: 0; margin-bottom: 60px; }
    .cta-row { justify-content: center; }
    .contact-card { grid-template-columns: 1fr; }
    .contact-left { border-right: none; border-bottom: 3px solid black; padding: 40px 30px; }
}

@media (max-width: 600px) {
    .hero h1 { font-size: 2.5rem; }
    .hero-card-3d { transform: rotate(0); animation: none; }
    .cta-row { flex-direction: column; width: 100%; }
    .cta-row .pop-btn { width: 100%; }
}