:root {
  --bg: #1e1f22;
  --bg-2: #24262b;
  --panel: #2b2d31;
  --panel-strong: #202227;
  --border: #3b3d42;
  --soft: #a3a8b3;
  --text: #eceff3;
  --muted: #9aa2ad;
  --accent: #6ad5a6;
  --accent-2: #a6d7ff;
  --warning: #f0c36a;
  --keyword: #d49d68;
  --string: #c3e88d;
  --comment: #6f7b8d;
  --purple: #c9a0ff;
  --danger: #ff7b72;
  --ide-link: #6cc8ff;
  --ide-link-hover: #9ad9ff;
  --ide-link-visited: #b79cff;
  --ide-link-active: #7ae0b1;
}

* {
  box-sizing: border-box;
}

a {
  color: var(--ide-link);
  text-decoration: none;
  transition: color 0.15s ease, opacity 0.15s ease;
}

a:hover {
  color: var(--ide-link-hover);
  text-decoration: underline;
  text-underline-offset: 3px;
}

a:visited {
  color: var(--ide-link-visited);
}

a:active {
  color: var(--ide-link-active);
}

.link-inline {
  color: var(--ide-link);
  font-weight: 500;
}

html, body {
  margin: 0;
  min-height: 100%;
  background: radial-gradient(circle at top, rgba(106, 213, 166, 0.12), transparent 28%), linear-gradient(180deg, #1a1b1f 0%, #16181c 100%);
  color: var(--text);
  font-family: "Segoe UI", Inter, sans-serif;
}

body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
}

.ide {
  width: min(1120px, 100%);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.42);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 52px;
  background: var(--panel-strong);
  border-bottom: 1px solid var(--border);
  padding: 0 16px;
}

.traffic {
  display: flex;
  gap: 10px;
  align-items: center;
  min-width: 90px;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
}

.dot.red { background: #ff5f57; }
.dot.yellow { background: #ffbd2f; }
.dot.green { background: #28c840; }

.tabs {
  display: flex;
  gap: 8px;
  align-items: center;
  flex: 1;
  justify-content: center;
}

.tab {
  padding: 8px 14px;
  border-radius: 10px 10px 0 0;
  font-size: 12px;
  color: var(--muted);
  border: 1px solid transparent;
  border-bottom: none;
  background: transparent;
}

.tab.active {
  color: var(--text);
  background: var(--bg);
  border-color: var(--border);
}

.workspace {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  min-height: 720px;
}

.sidebar {
  background: rgba(43, 45, 49, 0.9);
  border-right: 1px solid var(--border);
  padding: 20px 16px;
}

.side-title {
  color: var(--soft);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 11px;
  margin-bottom: 18px;
  padding-left: 8px;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 10px;
  border-radius: 8px;
  color: var(--text);
  font-size: 13px;
  background: transparent;
  border: 1px solid transparent;
  transition: 0.2s ease;
  cursor: default;
}

.nav-item.active {
  background: rgba(106, 213, 166, 0.12);
  border-color: rgba(106, 213, 166, 0.25);
  color: var(--accent);
}

.nav-item .bullet {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--accent);
  opacity: 0.9;
}

.nav-item:nth-child(2) .bullet { background: var(--accent-2); }
.nav-item:nth-child(3) .bullet { background: var(--warning); }
.nav-item:nth-child(4) .bullet { background: var(--purple); }
.nav-item:nth-child(5) .bullet { background: var(--danger); }

.editor {
  background: #1f2125;
  display: flex;
  flex-direction: column;
}

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 42px;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--border);
  padding: 0 18px;
  color: var(--muted);
  font-size: 12px;
  font-family: "Consolas", monospace;
}

.crumb { opacity: 0.8; }
.crumb:last-child { color: var(--text); }

.content {
  padding: 28px 34px 30px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.title-wrap h1 {
  margin: 0;
  font-size: clamp(1.9rem, 2.4vw, 2.8rem);
  font-weight: 700;
  letter-spacing: -0.04em;
}

.role {
  margin-top: 8px;
  color: var(--accent);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  color: var(--muted);
  font-size: 12px;
  margin-top: 14px;
}

.chip {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  border-radius: 999px;
  padding: 7px 10px;
  white-space: nowrap;
}

.avatar {
  width: 78px;
  height: 78px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(106, 213, 166, 0.35), rgba(166, 215, 255, 0.25));
  border: 1px solid rgba(106, 213, 166, 0.4);
  color: var(--text);
  display: grid;
  place-items: center;
  font-size: 1.8rem;
  font-weight: 700;
  box-shadow: inset 0 0 20px rgba(255, 255, 255, 0.04);
}

.grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 20px;
}

.card {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.01);
  border-radius: 12px;
  overflow: hidden;
}

.card-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  font-size: 12px;
  color: var(--soft);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 600;
}

.card-body {
  padding: 16px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text);
}

.code {
  margin: 0;
  font-family: "Consolas", "SFMono-Regular", monospace;
  font-size: 13px;
  line-height: 1.8;
  color: var(--text);
  white-space: pre-wrap;
  word-wrap: break-word;
}

.token-key { color: var(--keyword); }
.token-string { color: var(--string); }
.token-attr { color: var(--accent-2); }
.token-number { color: var(--warning); }
.token-comment { color: var(--comment); }

.list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.list li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.list li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.point {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  margin-top: 7px;
  flex-shrink: 0;
}

.list strong {
  display: block;
  color: var(--text);
  font-size: 14px;
  margin-bottom: 3px;
}

.sub {
  color: var(--muted);
  font-size: 12px;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.tag {
  display: inline-block;
  padding: 6px 10px;
  font-size: 12px;
  border-radius: 999px;
  border: 1px solid rgba(106, 213, 166, 0.3);
  background: rgba(106, 213, 166, 0.09);
  color: var(--accent);
}

.tag:nth-child(2n) {
  border-color: rgba(166, 215, 255, 0.3);
  background: rgba(166, 215, 255, 0.05);
  color: var(--accent-2);
}

.tag:nth-child(3n) {
  border-color: rgba(201, 160, 255, 0.35);
  background: rgba(201, 160, 255, 0.07);
  color: var(--purple);
}

@media (max-width: 820px) {
  .workspace {
    grid-template-columns: 1fr;
  }

  .sidebar {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .grid {
    grid-template-columns: 1fr;
  }

  .hero {
    flex-direction: column;
  }

  .tabs {
    display: none;
  }

  .content {
    padding: 22px 18px 24px;
  }
}
