:root {
  --bg: #050914;
  --panel: #10182d;
  --panel2: #16213d;
  --line: #34537a;
  --text: #fff8e8;
  --muted: #b8c7df;
  --gold: #ffd84d;
  --green: #48d98b;
  --red: #ff5f6d;
  --orange: #ffae42;
  --pink: #d96cff;
  --blue: #42c7ff;
}

* {
  box-sizing: border-box;
}




html {
  overflow-x: hidden;
}


body {
  --bg-image: url("images/background.png");

  position:relative;
  margin: 0;
  font-family: Inter, system-ui, Segoe UI, Arial, sans-serif;
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  background:
    linear-gradient(to bottom, rgba(5, 9, 20, 0) 0 620px, #050914 820px),
    var(--bg-image) top center / 100% auto no-repeat,
    #050914;
}
/* -------------------------------
   Changelog board
----------------------------------- */

.notice-desktop {
  position: relative;
  width: min(420px, 92vw);
  margin: 45px auto 80px;
  z-index: 2;
}

.changelog-board {
  position: relative;
  width: 100%;
  pointer-events: none;
}

.changelog-board-img {
  width: 100%;
  display: block;
  filter: drop-shadow(0 12px 18px rgba(0, 0, 0, 0.45));
}

.changelog-board-text {
  position: absolute;
  inset: 18% 14% 16% 14%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #ffe8a3;
  text-shadow:
    0 2px 0 #2a1207,
    0 4px 0 #2a1207,
    0 0 8px rgba(0,0,0,0.45),
    0 0 16px rgba(0,0,0,0.25);
  font-weight: 900;
}

.changelog-board-text h2 {
  margin: 0 0 10px;
  font-size: 24px;
}

.changelog-board-text p {
  margin: 4px 0;
  font-size: 15px;
  line-height: 1.25;
}

@media (max-width: 430px) {
  .notice-desktop {
    width: 92vw;
    margin: 35px auto 70px;
  }

  .changelog-board-text {
    inset: 19% 13% 16% 13%;
  }

  .changelog-board-text h2 {
    font-size: 22px;
  }

  .changelog-board-text p {
    font-size: 14px;
  }
}
/* -------------------------------
   END Changelog board
----------------------------------- */

/* HEADER / SIDEBAR NAV */

.topbar {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 22px;
  background: rgba(5, 9, 20, 0.9);
  border-bottom: 2px solid rgba(255, 216, 77, 0.18);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.topbar nav,
.desktop-nav {
  display: none !important;
}

.menu-toggle {
  position: absolute;
  top: 24px;
  left: 24px;

  width: 64px;
  height: 64px;

  display: flex;
  align-items: center;
  justify-content: center;

  background: rgba(5, 9, 20, 0.88);
  border: 2px solid rgba(255, 216, 77, 0.28);
  border-radius: 16px;

  color: #ffeaa0;
  font-size: 34px;
  box-shadow:
    0 8px 30px rgba(0, 0, 0, .4),
    inset 0 0 0 1px rgba(255, 255, 255, .05);

  z-index: 50;
}

.menu-toggle:hover {
  color: #fff;
  filter: brightness(1.08);
}

.brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  text-decoration: none;
  min-width: 0;
}

.logo {
  width: 54px;
  height: 54px;
  object-fit: contain;
  flex-shrink: 0;
  filter:
    drop-shadow(0 0 8px rgba(255, 216, 77, .45)) drop-shadow(0 4px 8px rgba(0, 0, 0, .4));
}

.brand:hover .logo {
  transform: rotate(-5deg) scale(1.05);
  transition: .2s ease;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.brand-title {
  font-size: 24px;
  font-weight: 950;
  color: #fff8e8;
  letter-spacing: .5px;
  text-shadow:
    0 3px 0 #1b2450,
    0 0 12px rgba(255, 216, 77, .25);
}

.home-pill {
  text-decoration: none;
  cursor: pointer;
  transition: .15s;
}

.home-pill:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
}

.brand:hover .brand-title {
  color: #ffe382;
  transition: .2s ease;
}

.brand-subtitle {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #ffd84d;
  margin-top: 4px;
}

.side-menu {
  display: block;
  position: fixed;
  top: 0;
  left: -320px;
  width: 300px;
  max-width: 86vw;
  height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(255, 216, 77, .12), transparent 32%),
    linear-gradient(180deg, #08162b, #050914 75%);
  border-right: 2px solid rgba(255, 216, 77, .25);
  z-index: 100;
  padding: 24px;
  transition: left .25s ease;
  box-shadow: 20px 0 60px rgba(0, 0, 0, .55);
  overflow-y: auto;
}

.side-menu.open {
  left: 0;
}

.menu-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .55);
  z-index: 90;
  backdrop-filter: blur(2px);
}

