:root {
  --bg: #0f1221;
  --body-bg: #0b0f1d;
  --panel: #14182b;
  --muted: #8b93a7;
  --txt: #e9ecf1;
  --brand: #7dd3fc;
  --brand-2: #60a5fa;
  --ok: #22c55e;
  --warn: #eab308;
  --err: #ef4444;
  --radius: 18px;
  --gap: 14px;
}

:root {
  --bg: #030811;
  --card: rgba(7, 16, 28, 0.9);
  --line: #1a293b;
  --text: #f5f7ff;
  --muted: #91a0b5;
  --purple: #9b3cff;
  --blue: #3d6dff;
  --green: #5ee6a8;
  --orange: #ff9d5c;
  --radius: 16px;
}
html {
  scrollbar-width: none;
}
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
}
body {
  font-family: Inter, system-ui, sans-serif;
  background:
    radial-gradient(circle at 70% 0%, rgba(88, 39, 180, 0.13), transparent 28%),
    var(--bg);
  color: var(--text);
  line-height: 1.55;
  overflow-x: hidden;
}
a {
  text-decoration: none;
  color: inherit;
}
button,
input {
  font: inherit;
}
.site-glow {
  position: fixed;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  filter: blur(130px);
  opacity: 0.11;
  pointer-events: none;
  z-index: -1;
}
.glow-one {
  background: #8b25ff;
  top: 5%;
  right: -170px;
}
.glow-two {
  background: #276cff;
  bottom: -100px;
  left: -180px;
}
.header {
  height: 74px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 38px;
  padding: 0 4%;
  position: sticky;
  top: 0;
  background: rgba(3, 8, 17, 0.84);
  backdrop-filter: blur(20px);
  z-index: 20;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 800;
  white-space: nowrap;
}
.logo-mark {
  display: grid;
  place-items: center;
  min-width: 31px;
  height: 32px;
  border: 1px solid #873cff;
  color: #c889ff;
  border-radius: 7px;
  font: 700 11px "JetBrains Mono";
  box-shadow: 0 0 20px rgba(139, 44, 255, 0.28);
}
.nav {
  display: flex;
  align-items: center;
  gap: 27px;
  height: 100%;
}
.nav a {
  font-size: 12px;
  color: #aeb9c8;
  position: relative;
}
.nav a:hover,
.nav a.active {
  color: #c17bff;
}
.nav a.active:after {
  content: "";
  position: absolute;
  bottom: -29px;
  left: 0;
  right: 0;
  height: 2px;
  background: #b53cff;
}
.header-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}
.search {
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #07101c;
  display: flex;
  align-items: center;
  padding-left: 12px;
}
.search input {
  width: 145px;
  background: transparent;
  border: 0;
  outline: 0;
  color: white;
  font-size: 11px;
}
.search kbd {
  font-size: 9px;
  color: #738197;
  background: #101b29;
  padding: 4px 6px;
  border-radius: 5px;
}
.search button,
.icon-btn,
.menu-btn {
  border: 0;
  background: transparent;
  color: white;
  cursor: pointer;
}
.search button {
  font-size: 20px;
  padding: 0 9px;
}
.icon-btn {
  font-size: 21px;
}
.subscribe-btn,
.primary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(100deg, #8128ff, #4d5dff);
  color: white;
  font-weight: 700;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(108, 38, 255, 0.25);
}
.subscribe-btn {
  padding: 10px 15px;
  font-size: 11px;
}

.menu-btn {
  display: none;
  font-size: 21px;
}
main {
  max-width: 1440px;
  margin: auto;
  padding: 0 3%;
}

