/* Reset */
* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Nunito', sans-serif; }
body { background: linear-gradient(135deg, #6a11cb, #2575fc); color: #fff; min-height: 100vh; overflow-x: hidden; }

/* Background Canvas */
#bg-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

/* Navbar */
nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 3rem;
  background: rgba(0,0,0,0.2);
  position: relative;
  z-index: 1;
}
nav .logo { font-family: 'Poppins', sans-serif; font-size: 1.8rem; font-weight: 700; }
nav ul { list-style: none; display: flex; gap: 1rem; align-items: center; }
nav ul li { cursor: pointer; transition: transform 0.2s; }
nav ul li:hover { transform: scale(1.1); }
nav ul li a.dashboard-btn {
  padding: 0.5rem 1rem;
  background: linear-gradient(45deg,#ff9a9e,#fad0c4);
  color: #222;
  font-weight: 700;
  border-radius: 50px;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.3s;
}
nav ul li a.dashboard-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 0 15px rgba(255,255,255,0.6);
}

/* Hero Section */
.hero-dashboard {
  text-align: center;
  padding: 5rem 2rem;
  position: relative;
  z-index: 1;
}
.hero-dashboard h1 { font-family: 'Poppins', sans-serif; font-size: 2.8rem; margin-bottom: 0.5rem; }
.hero-dashboard p { font-size: 1.2rem; margin-bottom: 2rem; }
.buttons-container { display: flex; justify-content: center; gap: 2rem; }
.dash-btn {
  padding: 1rem 2rem;
  border: none;
  border-radius: 50px;
  font-weight: 700;
  font-size: 1.2rem;
  background: linear-gradient(45deg, #ff9a9e, #fad0c4);
  color: #222;
  cursor: pointer;
  opacity: 0;
  transform: scale(0.5);
  animation: btnPop 0.8s forwards;
}
.dash-btn:nth-child(1) { animation-delay: 0.2s; }
.dash-btn:nth-child(2) { animation-delay: 0.5s; }
.dash-btn:nth-child(3) { animation-delay: 0.8s; }
@keyframes btnPop {
  to { opacity: 1; transform: scale(1); }
}

/* Panel Styles */
.panel {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  background: rgba(0,0,0,0.9);
  padding: 2rem;
  border-radius: 20px;
  width: 90%;
  max-width: 600px;
  z-index: 10;
  transition: transform 0.5s ease;
  color: #fff;
}
.panel.active { transform: translate(-50%, -50%) scale(1); }
.close-btn {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 2rem;
  cursor: pointer;
  color: #ff9a9e;
}

/* XP Section */
.xp-bar-container {
  width: 100%;
  height: 25px;
  background: rgba(255,255,255,0.2);
  border-radius: 20px;
  overflow: hidden;
  margin: 0.5rem 0 1rem 0;
}
.xp-bar {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #ff9a9e, #fad0c4);
  border-radius: 20px;
  transition: width 1s ease-in-out;
}

/* Badges */
.badges-container { display: flex; justify-content: center; gap: 1rem; flex-wrap: wrap; margin-top: 1rem; }
.badge { width: 60px; height: 60px; border-radius: 50%; background: rgba(255,255,255,0.1); position: relative; transition: transform 0.3s; }
.badge.unlocked {
  background: linear-gradient(45deg, #ff9a9e, #fad0c4);
  box-shadow: 0 5px 15px rgba(255,255,255,0.3);
  animation: floatBadge 3s infinite ease-in-out;
}
.badge.locked::after { content: '🔒'; position: absolute; top: 25%; left: 25%; font-size: 1.5rem; }
.badge:hover { transform: scale(1.2); }
@keyframes floatBadge { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

/* Leaderboard */
.leaderboard-list { list-style: none; margin-top: 1rem; }
.leaderboard-list li { padding: 0.5rem 1rem; background: rgba(255,255,255,0.1); border-radius: 10px; margin: 0.3rem 0; transition: transform 0.2s; }
.leaderboard-list li:hover { transform: scale(1.05); }

/* Subject Cards */
.subjects-container {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}
.subject-card {
  background: rgba(255,255,255,0.1);
  padding: 1.5rem 2rem;
  border-radius: 15px;
  cursor: pointer;
  font-size: 1.2rem;
  text-align: center;
  transition: transform 0.3s, box-shadow 0.3s;
}
.subject-card:hover {
  transform: scale(1.1);
  box-shadow: 0 0 20px
}
nav ul li a.home-btn {
  padding: 0.5rem 1rem;
  background: linear-gradient(45deg,#6fffe9,#00d4ff);
  color: #222;
  font-weight: 700;
  border-radius: 50px;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.3s;
}

nav ul li a.home-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 0 15px rgba(0, 255, 255, 0.6);
}
