/* 

This file does NOT contain any hints/answers. 

*/

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

html, body {
  height: 100%;
}

body {
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans,
    Helvetica Neue, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  background: radial-gradient(1200px 600px at 12% 12%, rgba(30, 58, 138, 0.14), transparent 60%),
    radial-gradient(1200px 600px at 88% 18%, rgba(2, 132, 199, 0.10), transparent 60%),
    radial-gradient(1000px 600px at 24% 88%, rgba(3, 105, 161, 0.10), transparent 60%),
    linear-gradient(135deg, #090d16 0%, #0a1120 50%, #090d16 100%);
  background-attachment: fixed, fixed, fixed, fixed;
  background-repeat: no-repeat, no-repeat, no-repeat, no-repeat;
  background-size: auto, auto, auto, cover;
  color: #e5e7eb;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.background-beams {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.beam {
  position: absolute;
  border-radius: 9999px;
  filter: blur(70px);
  opacity: 0.6;
  animation: float 10s ease-in-out infinite;
}

.beam.b1 { width: 28rem; height: 28rem; background: radial-gradient(circle, rgba(30,58,138,.28), transparent 70%); top: 10%; left: 5%; }
.beam.b2 { width: 32rem; height: 32rem; background: radial-gradient(circle, rgba(2,132,199,.24), transparent 70%); top: 5%; right: 10%; animation-direction: reverse; }
.beam.b3 { width: 24rem; height: 24rem; background: radial-gradient(circle, rgba(3,105,161,.24), transparent 70%); bottom: 10%; left: 20%; animation-duration: 12s; }

@keyframes float {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  25% { transform: translate3d(20px, -10px, 0) scale(1.02); }
  50% { transform: translate3d(-10px, 10px, 0) scale(0.98); }
  75% { transform: translate3d(10px, 0, 0) scale(1.01); }
}

/* Sparkle particles */
.particles { position: fixed; inset: 0; pointer-events: none; z-index: 2; }
.particle {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 9999px;
  background: #93c5fd;
  opacity: .4;
  filter: drop-shadow(0 0 6px rgba(147,197,253,.8));
  animation: twinkle var(--dur, 2.8s) ease-in-out infinite;
  animation-delay: var(--delay, 0s);
}
@keyframes twinkle {
  0%, 100% { opacity: .25; transform: scale(1); }
  50% { opacity: .9; transform: scale(1.6); }
}

.container {
  position: relative;
  z-index: 10;
  max-width: 99%;
  margin: 0 auto;
  padding: 5px;
}

.navbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(9, 13, 22, 0.72);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  backdrop-filter: blur(8px);
}

.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 4px;
  position: relative;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #e5e7eb;
}
.logo-img { max-height: 22px; height: 22px; width: auto; display: block; }
.logo-text { font-weight: 800; letter-spacing: .2px; }

.nav-center {
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: .95;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}
.level-label { font-weight: 700; color: #e5e7eb; }
.level-name { color: #cbd5e1; font-weight: 600; }
.divider { color: #64748b; }

.nav-right { display: inline-flex; align-items: center; gap: 8px; }

.link { color: #bfdbfe; text-decoration: none; }
.link:hover { color: #e0f2fe; text-decoration: underline; text-underline-offset: 2px; }

.title {
  font-size: 1.875rem;
  font-weight: 800;
  letter-spacing: 0.2px;
  background: linear-gradient(90deg, #93c5fd, #67e8f9 60%, #06b6d4);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid rgba(255,255,255,0.08);
  backdrop-filter: blur(6px);
}
.nav-right .badge { line-height: 1; }
.badge.level { background: rgba(37,99,235,.22); color: #dbeafe; }
.badge.difficulty { text-transform: uppercase; letter-spacing: .3px; }
.badge.difficulty.easy { background: rgba(16,185,129,.2); color: #bbf7d0; border-color: rgba(16,185,129,.35); }
.badge.difficulty.medium { background: rgba(245,158,11,.2); color: #fde68a; border-color: rgba(245,158,11,.35); }
.badge.difficulty.hard { background: rgba(239,68,68,.2); color: #fecaca; border-color: rgba(239,68,68,.35); }
.badge.difficulty.nightmare { background: rgba(34, 0, 51, .7); color: #e9d5ff; border-color: rgba(168,85,247,.35); }

.card {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
  overflow: hidden;
}
.card-header { padding: 22px 22px 0 22px; }
.card-title {
  font-size: 1.5rem;
  font-weight: 800;
  background: linear-gradient(90deg, #bfdbfe, #67e8f9);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 6px;
}
.card-description { color: #cbd5e1; font-size: 0.95rem; }
.card-content { padding: 22px; color: #e5e7eb; line-height: 1.7; }
.card-content ol,
.card-content ul {
  padding-left: 16px;
  list-style-position: outside;
}

.content-box {
  background: rgba(0,0,0,0.22);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 18px;
}

.actions { display: flex; gap: 10px; flex-wrap: wrap; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
  border: 1px solid rgba(255,255,255,0.14);
  color: #fff;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.btn.wide { padding-left: 30px; padding-right: 30px; min-width: 100px; }
.btn.primary {
  background: linear-gradient(90deg, #0ea5e9, #2563eb);
  box-shadow: 0 10px 25px rgba(37,99,235,.28);
}
.btn.primary:hover { transform: translateY(-2px); box-shadow: 0 16px 32px rgba(37,99,235,.38); }
.btn.ghost { background: transparent; }
.btn.ghost:hover { background: rgba(255,255,255,0.06); }

/* Sections */
main { padding: 32px 0 20px; }
.grid { display: grid; grid-template-columns: 1fr; gap: 22px; }
@media (min-width: 960px) { .grid { grid-template-columns: 2fr 1fr; } }

/* Levels list */
.list-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 700px) { .list-grid { grid-template-columns: 1fr 1fr; } }
.list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
}
.list-item-title { font-weight: 700; color: #e5e7eb; }
.list-item-sub { color: #94a3b8; font-size: .9rem; }

.muted { color: #cbd5e1; font-size: .95rem; }
.center { text-align: center; }
.spacer-4 { height: 1rem; }
.spacer-6 { height: 1.25rem; }

/* Square cells (reusable) */
.cell-grid {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}
.cell {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.4rem;
  height: 2.4rem;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  font-weight: 700;
  font-size: 1rem;
  line-height: 1;
  color: #e5e7eb;
}