* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  color: #ffffff;
  background: #05010d;
}

/* HERO */
.hero {
  position: relative;
  min-height: 560px;
  background:
    linear-gradient(90deg, rgba(60, 0, 100, 0.78), rgba(5, 18, 61, 0.78)),
    url("images/bg.png") center / cover no-repeat;
  overflow: hidden;
}

.hero-small {
  min-height: 320px;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top left, rgba(180, 40, 255, 0.28), transparent 35%),
    radial-gradient(circle at top right, rgba(0, 110, 255, 0.18), transparent 35%);
  pointer-events: none;
}

.top-nav {
  position: relative;
  z-index: 2;
  max-width: 1220px;
  margin: 0 auto;
  padding: 24px 28px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}

.brand {
  font-size: 1.9rem;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.nav-center {
  display: flex;
  justify-content: center;
  gap: 34px;
}

.nav-center a {
  color: #ffffff;
  text-decoration: none;
  font-size: 0.96rem;
  font-weight: 500;
  opacity: 0.92;
}

.nav-center a:hover {
  opacity: 1;
  color: #d9c7ff;
}

.nav-right {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.login-outline-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 106px;
  padding: 11px 22px;
  border: 1.5px solid rgba(255,255,255,0.8);
  border-radius: 10px;
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  background: rgba(255,255,255,0.03);
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.login-outline-btn:hover {
  background: rgba(255,255,255,0.08);
  border-color: #ffffff;
  transform: translateY(-1px);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1220px;
  margin: 0 auto;
  padding: 72px 28px 110px;
}

.hero-content-small {
  padding-top: 36px;
  padding-bottom: 70px;
}

.hero-content h1 {
  margin: 0 0 18px;
  max-width: 620px;
  font-size: 3.6rem;
  line-height: 1.05;
  font-weight: 800;
}

.hero-content p {
  margin: 0;
  max-width: 620px;
  font-size: 1.08rem;
  line-height: 1.7;
  color: rgba(255,255,255,0.88);
}

.hero-buttons {
  margin-top: 30px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.hero-btn {
  display: inline-block;
  text-decoration: none;
  border-radius: 12px;
  padding: 13px 22px;
  font-weight: 700;
  transition: transform 0.2s ease, opacity 0.2s ease, background 0.2s ease;
}

.hero-btn:hover {
  transform: translateY(-1px);
}

.hero-btn.primary {
  background: linear-gradient(90deg, #8e2bff, #5d2dff);
  color: #fff;
}

.hero-btn.secondary {
  background: rgba(255,255,255,0.08);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.15);
}

/* MAIN */
.main-wrap {
  margin-top: -70px;
  position: relative;
  z-index: 3;
}

.container {
  width: 92%;
  max-width: 760px;
  margin: 0 auto 48px;
  padding: 28px;
  background: rgba(7, 10, 18, 0.8);
  backdrop-filter: blur(14px);
  border-radius: 24px;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255,255,255,0.08);
}

.section-title {
  margin-top: 0;
  margin-bottom: 16px;
  font-size: 1.2rem;
}

.progress-box {
  margin-bottom: 22px;
}

#progressText {
  display: block;
  margin-bottom: 10px;
  color: #dfe6f5;
  line-height: 1.55;
  font-size: 0.97rem;
}

.progress-container {
  width: 100%;
  height: 12px;
  background: rgba(255,255,255,0.08);
  border-radius: 999px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #8e2bff, #00bfff);
  transition: width 0.35s ease;
}

/* RIDDLE CARDS */
.riddle-card {
  position: relative;
  min-height: 118px;
  border-radius: 18px;
  margin-bottom: 16px;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  transition: transform 0.2s ease;
}

.riddle-card:hover {
  transform: translateY(-2px);
}

.overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
}

.riddle-content {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
}

.riddle-name {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0,0,0,0.7);
}

.riddle-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.riddle-status {
  font-size: 0.85rem;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(0,0,0,0.45);
  color: #fff;
}

.riddle-status.solved {
  background: rgba(0, 255, 180, 0.16);
  border: 1px solid rgba(0, 255, 180, 0.25);
}

.riddle-status.pending {
  background: rgba(255,255,255,0.12);
}

.play-btn {
  text-decoration: none;
  display: inline-block;
  background: linear-gradient(90deg, #8e2bff, #6c2dff);
  color: #ffffff;
  border: none;
  border-radius: 999px;
  padding: 9px 16px;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.play-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.28);
}

.play-btn.disabled {
  background: #4d4f67;
  color: #d7daea;
  cursor: default;
  pointer-events: none;
  box-shadow: none;
}

/* PROFILE */
.profile-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px;
  padding: 22px;
  margin-bottom: 18px;
}

.profile-card h2,
.profile-card h3 {
  margin-top: 0;
}

.profile-subtext {
  color: #dfe6f5;
  opacity: 0.85;
}

.profile-riddle-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.profile-riddle-row:last-child {
  border-bottom: none;
}

.profile-riddle-name {
  font-weight: 600;
}

.profile-riddle-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* SOCIAL */
.social {
  margin-top: 28px;
  text-align: center;
}

.social p {
  margin-bottom: 10px;
  color: #dce7f2;
}

.icons a {
  margin: 0 8px;
  font-size: 0.92rem;
  color: #cda9ff;
  text-decoration: none;
}

.icons a:hover {
  text-decoration: underline;
}

/* MOBILE */
@media (max-width: 900px) {
  .top-nav {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .brand,
  .nav-center,
  .nav-right {
    justify-content: center;
    text-align: center;
  }

  .nav-right {
    display: flex;
  }

  .hero-content {
    padding-top: 36px;
    padding-bottom: 90px;
    text-align: center;
  }

  .hero-content h1,
  .hero-content p {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-buttons {
    justify-content: center;
  }
}

@media (max-width: 640px) {
  .nav-center {
    gap: 18px;
    flex-wrap: wrap;
  }

  .brand {
    font-size: 1.5rem;
  }

  .hero-content h1 {
    font-size: 2.4rem;
  }

  .container {
    padding: 20px;
  }

  .riddle-content,
  .profile-riddle-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .riddle-actions,
  .profile-riddle-actions {
    align-items: flex-start;
  }
}