.menu-overlay.open {
  display: block;
}

.menu-close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: transparent;
  box-shadow: none;
  border: 0;
  color: #ffeaa0;
  font-size: 38px;
  line-height: 1;
  padding: 0;
}

.side-logo {
  width: 76px;
  height: 76px;
  object-fit: contain;
  margin-top: 24px;
  filter: drop-shadow(0 0 12px rgba(255, 216, 77, .45));
}

.side-menu h2 {
  margin: 12px 0 0;
  font-size: 30px;
  color: #fff8e8;
  text-shadow: 0 3px 0 #1b2450;
}

.side-menu p {
  margin: 4px 0 28px;
  color: #ffd84d;
  font-weight: 900;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-size: 11px;
}

.side-menu a {
  display: block;
  color: #fff8e8;
  text-decoration: none;
  font-weight: 950;
  font-size: 20px;
  padding: 15px 0;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  text-shadow: 0 2px 0 #000;
}

.side-menu a:hover {
  color: #ffd84d;
}
/* END HEADER / SIDEBAR NAV */
/* FOOTER */


.kingdom-footer {
  text-align: center;
  margin-top: 25px;
  margin-bottom: 20px;
  color: #ffe8a3;
}

.kingdom-footer h3 {
  margin: 0 0 8px;
  font-size: 28px;
  font-weight: 900;

  text-shadow:
    0 2px 0 #2a1207,
    0 4px 0 #2a1207,
    0 0 12px rgba(255,215,120,.35);
}

.kingdom-footer p {
  margin: 0;
  font-size: 17px;
  color: #f8e9b6;

  text-shadow:
    0 2px 0 #2a1207,
    0 0 10px rgba(255,215,120,.25);
}

/* end of footer */
/* PAGE HERO SPACING */

main {
  max-width: 1120px;
  margin: 0 auto;
  padding: 470px 20px 70px;
  position: relative;
}

main::before {
  content: "Visit the Coding Kingdom";
  position: absolute;
  top: 300px;
  left: 50%;
  transform: translateX(-50%);
  color: #fff3b0;
  font-weight: 950;
  font-size: 34px;
  letter-spacing: 2px;
  text-align: center;
  text-shadow:
    0 4px 0 #3b1b58,
    0 0 18px rgba(255, 216, 77, 0.75);
  animation: floatTitle 3s ease-in-out infinite;
  pointer-events: none;
  width: 90%;
}

@keyframes floatTitle {

  0%,
  100% {
    transform: translateX(-50%) translateY(0);
  }

  50% {
    transform: translateX(-50%) translateY(-10px);
  }
}

/* PANELS */

