/* ============================================================
   1. GLOBAL VARIABLES & RESET
   ============================================================ */
:root {
    /* Login & Shared Variables */
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --bg-gradient: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    --glass-bg: rgba(255, 255, 255, 0.95);
    --text-main: #1e293b;
    --text-muted: #64748b;
    --error: #ef4444;

    /* SkillSphere Specific Variables */
    --primary-light: #eff6ff;
    --secondary: #64748b;
    --success: #10b981;
    --math: #0ea5e9;
    --ela: #ec4899;
    --science: #8b5cf6;
    --sidebar-bg: #1e293b;
    --bg-light: #f8fafc;
    --white: #ffffff;
    --border: #e2e8f0;
    --nav-pill: #f1f5f9;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
    --bg-main: #0f172a;
    --bg-card: #1e293b;
    --bg-sidebar: #020617;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border: #334155;
    --nav-pill: #1e293b;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Inter', 'Poppins', sans-serif; transition: background 0.3s, color 0.3s; }

/* ============================================================
   2. LOGIN PAGE (DEFAULT STYLES)
   ============================================================ */
body { /* This default applies to the root index.html (Login) */
    background: var(--bg-gradient);
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    color: var(--text-main);
    overflow: hidden;
}

.login-card {
    background: var(--glass-bg);
    width: 100%; max-width: 400px; padding: 40px;
    border-radius: 28px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    text-align: center; border: 1px solid rgba(255, 255, 255, 0.3);
    animation: slideUp 0.5s ease-out;
}

.logo { font-size: 24px; font-weight: 800; letter-spacing: -1px; }
.logo span { color: var(--primary); }
h2 { font-size: 1.25rem; color: var(--text-muted); margin-bottom: 30px; font-weight: 500; }
.input-group { text-align: left; margin-bottom: 20px; }
.input-group label { display: block; font-size: 14px; font-weight: 600; color: var(--text-main); margin-bottom: 8px; margin-left: 4px; }
.input-group input { width: 100%; padding: 14px 16px; border-radius: 14px; border: 1.5px solid #e2e8f0; background: #f8fafc; font-size: 16px; transition: all 0.2s ease; }
.input-group input:focus { outline: none; border-color: var(--primary); background: #fff; box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1); }
.login-btn { width: 100%; padding: 14px; background: var(--primary); color: white; border: none; border-radius: 14px; font-size: 16px; font-weight: 600; cursor: pointer; transition: all 0.2s ease; margin-top: 10px; }
.login-btn:hover { background: var(--primary-hover); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2); }
.auth-footer { margin-top: 25px; font-size: 14px; color: var(--text-muted); }
.auth-footer a { color: var(--primary); text-decoration: none; font-weight: 600; }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* ============================================================
   3. LOADING SCREEN
   ============================================================ */
body.loading-page {
  margin: 0; height: 100vh;
  display: flex; justify-content: center; align-items: center;
  background: #000000 !important; color: #eaeaea;
}

.loading-page .loader-overlay {
  position: absolute; width: 100%; height: 100%;
  background: linear-gradient(135deg, rgba(49, 49, 49, 0.7), rgba(32, 32, 32, 0.4));
  background-size: 200% 200%; filter: blur(100px);
  animation: overlayMove 10s infinite alternate ease-in-out; z-index: 0; opacity: 0.35;
}
@keyframes overlayMove { 0% { background-position: 0% 50%; } 100% { background-position: 100% 50%; } }

.loading-page .loader-container {
  position: relative; text-align: center; z-index: 5;
  animation: fadeIn 1.5s ease forwards; opacity: 0; transform: translateY(20px);
}
.loading-page .fade-out { opacity: 0; transform: scale(1.05); transition: all 1.5s ease; }
.loading-page .load-text {
  font-size: 22px; letter-spacing: 1px; margin-top: 30px; color: #fafafa;
  text-shadow: 0 0 10px rgba(255,255,255,0.3); animation: floatText 3s ease-in-out infinite;
}
.loading-page .load-text span { color: #ffffff; text-shadow: 0 0 25px rgba(255,255,255,0.6); }
@keyframes floatText { 0%, 100% { transform: translateY(0); opacity: 1; } 50% { transform: translateY(-6px); opacity: 0.9; } }
.loading-page .progress-bar {
  width: 260px; height: 10px; background-color: rgba(255, 255, 255, 0.08);
  border-radius: 15px; overflow: hidden; margin: 25px auto 0; box-shadow: 0 0 12px rgba(255, 255, 255, 0.15);
}
.loading-page .progress {
  height: 100%; width: 0%; background: linear-gradient(135deg, #303030, rgb(36, 36, 36), #1f1f1f);
  border-radius: 15px; animation: loading 4s ease-in-out forwards; box-shadow: 0 0 20px rgba(20, 20, 20, 0.25);
}
@keyframes loading { 0% { width: 0%; } 50% { width: 80%; } 100% { width: 100%; } }
.loading-page #particles { position: absolute; width: 100%; height: 100%; top: 0; left: 0; z-index: 1; pointer-events: none; }
@keyframes fadeIn { to { opacity: 1; transform: translateY(0); } }

/* ============================================================
   4. SKILLSPHERE DASHBOARD
   ============================================================ */
body.skills-page {
    background: var(--bg-light); color: var(--text-main);
    display: block; /* Override center flex */
    height: 100vh; padding: 0; overflow: hidden;
}

/* Layout */
.skills-page .app-container { display: flex; height: 100vh; width: 100vw; }
.skills-page .main-layout { flex: 1; display: flex; flex-direction: column; overflow-y: auto; }

/* Sidebar */
.skills-page .sidebar {
    width: 260px;
    background: var(--sidebar-bg);
    color: white;
    display: flex;
    flex-direction: column;
    padding: 24px 0;
 }
.skills-page .sidebar-header { padding: 0 24px 32px; }
.skills-page .sidebar-nav { flex: 1; padding: 0 12px; }
.skills-page .sidebar-footer { padding: 20px; border-top: 1px solid rgba(255,255,255,0.1); }

/* Sidebar Buttons */
.skills-page .nav-btn {
    width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px 16px;
    background: transparent; border: none; color: #94a3b8; font-size: 15px; font-weight: 500;
    border-radius: 8px; cursor: pointer; transition: var(--transition); margin-bottom: 4px;
}
.skills-page .nav-btn i { font-size: 18px; width: 24px; }
.skills-page .nav-btn:hover { background: rgba(255,255,255,0.05); color: white; }
.skills-page .nav-btn.active { background: var(--primary); color: white; }
.skills-page .streak-mini { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; color: #facc15; }
.skills-page .streak-label { font-size: 11px; color: #94a3b8; text-transform: uppercase; }
.skills-page .streak-count { font-weight: 700; }
.skills-page .btn-logout { background: transparent; border: 1px solid #475569; color: white; width: 100%; padding: 8px; border-radius: 6px; cursor: pointer; }

/* Dashboard Content */
.skills-page .top-bar { height: 70px; background: var(--white); border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; padding: 0 40px; position: sticky; top: 0; z-index: 10; }
.skills-page .search-container { background: #f1f5f9; padding: 8px 16px; border-radius: 20px; width: 400px; display: flex; align-items: center; gap: 10px; }
.skills-page .search-container input { background: transparent; border: none; outline: none; width: 100%; font-size: 14px; }
.skills-page .top-actions { display: flex; align-items: center; gap: 24px; }
.skills-page .notification-bell { position: relative; font-size: 20px; color: var(--secondary); cursor: pointer; }
.skills-page .notify-badge { position: absolute; top: -5px; right: -5px; background: #ef4444; color: white; font-size: 10px; padding: 2px 5px; border-radius: 10px; }
.skills-page .user-profile-pill { display: flex; align-items: center; gap: 10px; cursor: pointer; background: #f8fafc; padding: 6px 12px; border-radius: 20px; border: 1px solid var(--border); }
.skills-page .avatar-circle { width: 30px; height: 30px; background: var(--primary); color: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: bold; }

.skills-page .view-content { display: none; padding: 40px; animation: fadeIn 0.4s ease; }
.skills-page .view-content.active { display: block; }
.skills-page .view-header { margin-bottom: 32px; }
.skills-page .view-header h1 { font-size: 32px; font-weight: 800; margin-bottom: 8px; }
.skills-page .view-header p { color: var(--secondary); font-size: 16px; }

/* Dashboard Grids & Cards */
.skills-page .grade-scroller { display: flex; gap: 10px; margin-bottom: 32px; overflow-x: auto; padding-bottom: 8px; }
.skills-page .grade-chip { padding: 8px 18px; border-radius: 20px; border: 1px solid var(--border); background: white; white-space: nowrap; cursor: pointer; font-weight: 600; font-size: 14px; transition: var(--transition); }
.skills-page .grade-chip:hover { border-color: var(--primary); color: var(--primary); }
.skills-page .grade-chip.active { background: var(--primary); color: white; border-color: var(--primary); }

.skills-page .dashboard-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.skills-page .grid-span-2 { grid-column: span 2; }
.section-title { font-size: 20px; margin-bottom: 20px; }
.skills-page .rec-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.skills-page .rec-card { background: white; padding: 24px; border-radius: 16px; border: 1px solid var(--border); }
.skills-page .tag { font-size: 10px; font-weight: 800; padding: 4px 8px; border-radius: 4px; margin-bottom: 12px; display: inline-block; }
.skills-page .tag.math { background: #e0f2fe; color: var(--math); }
.skills-page .tag.ela { background: #fdf2f8; color: var(--ela); }

.skills-page .subject-row { grid-column: span 3; display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.skills-page .subject-card { background: white; padding: 24px; border-radius: 16px; border-left: 6px solid #ccc; border: 1px solid var(--border); }
.skills-page .subject-card.math { border-left-color: var(--math); }
.skills-page .subject-card.ela { border-left-color: var(--ela); }
.skills-page .card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.skills-page .card-head i { font-size: 24px; color: var(--secondary); }

.skills-page .skill-list { margin-bottom: 20px; }
.skills-page .skill-item { padding: 10px 0; border-bottom: 1px solid #f1f5f9; font-size: 14px; cursor: pointer; transition: 0.2s; }
.skills-page .skill-item span { font-weight: bold; color: var(--secondary); margin-right: 10px; }
.skills-page .skill-item:hover { color: var(--primary); padding-left: 5px; }

.skills-page .btn-primary { background: var(--primary); color: white; border: none; padding: 10px 20px; border-radius: 8px; font-weight: 600; cursor: pointer; margin-top: 15px; }
.skills-page .btn-text { background: transparent; border: none; color: var(--primary); font-weight: 700; cursor: pointer; }

.skills-page .stats-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 30px; }
.skills-page .stat-card { background: white; padding: 24px; border-radius: 16px; border: 1px solid var(--border); text-align: center; }
.skills-page .stat-card h2 { font-size: 32px; color: var(--primary); }
.skills-page .mock-chart { height: 200px; display: flex; align-items: flex-end; justify-content: space-around; background: white; padding: 20px; border-radius: 16px; }
.skills-page .bar { width: 40px; background: var(--primary); border-radius: 4px 4px 0 0; position: relative; }
.skills-page .bar span { position: absolute; bottom: -25px; left: 50%; transform: translateX(-50%); font-size: 12px; color: var(--secondary); }
.skills-page .badge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 20px; }
.skills-page .badge-item { background: white; padding: 20px; border-radius: 16px; text-align: center; border: 1px solid var(--border); transition: var(--transition); }
.skills-page .badge-item.locked { opacity: 0.4; filter: grayscale(1); }
.skills-page .badge-item i { font-size: 40px; margin-bottom: 10px; color: #facc15; }

.skills-page .modal { display: none; position: fixed; z-index: 2000; left: 0; top: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); backdrop-filter: blur(4px); }
.skills-page .modal-content { background: white; margin: 10% auto; padding: 30px; width: 500px; border-radius: 20px; position: relative; }
.skills-page .close-modal { position: absolute; right: 20px; top: 15px; font-size: 28px; cursor: pointer; }
.skills-page .placeholder-box { background: #f1f5f9; border: 2px dashed #cbd5e1; height: 200px; display: flex; align-items: center; justify-content: center; margin-top: 20px; border-radius: 12px; color: #64748b; }

/* === PROFILE DROPDOWN STYLES === */
.skills-page .profile-wrapper { position: relative; }
.skills-page .profile-dropdown {
    position: absolute; top: 55px; right: 0; width: 220px; background: white;
    border: 1px solid var(--border); border-radius: 16px; box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    opacity: 0; visibility: hidden; transform: translateY(-10px); transition: all 0.2s ease; z-index: 1000; overflow: hidden;
}
.skills-page .profile-dropdown.active { opacity: 1; visibility: visible; transform: translateY(0); }
.skills-page .dropdown-head { padding: 15px; background: #f8fafc; border-bottom: 1px solid var(--border); }
.skills-page .dd-name { font-weight: 700; font-size: 14px; color: #1e293b; }
.skills-page .dd-role { font-size: 11px; color: #64748b; text-transform: uppercase; letter-spacing: 0.5px; }
.skills-page .dropdown-body { padding: 8px; }
.skills-page .dd-item {
    width: 100%; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: none;
    background: transparent; color: #475569; font-size: 14px; border-radius: 8px; cursor: pointer; transition: 0.2s; text-align: left;
}
.skills-page .dd-item:hover { background: #f1f5f9; color: var(--primary); }
.skills-page .dd-item.logout { color: #ef4444; }
.skills-page .dd-item.logout:hover { background: #fef2f2; }
.skills-page .switch { position: relative; display: inline-block; width: 50px; height: 26px; }
.skills-page .switch input { opacity: 0; width: 0; height: 0; }
.skills-page .slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #ccc; transition: .4s; border-radius: 34px; }
.skills-page .slider:before { position: absolute; content: ""; height: 20px; width: 20px; left: 3px; bottom: 3px; background-color: white; transition: .4s; border-radius: 50%; }
.skills-page input:checked + .slider { background-color: var(--primary); }
.skills-page input:checked + .slider:before { transform: translateX(24px); }

/* ============================================================
   5. MATH CALCULATOR HOME (Including Game Page Styles)
   ============================================================ */
/* Body styles for the Math Calculator Home Page */
body.home-page {
    height: 100vh;
    font-family: 'Poppins', Arial, sans-serif;
    background: radial-gradient(circle at top, #121212, #0a0a0a);
    color: #fff;
    overflow-x: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0;
    padding: 0;
}

/* Panel Styles for Math Calculator Home */
.home-page .panel {
    backdrop-filter: blur(14px) saturate(180%);
    background: rgba(31, 31, 31, 0.45);
    padding: 12px 25px;
    border-radius: 20px;
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    width: 650px; /* Increased width to fit buttons */
    height: 60px;
    display: flex;
    justify-content: space-between; /* Distributes items */
    align-items: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.35);
    border: 1px solid rgba(255,255,255,0.08);
    
    animation: panelDrop 1s cubic-bezier(0.25, 1, 0.5, 1) forwards;
    transition: top 0.8s cubic-bezier(0.25, 1, 0.5, 1);
    z-index: 100;
}

/* RETRACTED STATE FOR PANEL (if you re-add the toggle later) */
.home-page .panel.retracted {
    top: -55px !important;
}

/* KEYFRAMES FOR PANEL ANIMATION */
@keyframes panelDrop {
    0% { top: -100px; opacity: 0; }
    100% { top: 25px; opacity: 1; }
}

/* Panel Button Base Style (Shared) */
.home-page .panel-btn,
.home-page .profile-button,
.home-page .settings-button {
    background: linear-gradient(135deg, rgba(49, 49, 49, 0.7), rgba(32, 32, 32, 0.4));
    color: #fff;
    border: none;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 0 0 rgba(255,255,255,0);
}

/* Navigation Buttons Style */
.home-page .panel-btn {
    padding: 10px 25px;
    border-radius: 12px;
}

/* HOVER for Navigation Buttons */
.home-page .panel-btn:hover {
    transform: scale(1.08) translateY(-1px);
    background: linear-gradient(135deg, rgba(70,70,70,0.85), rgba(40,40,40,0.6));
    box-shadow: 0 0 8px rgba(255,255,255,0.3), 0 0 15px rgba(255,255,255,0.2);
}

/* Profile Button Style */
.home-page .profile-button {
    width: 40px; height: 40px; border-radius: 50%; font-size: 18px;
    margin-left: 10px;
}

.home-page .profile-button:hover {
    background: linear-gradient(135deg, rgba(70,70,70,0.85), rgba(40,40,40,0.6));
    transform: scale(1.1);
    box-shadow: 0 0 12px rgba(255,255,255,0.4), 0 0 25px rgba(255,255,255,0.25);
}

/* Settings Button Style */
.home-page .settings-button {
    width: 40px; height: 40px; border-radius: 50%; font-size: 18px;
}

.home-page .settings-button:hover {
    background: linear-gradient(135deg, rgba(70,70,70,0.85), rgba(40,40,40,0.6));
    transform: scale(1.1);
    box-shadow: 0 0 12px rgba(255,255,255,0.4), 0 0 25px rgba(255,255,255,0.25);
}

/* --- Browser Search Bar --- */
.home-page .browser-search-container {
    position: absolute;
    bottom: 30px; left: 50%; transform: translateX(-50%);
    z-index: 50;
    display: flex; align-items: center; gap: 10px;
    background: rgba(31, 31, 31, 0.8);
    backdrop-filter: blur(10px);
    padding: 10px 20px;
    border-radius: 25px;
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.home-page .browser-search-container input {
    background: none;
    border: none;
    color: #eee;
    font-size: 15px;
    outline: none;
    width: 300px;
}

.home-page .browser-search-container button {
    background: var(--primary);
    color: white;
    border: none;
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.home-page .browser-search-container button:hover {
    background: var(--primary-hover);
    transform: scale(1.05);
}

/* --- GAME PAGE SPECIFIC STYLES --- */
/* These styles are scoped to apply ONLY when the body has the 'home-page' class,
   AND the elements match these selectors. This is what we need to change. */

/* Use a NEW class name for Game Page specific styles */


body.games-page {
    height: 100vh;
    font-family: 'Poppins', Arial, sans-serif;
    background: radial-gradient(circle at top, #121212, #0a0a0a);
    color: #fff;
    overflow-y: auto; /* Allow scrolling for games */
    display: block;   /* FIX: Changes from flex to block so the grid works */
    margin: 0;
    padding: 0;
}

/* --- EXACT HOME PAGE PANEL REPLICA --- */
.games-page .panel {
    backdrop-filter: blur(14px) saturate(180%);
    background: rgba(31, 31, 31, 0.45);
    padding: 12px 25px;
    border-radius: 20px;
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    width: 650px; /* Increased width to fit buttons */
    height: 60px;
    display: flex;
    justify-content: space-between; /* Distributes items */
    align-items: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.35);
    border: 1px solid rgba(255,255,255,0.08);
    
    animation: panelDrop 1s cubic-bezier(0.25, 1, 0.5, 1) forwards;
    transition: top 0.8s cubic-bezier(0.25, 1, 0.5, 1);
    z-index: 100;
}

/* RETRACTED STATE FOR PANEL (if you re-add the toggle later) */
.games-page .panel.retracted {
    top: -55px !important;
}

/* KEYFRAMES FOR PANEL ANIMATION */
@keyframes panelDrop {
    0% { top: -100px; opacity: 0; }
    100% { top: 25px; opacity: 1; }
}

/* Panel Button Base Style (Shared) */
.games-page .panel-btn,
.games-page .profile-button,
.games-page .settings-button {
    background: linear-gradient(135deg, rgba(49, 49, 49, 0.7), rgba(32, 32, 32, 0.4));
    color: #fff;
    border: none;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 0 0 rgba(255,255,255,0);
}

/* Navigation Buttons Style */
.games-page .panel-btn {
    padding: 10px 25px;
    border-radius: 12px;
}

/* HOVER for Navigation Buttons */
.games-page .panel-btn:hover {
    transform: scale(1.08) translateY(-1px);
    background: linear-gradient(135deg, rgba(70,70,70,0.85), rgba(40,40,40,0.6));
    box-shadow: 0 0 8px rgba(255,255,255,0.3), 0 0 15px rgba(255,255,255,0.2);
}

/* Profile Button Style */
.games-page .profile-button {
    width: 40px; height: 40px; border-radius: 50%; font-size: 18px;
    margin-left: 10px;
}

.games-page .profile-button:hover {
    background: linear-gradient(135deg, rgba(70,70,70,0.85), rgba(40,40,40,0.6));
    transform: scale(1.1);
    box-shadow: 0 0 12px rgba(255,255,255,0.4), 0 0 25px rgba(255,255,255,0.25);
}

/* Settings Button Style */
.games-page .settings-button {
    width: 40px; height: 40px; border-radius: 50%; font-size: 18px;
}

.games-page .settings-button:hover {
    background: linear-gradient(135deg, rgba(70,70,70,0.85), rgba(40,40,40,0.6));
    transform: scale(1.1);
    box-shadow: 0 0 12px rgba(255,255,255,0.4), 0 0 25px rgba(255,255,255,0.25);
}

.games-page .game-grid { /* Changed from .home-page .game-grid */
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); /* Responsive columns */
    gap: 25px; /* Slightly more gap */
    padding: 120px 40px; /* Top padding to clear the panel */
    width: 100%;
    max-width: 1200px; /* Optional: Limit max grid width */
    margin: 0 auto; /* Center the grid */
}

.games-page .game-card { /* Changed from .home-page .game-card */
    background-color: #1f1f1f;
    border-radius: 15px;
    height: 180px;
    width: 100%; /* Make card fill grid cell width */
    box-shadow: 0 0 10px rgba(184, 107, 255, 0.2); /* Subtle purple glow */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    overflow: hidden;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.games-page .game-card:hover { /* Changed from .home-page .game-card:hover */
    transform: scale(1.05) translateY(-2px); /* Slight lift and scale */
    background: linear-gradient(135deg, rgba(54, 54, 54, 0.8), rgba(32, 32, 32, 0.6)); /* Darker gradient on hover */
    box-shadow: 0 0 12px rgba(184, 107, 255, 0.5), 0 0 25px rgba(184, 107, 255, 0.3); /* Adjusted hover glow */
}

.games-page .game-card img { /* Changed from .home-page .game-card img */
    width: 100%;
    height: 100%;
    object-fit: cover; /* Covers the card area without distortion */
    border-radius: 15px; /* Match card border radius */
    pointer-events: none; /* Prevent image from interfering with card click */
}

.games-page .gameplay-overlay { /* Changed from .home-page .gameplay-overlay */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(14,14,14,0.95);
    display: none; /* Hidden by default */
    justify-content: center;
    align-items: center;
    flex-direction: column;
    z-index: 100;
}

.games-page .gameplay-overlay iframe { /* Changed from .home-page .gameplay-overlay iframe */
    width: 90%;
    height: 80%;
    border-radius: 15px;
    border: none;
}

.games-page .overlay-controls { /* Changed from .home-page .overlay-controls */
    position: absolute;
    top: 15px;
    right: 15px;
    display: flex;
    gap: 10px;
    align-items: center;
    z-index: 200;
}

.games-page .overlay-controls button { /* Changed from .home-page .overlay-controls button */
    padding: 8px 12px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(49, 49, 49, 0.7), rgba(32, 32, 32, 0.4));
    color: #ffffff;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.2s ease;
}

.games-page .overlay-controls button:hover { /* Changed from .home-page .overlay-controls button:hover */
    box-shadow: 0 0 16px #bbbbbb; /* Subtle glow on controls */
}

