/* EasyGames - Premium Light Yellow Theme */
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800;900&family=Space+Grotesk:wght@400;500;600;700&display=swap');

:root {
  --yellow:    #f5c518;
  --yellow-d:  #e6b800;
  --yellow-l:  #fef9ec;
  --yellow-m:  #fef3cc;
  --yellow-b:  #fde68a;
  --dark:      #1a1a1a;
  --dark2:     #2d2d2d;
  --gray:      #6b7280;
  --gray-l:    #f3f4f6;
  --white:     #ffffff;
  --green:     #22c55e;
  --red:       #ef4444;
  --radius:    14px;
  --shadow:    0 4px 24px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.12);
}

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

body {
  font-family: 'Space Grotesk', sans-serif;
  background: var(--yellow-l);
  color: var(--dark);
  min-height: 100vh;
  line-height: 1.6;
}

a { text-decoration: none; color: inherit; }

/* ── NAVBAR ── */
.navbar {
  background: var(--white);
  border-bottom: 2px solid var(--yellow-b);
  padding: 0 32px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 16px rgba(245,197,24,0.10);
}

.navbar .logo {
  font-family: 'Nunito', sans-serif;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.5px;
  color: var(--dark);
}

.navbar .logo span {
  color: var(--yellow-d);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
}

.nav-links a {
  padding: 8px 16px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--gray);
  transition: all 0.2s;
}

.nav-links a:hover {
  background: var(--yellow-m);
  color: var(--dark);
}

.nav-links .btn-nav {
  background: var(--yellow);
  color: var(--dark);
  padding: 9px 20px;
  border-radius: 10px;
}

.nav-links .btn-nav:hover {
  background: var(--yellow-d);
}

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 700;
  font-family: 'Space Grotesk', sans-serif;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--yellow), var(--yellow-d));
  color: var(--dark);
  box-shadow: 0 4px 14px rgba(245,197,24,0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(245,197,24,0.45);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--dark);
  color: var(--dark);
}

.btn-outline:hover {
  background: var(--dark);
  color: var(--yellow);
}

.btn-dark {
  background: var(--dark);
  color: var(--yellow);
}

.btn-dark:hover {
  background: var(--dark2);
  transform: translateY(-2px);
}

.btn-lg {
  padding: 16px 36px;
  font-size: 17px;
  border-radius: 16px;
}

/* ── CARDS ── */
.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
  border: 2px solid transparent;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--yellow-b);
}

/* ── GAME CARD ── */
.game-card {
  cursor: pointer;
}

.game-card .thumb {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 64px;
  background: linear-gradient(135deg, var(--yellow-m), var(--yellow-b));
}

.game-card .card-body {
  padding: 16px 18px 18px;
}

.game-card .card-title {
  font-family: 'Nunito', sans-serif;
  font-size: 17px;
  font-weight: 800;
  margin-bottom: 4px;
}

.game-card .card-desc {
  font-size: 13px;
  color: var(--gray);
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.game-card .card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.badge-free { background: #dcfce7; color: #16a34a; }
.badge-premium { background: linear-gradient(135deg, var(--yellow), var(--yellow-d)); color: var(--dark); }
.badge-cat { background: var(--yellow-m); color: #92400e; }

/* ── FORMS ── */
.form-group { margin-bottom: 20px; }

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--dark2);
  margin-bottom: 7px;
  letter-spacing: 0.3px;
}

.form-group input {
  width: 100%;
  padding: 13px 16px;
  border: 2px solid var(--yellow-b);
  border-radius: 12px;
  font-size: 15px;
  font-family: 'Space Grotesk', sans-serif;
  outline: none;
  background: var(--yellow-l);
  transition: border 0.2s, background 0.2s;
}

.form-group input:focus {
  border-color: var(--yellow);
  background: var(--white);
  box-shadow: 0 0 0 4px rgba(245,197,24,0.15);
}

.form-group input::placeholder { color: #bbb; }

.alert {
  padding: 13px 16px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 18px;
}

.alert-error { background: #fee2e2; color: var(--red); border: 1.5px solid #fca5a5; }
.alert-success { background: #dcfce7; color: #15803d; border: 1.5px solid #86efac; }

/* ── AUTH PAGES ── */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--yellow-l);
}

.auth-box {
  background: var(--white);
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 440px;
  overflow: hidden;
}

.auth-header {
  background: linear-gradient(135deg, var(--yellow), var(--yellow-d));
  padding: 32px 36px 28px;
  text-align: center;
}

.auth-header .logo {
  font-family: 'Nunito', sans-serif;
  font-size: 28px;
  font-weight: 900;
  color: var(--dark);
  letter-spacing: -1px;
  margin-bottom: 6px;
}

.auth-header p { font-size: 14px; color: rgba(0,0,0,0.6); }

.auth-body { padding: 32px 36px; }

.auth-footer {
  text-align: center;
  padding: 0 36px 28px;
  font-size: 14px;
  color: var(--gray);
}

.auth-footer a { color: var(--dark); font-weight: 700; }

/* ── PAGE WRAPPER ── */
.page-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 24px;
}

/* ── SECTION TITLE ── */
.section-title {
  font-family: 'Nunito', sans-serif;
  font-size: 28px;
  font-weight: 900;
  margin-bottom: 6px;
  letter-spacing: -0.5px;
}

.section-sub {
  font-size: 15px;
  color: var(--gray);
  margin-bottom: 28px;
}

/* ── GRID ── */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
}

