:root {
    --neon-cyan: #00f3ff;
    --neon-green: #0aff60;
    --neon-yellow: #ffee00;
    --bg-dark: #0b0c15;
    --glass-bg: rgba(11, 12, 21, 0.75);
}

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

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

#tsparticles { 
    position: fixed; 
    width: 100%; 
    height: 100%; 
    z-index: -1; 
}

/* ===== MAIN HEADER - Clickable Home Button ===== */
.main-header {
    height: 60px;
    background: #1a1a2a;
    color: white;
    display: flex;
    align-items: center;
    padding: 0 30px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    width: 100%;
    border-bottom: 1px solid rgba(0, 243, 255, 0.2);
    z-index: 1000;
}

.main-header:hover {
    background: #242438;
}

.main-header span {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: 2px;
    font-family: 'Orbitron', sans-serif;
    color: var(--neon-cyan);
    text-shadow: 0 0 10px rgba(0, 243, 255, 0.5);
}

.main-header span::after {
    content: '🏠';
    font-size: 16px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.main-header:hover span::after {
    opacity: 1;
}

.main-header::before {
    content: 'Go to Home';
    position: absolute;
    bottom: -30px;
    left: 30px;
    background: #1a1a2a;
    color: var(--neon-cyan);
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 12px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    white-space: nowrap;
    z-index: 1000;
    border: 1px solid rgba(0, 243, 255, 0.3);
}

.main-header:hover::before {
    opacity: 1;
}

.main-container { 
    max-width: 1000px; 
    margin: 20px auto 40px auto; 
    padding: 30px; 
    position: relative; 
    z-index: 10;
    flex: 1;
}

/* Glassmorphism Panels */
.glass-panel { 
    background: var(--glass-bg); 
    backdrop-filter: blur(15px); 
    border: 1px solid rgba(0, 243, 255, 0.3); 
    box-shadow: 0 0 30px rgba(0, 243, 255, 0.1); 
    border-radius: 20px; 
}

/* Dashboard Header */
.dashboard-header { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    padding: 30px 40px; 
    margin-bottom: 40px; 
}
.logo-area { display: flex; align-items: center; gap: 15px; color: var(--neon-cyan); text-shadow: 0 0 15px var(--neon-cyan); }
.logo-area h1 { font-family: 'Orbitron', sans-serif; font-size: 2rem; letter-spacing: 2px; }

.mood-analyzer { text-align: center; border: 2px dashed var(--neon-yellow); padding: 15px 30px; border-radius: 10px; background: rgba(255, 238, 0, 0.05); }
.mood-analyzer .label { display: block; color: var(--neon-yellow); font-family: 'Orbitron'; font-size: 0.9rem; margin-bottom: 5px; }
.mood-text { font-size: 1.8rem; font-weight: bold; color: white; text-shadow: 0 0 10px white; transition: 0.3s; }

.stats-container { text-align: right; }
.stat-box .label { font-size: 1rem; color: #aaa; letter-spacing: 2px; }
.stat-box .value { font-family: 'Orbitron', sans-serif; font-size: 2.5rem; color: var(--neon-green); text-shadow: 0 0 15px var(--neon-green); display: block; transition: 0.3s; }

/* Main Layout */
.games-layout { display: flex; flex-direction: column; gap: 50px; }
.massive-card { padding: 40px; }
.card-header { display: flex; align-items: center; margin-bottom: 10px; }
.card-header i { font-size: 2rem; color: var(--neon-cyan); }
.card-header h2 { font-family: 'Orbitron', sans-serif; font-size: 1.8rem; display: inline-block; margin-left: 15px; }
.subtitle { color: #aaa; font-size: 1.1rem; margin-top: 5px; margin-bottom: 25px; }

/* Global UI Elements */
.large-input { width: 100%; background: rgba(0,0,0,0.6); border: 1px solid #555; padding: 18px; color: white; font-family: 'Rajdhani', sans-serif; font-size: 1.2rem; border-radius: 8px; margin-bottom: 15px; transition: 0.3s; }
.large-input:focus { outline: none; border-color: var(--neon-cyan); box-shadow: 0 0 15px rgba(0, 243, 255, 0.3); }

.huge-btn { font-size: 1.2rem; padding: 18px; border-width: 2px; border-radius: 8px; margin-top: 10px; text-transform: uppercase; }
.neon-btn { width: 100%; background: transparent; color: var(--neon-cyan); border: 2px solid var(--neon-cyan); font-family: 'Orbitron', sans-serif; font-weight: bold; cursor: pointer; transition: 0.3s; }
.neon-btn:hover { background: var(--neon-cyan); color: black; box-shadow: 0 0 25px var(--neon-cyan); }

/* Updated Reroll Button Style (Fixes Layout Bug) */
.neon-btn-small { 
    background: transparent; 
    color: #aaa; 
    border: 1px solid #555; 
    padding: 12px; 
    font-size: 1.1rem; 
    cursor: pointer; 
    transition: 0.3s; 
    margin-top: 20px; 
    width: 100%; 
    border-radius: 8px; 
    display: flex; 
    justify-content: center;
    align-items: center;
    gap: 10px;
    font-family: 'Rajdhani', sans-serif;
}
.neon-btn-small:hover { border-color: var(--neon-yellow); color: var(--neon-yellow); box-shadow: 0 0 15px rgba(255, 238, 0, 0.2); }

/* --- GAME 1: ARCADE VIBE CATCHER --- */
.game-hud { text-align: center; font-family: 'Orbitron'; font-size: 1.5rem; margin-bottom: 15px; }
.arcade-grid { display: none; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 20px; max-width: 500px; margin-left: auto; margin-right: auto; }
.arcade-hole { height: 110px; background: rgba(0,0,0,0.4); border: 2px dashed #444; border-radius: 15px; display: flex; justify-content: center; align-items: center; position: relative; overflow: hidden; }
.vibe-orb { width: 90%; height: 90%; border-radius: 10px; display: flex; flex-direction: column; justify-content: center; align-items: center; cursor: pointer; font-family: 'Orbitron'; font-weight: bold; font-size: 1.1rem; color: white; animation: popIn 0.2s ease-out; transition: transform 0.1s; user-select: none; }
.vibe-orb:active { transform: scale(0.9); }
.orb-pos { background: rgba(10, 255, 96, 0.2); border: 2px solid var(--neon-green); box-shadow: inset 0 0 15px rgba(10, 255, 96, 0.4); text-shadow: 0 0 5px var(--neon-green); }
.orb-neg { background: rgba(255, 68, 68, 0.2); border: 2px solid #ff4444; box-shadow: inset 0 0 15px rgba(255, 68, 68, 0.4); text-shadow: 0 0 5px #ff4444; }
@keyframes popIn { 0% { transform: scale(0); opacity: 0; } 80% { transform: scale(1.1); } 100% { transform: scale(1); opacity: 1; } }

/* --- GAME 2: CORE CHARGER --- */
.charge-bar-bg { width: 100%; height: 8px; background: #222; border-radius: 4px; margin-bottom: 25px; margin-top: -10px; overflow: hidden; }
.charge-bar-fill { height: 100%; width: 0%; background: var(--neon-cyan); transition: width 0.3s, background 0.3s; box-shadow: 0 0 10px var(--neon-cyan); }
.charge-bar-fill.max { background: var(--neon-green); box-shadow: 0 0 15px var(--neon-green); }
.combo-display { font-family: 'Orbitron'; font-size: 1.5rem; color: var(--neon-yellow); text-align: center; margin-bottom: 15px; transition: 0.3s; font-weight: bold;}
.status-msg { text-align: center; margin-top: 15px; font-size: 1.2rem; font-weight: bold; min-height: 25px; }

/* --- GAME 3: RPG BOUNTIES --- */
.large-tasks .task-item { padding: 20px; font-size: 1.2rem; margin-bottom: 15px; background: rgba(255,255,255,0.04); border-radius: 8px; border-left: 4px solid transparent; display: flex; align-items: center; transition: 0.3s; }
.large-tasks .task-item:hover { border-left-color: var(--neon-cyan); background: rgba(255,255,255,0.08); }
.large-tasks .task-item.completed { opacity: 0.4; text-decoration: line-through; border-left-color: var(--neon-green); }

/* Custom Checkbox */
.cyber-checkbox input { display: none; }
.checkmark { height: 25px; width: 25px; background: transparent; border: 2px solid #888; display: inline-block; margin-right: 20px; cursor: pointer; border-radius: 5px; position: relative; }
.cyber-checkbox input:checked + .checkmark { border-color: var(--neon-green); background: var(--neon-green); box-shadow: 0 0 15px var(--neon-green); }
.cyber-checkbox input:checked + .checkmark::after { content: '✔'; color: black; position: absolute; top: 1px; left: 4px; font-size: 16px; font-weight: bold; }

/* Rarity System */
.quest-rarity { font-size: 0.9rem; padding: 4px 10px; border-radius: 10px; margin-left: auto; font-family: 'Orbitron'; font-weight: bold; text-transform: uppercase; }
.rarity-common { color: #aaa; border: 1px solid #aaa; }
.rarity-rare { color: #00f3ff; border: 1px solid #00f3ff; text-shadow: 0 0 5px #00f3ff; }
.rarity-epic { color: #d400ff; border: 1px solid #d400ff; text-shadow: 0 0 5px #d400ff; }
.rarity-legendary { color: #ffee00; border: 1px solid #ffee00; text-shadow: 0 0 10px #ffee00; background: rgba(255, 238, 0, 0.1); animation: pulseLegendary 2s infinite; }
@keyframes pulseLegendary { 0% { box-shadow: 0 0 5px rgba(255,238,0,0.2); } 50% { box-shadow: 0 0 15px rgba(255,238,0,0.6); } 100% { box-shadow: 0 0 5px rgba(255,238,0,0.2); } }

/* ===== FOOTER STYLES ===== */
.dashboard-footer {
    padding: 2.5rem 2rem 2rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    background: #1a1a2a;
    border-top: 1px solid rgba(0, 243, 255, 0.15);
    position: relative;
    z-index: 100;
    width: 100%;
    margin-top: auto;
}

.dashboard-footer p {
    margin: 10px 0;
    font-size: 1rem;
}

.dashboard-footer .made-with {
    color: rgba(255, 255, 255, 0.8);
    letter-spacing: 1px;
    font-size: 1rem;
    margin-bottom: 15px;
}

.dashboard-footer .made-with span {
    color: #ff6b9d;
    animation: pulse 2s infinite;
    display: inline-block;
}

.team-credits {
    margin: 20px auto;
    font-size: 1.1rem;
    font-weight: 400;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px 25px;
    color: var(--neon-cyan);
    border-top: 1px solid rgba(0, 243, 255, 0.2);
    border-bottom: 1px solid rgba(0, 243, 255, 0.2);
    padding: 20px 0;
    max-width: 800px;
}

.team-credits span {
    padding: 0 8px;
    transition: all 0.3s ease;
    cursor: default;
    position: relative;
    color: var(--neon-cyan);
    font-weight: 400;
    letter-spacing: 0.5px;
}

.team-credits span:hover {
    color: var(--neon-yellow);
    transform: translateY(-2px);
    text-shadow: 0 0 10px var(--neon-cyan);
}

.team-credits span::after {
    content: '•';
    position: absolute;
    right: -18px;
    color: rgba(255, 255, 255, 0.3);
    font-size: 16px;
    top: 50%;
    transform: translateY(-50%);
}

.team-credits span:last-child::after {
    display: none;
}

.copyright {
    font-size: 0.9rem !important;
    opacity: 0.6;
    margin-top: 20px !important;
    letter-spacing: 0.5px;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.1); }
}

/* --- POPUP MODALS --- */
.modal-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.8); z-index: 2000; justify-content: center; align-items: center; animation: fadeIn 0.3s; }
.modal-content { max-width: 500px; width: 90%; text-align: center; padding: 40px; border: 2px solid var(--neon-cyan); box-shadow: 0 0 50px rgba(0,243,255,0.3); border-radius: 20px; background: var(--glass-bg); backdrop-filter: blur(15px); }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* Responsive adjustments */
@media (max-width: 768px) {
    .main-header {
        padding: 0 20px;
    }
    .main-header span {
        font-size: 1.2rem;
    }
    .dashboard-header { flex-direction: column; gap: 20px; text-align: center; }
    .arcade-grid { grid-template-columns: repeat(2, 1fr); }
    .large-tasks .task-item { flex-direction: column; align-items: flex-start; gap: 10px; }
    .quest-rarity { margin-left: 0; }
    .team-credits {
        flex-direction: column;
        gap: 10px;
        padding: 15px 0;
    }
    .team-credits span::after {
        display: none;
    }
    .team-credits span {
        display: block;
        text-align: center;
    }
    .dashboard-footer {
        padding: 2rem 1rem 1.5rem;
    }
}

@media (max-width: 480px) {
    .main-header {
        padding: 0 15px;
    }
    .main-header span {
        font-size: 1rem;
    }
    .main-container {
        padding: 20px;
    }
}