@media (max-width: 1100px) {
  main {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .header {
    padding: 0 20px;
  }

  .nav {
    position: absolute;
    top: 74px;
    left: 0;
    right: 0;
    height: auto;
    padding: 16px 20px;
    background: #07101c;
    border-bottom: 1px solid var(--line);
    display: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    z-index: 30;
  }

  .nav.open {
    display: flex;
  }

  .nav a {
    width: 100%;
    padding: 8px 0;
  }

  .nav a.active:after {
    display: none;
  }

  .menu-btn {
    display: block;
  }

  main {
    padding: 0 14px;
  }
}

@media (max-width: 560px) {
  .header {
    height: 65px;
  }

  .header-actions {
    margin-left: auto;
  }

  .logo {
    font-size: 18px;
  }
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  font-family: sans-serif;
  background: linear-gradient(180deg, var(--body-bg), var(--bg) 35%);
  color: var(--txt);
}

header {
  padding: 20px;
  background: linear-gradient(
    90deg,
    rgba(96, 165, 250, 0.15),
    rgba(125, 211, 252, 0.1)
  );
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.container {
  max-width: 1200px;
  margin-inline: auto;
  padding: 14px;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
}

.brand .logo {
  inline-size: 36px;
  block-size: 36px;
  border-radius: 10px;

  /* one-shot shorthand prevents other background props from overriding */
  background: url("https://programming-ocean.com/code-editors/newlogo.png")
    center / cover no-repeat;
}

.title {
  font-size: clamp(18px, 2vw, 22px);
}

main {
  max-width: 1516px;
  margin-inline: auto;
  padding: 18px;
  display: grid;
  grid-template-columns: 280px 1fr 360px;
  gap: var(--gap);
}

@media (max-width: 1100px) {
  main {
    grid-template-columns: 1fr;
  }
}

.card {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.05),
    rgba(255, 255, 255, 0.03)
  );
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.panel {
  padding: 16px;
}

h2,
h3 {
  margin: 0 0 12px;
}

.muted {
  color: var(--muted);
  font-size: 13px;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: space-between;
}

.btn {
  appearance: none;
  border: none;
  background: linear-gradient(180deg, var(--brand-2), var(--brand));
  color: #08111f;
  font-weight: 700;
  padding: 10px 14px;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(96, 165, 250, 0.35);
}

.btn.secondary {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--txt);
  box-shadow: none;
}

.btn.warn {
  background: linear-gradient(180deg, #f59e0b, #eab308);
}

.btn.ok {
  background: linear-gradient(180deg, #34d399, #22c55e);
}

.btn.err {
  background: linear-gradient(180deg, #fb7185, #ef4444);
}

.select,
select,
.text {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--txt);
  padding: 10px 12px;
  border-radius: 12px;
}

textarea.text {
  width: 100%;
  min-height: 120px;
}

.tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.toggle input {
  accent-color: var(--brand-2);
}

.preview-heading {
  justify-content: space-between;
}

iframe.preview:fullscreen {
  width: 100vw;
  height: 100vh;
  border: 0;
  border-radius: 0;
}

.tab {
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
  font-weight: 700;
  color: #fff !important;
}

.tab.active {
  background: linear-gradient(
    180deg,
    rgba(125, 211, 252, 0.18),
    rgba(96, 165, 250, 0.18)
  );
  color: #00ff00 !important;
}

.editor-wrap {
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  overflow: hidden;
  min-height: 280px;
  background: #0b1020;
}

.editor {
  inline-size: 100%;

  block-size: 380px;
}

iframe.preview {
  inline-size: 100%;
  block-size: 380px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  background: white;
}

.out {
  /* font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Cascadia Code", "DejaVu Sans Mono", monospace;  */
  background: #0a0e1a;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 10px;
  min-height: 160px;
  overflow: auto;
  white-space: pre-wrap;
}

.footer {
  opacity: 0.7;
  font-size: 12px;
  text-align: center;
  padding: 12px;
}

.kbd {
  font-family:
    ui-monospace, SFMono-Regular, Menlo, Consolas, "Cascadia Code", monospace;
  background: #0e1324;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 2px 6px;
}

label {
  font-size: 13px;
  color: var(--muted);
}

body.light {
  color-scheme: light;
  --bg: #f4f7fb;
  --body-bg: #e9eef6;
  --panel: #ffffff;
  --line: #d9e1ec;
  --muted: #667085;
  --txt: #172033;
  --brand: #7227e8;
  --brand-2: #315fe8;
  background:
    radial-gradient(circle at 70% 0%, rgba(114, 39, 232, 0.08), transparent 28%),
    var(--bg);
  color: var(--txt);
}

body.light header {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.92);
  color: var(--txt);
}

body.light .nav {
  background: #fff;
  border-color: var(--line);
}

body.light .nav a {
  color: #596579;
}

body.light .nav a:hover,
body.light .nav a.active {
  color: #7227e8;
}

body.light .icon-btn,
body.light .menu-btn {
  color: var(--txt);
}

body.light .card {
  border-color: var(--line);
  background: #fff;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

body.light .btn.secondary {
  border-color: #cbd5e1;
  color: var(--txt);
}

body.light .select,
body.light select,
body.light .text {
  border-color: #cbd5e1;
  background: #f8fafc;
  color: var(--txt);
}

body.light .tab {
  border-color: #cbd5e1;
  background: #f8fafc;
  color: #344054 !important;
}

body.light .tab.active {
  border-color: #c4b5fd;
  background: #f3e8ff;
  color: #5b21b6 !important;
}

body.light .footer {
  color: #667085;
}

body.light .kbd {
  border-color: #d9e1ec;
  background: #eef2f7;
  color: #344054;
}