/* ── HERO ── */
.hero {
  background: linear-gradient(135deg, var(--yellow) 0%, #ffd700 50%, var(--yellow-d) 100%);
  padding: 80px 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.15) 0%, transparent 60%);
  animation: pulse 4s ease-in-out infinite;
}

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

.hero-content { position: relative; z-index: 1; max-width: 700px; margin: 0 auto; }

.hero h1 {
  font-family: 'Nunito', sans-serif;
  font-size: clamp(36px, 6vw, 64px);
  font-weight: 900;
  color: var(--dark);
  line-height: 1.1;
  letter-spacing: -2px;
  margin-bottom: 18px;
}

.hero p {
  font-size: clamp(16px, 2.5vw, 20px);
  color: rgba(0,0,0,0.65);
  margin-bottom: 36px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.hero-btns { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ── FEATURES ── */
.features {
  padding: 72px 24px;
  background: var(--white);
}

.features-grid {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 32px;
  margin-top: 48px;
}

.feature-item { text-align: center; }

.feature-icon {
  width: 64px; height: 64px;
  border-radius: 18px;
  background: var(--yellow-m);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
  margin: 0 auto 16px;
  border: 2px solid var(--yellow-b);
}

.feature-item h3 {
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  font-size: 18px;
  margin-bottom: 8px;
}

.feature-item p { font-size: 14px; color: var(--gray); }

/* ── FOOTER ── */
footer {
  background: var(--dark);
  color: rgba(255,255,255,0.7);
  padding: 40px 24px;
  text-align: center;
}

footer .logo {
  font-family: 'Nunito', sans-serif;
  font-size: 22px;
  font-weight: 900;
  color: var(--yellow);
  margin-bottom: 12px;
}

footer p { font-size: 13px; }

/* ── DASHBOARD ── */
.dash-header {
  background: linear-gradient(135deg, var(--yellow), var(--yellow-d));
  padding: 32px 24px;
  margin-bottom: 32px;
}

.dash-header h1 {
  font-family: 'Nunito', sans-serif;
  font-size: 28px;
  font-weight: 900;
  color: var(--dark);
}

.dash-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--yellow);
}

.stat-card .stat-num {
  font-family: 'Nunito', sans-serif;
  font-size: 32px;
  font-weight: 900;
  color: var(--dark);
}

.stat-card .stat-label { font-size: 13px; color: var(--gray); margin-top: 2px; }

/* ── GAME PAGE ── */
.game-header {
  background: var(--dark);
  color: var(--white);
  padding: 24px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.game-canvas-wrap {
  max-width: 900px;
  margin: 32px auto;
  padding: 0 24px;
}

.level-select {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin: 24px 0;
}

.level-btn {
  width: 80px; height: 80px;
  border-radius: 16px;
  border: 2.5px solid var(--yellow-b);
  background: var(--white);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-family: 'Nunito', sans-serif;
  font-weight: 900;
  font-size: 22px;
  color: var(--dark);
  transition: all 0.2s;
  box-shadow: var(--shadow);
}

.level-btn:hover, .level-btn.active {
  background: var(--yellow);
  border-color: var(--yellow-d);
  transform: translateY(-2px);
}

.level-btn .level-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--gray);
  margin-top: 2px;
}

.level-btn.active .level-label, .level-btn:hover .level-label { color: var(--dark2); }

.level-btn.locked {
  opacity: 0.4;
  cursor: not-allowed;
}

.level-btn.locked:hover { transform: none; background: var(--white); border-color: var(--yellow-b); }

/* ── RESPONSIVE ── */
@media (max-width: 600px) {
  .navbar { padding: 0 16px; }
  .nav-links { gap: 4px; }
  .nav-links a { padding: 8px 10px; font-size: 13px; }
  .hero { padding: 56px 16px; }
  .auth-body { padding: 24px 20px; }
  .auth-header { padding: 24px 20px; }
  .auth-footer { padding: 0 20px 24px; }
}