.hero,
.panel {
  border: 2px solid rgba(255, 216, 77, 0.22);
  background:
    linear-gradient(180deg, rgba(20, 33, 61, 0.92), rgba(9, 15, 31, 0.95));
  border-radius: 22px;
  padding: 28px;
  box-shadow:
    0 18px 60px rgba(0, 0, 0, 0.42),
    inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.hero {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 20px;
  align-items: center;
}

.eyebrow {
  color: var(--gold);
  letter-spacing: 4px;
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
  text-shadow: 0 2px 0 #000;
}

.title {
  font-size: 46px;
  line-height: .95;
  margin: 12px 0;
  color: #fff8e8;
  text-shadow: 0 4px 0 #1b2450;
}

.subtitle {
  color: #dcecff;
  line-height: 1.65;
}

.stats {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.pill {
  border: 2px solid rgba(255, 216, 77, 0.25);
  background: linear-gradient(180deg, #263b66, #172340);
  border-radius: 999px;
  padding: 9px 13px;
  font-weight: 900;
  color: #fff;
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.28);
}

.progressbar {
  height: 13px;
  background: #273858;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .12);
}

.progressfill {
  height: 100%;
  background: linear-gradient(90deg, #ffd84d, #48d98b, #42c7ff);
  width: 0;
}

/* CATEGORY CARDS */

.section-title {
  font-size: 36px;
  margin: 36px 0 8px;
  color: #fff8e8;
  text-shadow: 0 3px 0 #1b2450;
}

.category-card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-top: 28px;
}

.category-card {
  min-height: 220px;
  border-radius: 24px;
  padding: 24px;
  text-align: left;
  background:
    linear-gradient(180deg, rgba(20, 33, 61, 0.96), rgba(9, 15, 31, 0.96));
  border: 2px solid rgba(255, 216, 77, 0.22);
  color: var(--text);
  box-shadow:
    0 14px 45px rgba(0, 0, 0, .35),
    inset 0 0 0 1px rgba(255, 255, 255, .06);
}

.category-card:hover {
  transform: translateY(-5px);
  filter: brightness(1.1);
}

.category-card-icon {
  width: 72px;
  height: 72px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.category-card-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 6px 8px rgba(0, 0, 0, 0.45));
}

.category-card h2 {
  margin: 0 0 10px;
  font-size: 28px;
  text-shadow: 0 3px 0 #1b2450;
}

.category-card p {
  color: #d8e7ff;
  line-height: 1.5;
  min-height: 52px;
}

/* CATEGORY PAGE */

.category {
  margin-top: 32px;
}

.category-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 14px;
}

.category h2 {
  font-size: 30px;
  margin: 0;
  color: #fff8e8;
  text-shadow: 0 3px 0 #1b2450;
}

.category p {
  color: #d8e7ff;
  margin: 8px 0 0;
}

.category-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.category-title-icon {
  width: 42px;
  height: 42px;
  object-fit: contain;
  flex: 0 0 auto;
  filter: drop-shadow(0 5px 6px rgba(0, 0, 0, 0.45));
}

.level-row {
  border: 2px solid rgba(255, 255, 255, 0.08);
  background: rgba(7, 13, 28, 0.72);
  border-radius: 18px;
  margin: 12px 0;
  padding: 14px;
  display: grid;
  grid-template-columns: 105px 1fr;
  gap: 12px;
  align-items: center;
}

.level-label {
  font-weight: 950;
  color: #ffe382;
  text-shadow: 0 2px 0 #000;
}

.quest-squares {
  display: grid;
  grid-template-columns: repeat(5, minmax(82px, 1fr));
  gap: 10px;
}

.q-square {
  position: relative;
  min-height: 74px;
  border: 0;
  border-radius: 14px;
  color: #fff;
  text-align: left;
  padding: 10px;
  font-weight: 950;
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, .16),
    0 8px 0 rgba(0, 0, 0, .18);
  transition: .15s transform, .15s filter;
}

.q-square:hover {
  transform: translateY(-3px);
  filter: brightness(1.12);
}

.q-square.locked,
.q-square.completed.locked {
  opacity: .34;
  cursor: not-allowed;
  filter: grayscale(.5);
}

.q-square .small {
  display: block;
  font-size: 11px;
  opacity: .9;
  margin-top: 4px;
  font-weight: 850;
}

.q-square .mark {
  position: absolute;
  right: 9px;
  bottom: 7px;
}

.easy {
  background: linear-gradient(135deg, #138d55, #55df99);
}

.medium {
  background: linear-gradient(135deg, #c66f16, #ffbf5e);
}

.hard {
  background: linear-gradient(135deg, #ad2337, #ff6b7a);
}

.premiumGrad {
  background: linear-gradient(135deg, #5f3bd5, #d65ee6);
}

.completed {
  outline: 3px solid rgba(255, 255, 255, .45);
}

/* BUTTONS */

button,
.btn {
  border: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffe56c, #ffb02e);
  color: #271500;
  font-weight: 950;
  padding: 11px 16px;
  text-decoration: none;
  box-shadow: 0 5px 0 #8a4d00;
}

button:hover,
.btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.06);
}

.btn.secondary,
button.secondary {
  background: linear-gradient(180deg, #263b66, #172340);
  color: #fff;
  border: 1px solid #4f6f9d;
  box-shadow: 0 4px 0 rgba(0, 0, 0, .35);
}

button:disabled {
  opacity: .45;
  cursor: not-allowed;
}

/* QUEST */

.quest-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 20px;
}

.quest-title {
  font-size: 38px;
  margin: 8px 0;
  text-shadow: 0 3px 0 #1b2450;
}

.story {
  line-height: 1.75;
  color: #e7f0ff;
  font-size: 17px;
}

.task {
  background: #07101f;
  border: 1px solid var(--line);
  padding: 18px;
  border-radius: 18px;
  line-height: 1.6;
}

.tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 18px 0;
}

.tab {
  background: #172340;
  color: #fff;
  border: 1px solid #4f6f9d;
}

.tab.active {
  background: linear-gradient(180deg, #ffe56c, #ffb02e);
  color: #271500;
}

.editor {
  width: 100%;
  min-height: 330px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: #030712;
  color: #f7f0ff;
  padding: 18px;
  font-family: Consolas, monospace;
  font-size: 15px;
  line-height: 1.5;
  resize: vertical;
}

.result {
  border-radius: 16px;
  padding: 14px;
  margin-top: 14px;
  background: #07101f;
  border: 1px solid var(--line);
  white-space: pre-wrap;
}

.pass {
  color: #61e79e;
  font-weight: 950;
}

.fail {
  color: #ff7887;
}

.side-card {
  border: 1px solid var(--line);
  background: rgba(14, 24, 47, 0.92);
  border-radius: 20px;
  padding: 18px;
  margin-bottom: 14px;
}

.side-card h3 {
  margin-top: 0;
}

.hint {
  display: none;
  color: #f4dcff;
  line-height: 1.6;
}

.hint.show {
  display: block;
}

.muted {
  color: var(--muted);
}

.daily-card {
  border: 1px solid var(--line);
  background: linear-gradient(135deg, rgba(255, 216, 77, .13), rgba(66, 199, 255, .1));
  border-radius: 24px;
  padding: 26px;
}

.warning {
  background: rgba(255, 107, 122, .12);
  border: 1px solid rgba(255, 107, 122, .35);
  padding: 14px;
  border-radius: 16px;
  color: #ffdce0;
}

.footer-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 18px;
}

/* AUTH / INPUTS */

.grid2,
.auth-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 20px;
}

.input {
  width: 100%;
  display: block;
  margin: 10px 0;
  padding: 13px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #07101f;
  color: #fff;
  font-weight: 700;
}

.input::placeholder {
  color: #7d91ad;
}

.codebox {
  background: #030712;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  overflow: auto;
  color: #f7f0ff;
}

.auth-panel h2 {
  margin-bottom: 8px;
}

.paypal-box {
  margin: 18px 0;
  max-width: 460px;
}

.panel code {
  color: #ffe382;
}

.danger {
  background: linear-gradient(135deg, #ef4444, #991b1b);
  color: white;
}

/* TABLET */

@media (max-width: 1050px) {
  .category-card-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  main {
    padding-left: 22px;
    padding-right: 22px;
  }
}


/* MOBILE */

@media (max-width: 850px) {
  body {
    background:
      linear-gradient(to bottom,
        rgba(5, 9, 20, 0) 0px,
        rgba(5, 9, 20, 0.15) 360px,
        rgba(5, 9, 20, 0.65) 455px,
        #050914 560px),
      var(--bg-image) top center / auto 470px no-repeat,
      #050914;
  }





/* .topbar {
    position: relative;
    top: auto;
    min-height: 68px;
    height: auto;
    max-width: none;
    width: 100%;
    margin: 0;
    padding: 10px 14px;
    border-radius: 0;
  } */

.menu-toggle {
  top: 18px;
  left: 18px;
  width: 58px;
  height: 58px;
  font-size: 30px;
}

.brand {
  width: auto;
  max-width: calc(100% - 72px);
  justify-content: center;
  gap: 10px;
}

.logo {
  width: 42px;
  height: 42px;
}

.brand-title {
  font-size: 22px;
}

.brand-subtitle {
  font-size: 10px;
  letter-spacing: 1.5px;
}

main {
  padding: 360px 15px 60px;
}

main::before {
  top: 235px;
  font-size: 30px;
  line-height: 1.1;
  letter-spacing: 1px;
  width: 92%;
}

.hero,
.panel {
  padding: 22px;
  border-radius: 20px;
}

.hero {
  grid-template-columns: 1fr;
  gap: 18px;
}

.title {
  font-size: 36px;
}

.stats {
  gap: 9px;
}

.pill {
  padding: 8px 11px;
  font-size: 13px;
}

.section-title {
  font-size: 30px;
  margin-top: 30px;
}

.category-card-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.category-card {
  min-height: 190px;
  padding: 16px;
  border-radius: 18px;
}

.category-card-icon {
  width: 54px;
  height: 54px;
  margin-bottom: 10px;
}

.category-card h2 {
  font-size: 22px;
}

.category-card p {
  font-size: 12px;
  min-height: 48px;
}

.category-title-icon {
  width: 34px;
  height: 34px;
}

.category-head {
  align-items: flex-start;
  flex-direction: column;
}

.grid2,
.auth-grid,
.quest-layout {
  grid-template-columns: 1fr;
}

.level-row {
  grid-template-columns: 1fr;
}

.quest-squares {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.q-square {
  min-height: 72px;
}

.quest-title {
  font-size: 32px;
}

.editor {
  min-height: 260px;
  font-size: 14px;
}


/* SMALL PHONES */

@media (max-width: 480px) {
  body {
    background:
      linear-gradient(to bottom,
        rgba(5, 9, 20, 0) 0px,
        rgba(5, 9, 20, 0.12) 320px,
        rgba(5, 9, 20, 0.65) 405px,
        #050914 520px),
      var(--bg-image) top center / auto 430px no-repeat,
      #050914;
  }




  main {
    padding: 330px 14px 55px;
  }

  main::before {
    top: 215px;
    font-size: 28px;
  }

  .brand-title {
    font-size: 20px;
  }

  .brand-subtitle {
    font-size: 9px;
  }

  .category-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .category-card {
    min-height: 180px;
    padding: 14px;
  }

  .category-card h2 {
    font-size: 20px;
  }

  .category-card p {
    font-size: 11px;
  }

  .quest-squares {
    grid-template-columns: 1fr;
  }
}

/* VERY SMALL PHONES */

@media (max-width: 360px) {
  .category-card-grid {
    grid-template-columns: 1fr;
  }

  main::before {
    font-size: 24px;
  }

  .brand-title {
    font-size: 18px;
  }
}
}