:root {
  --bg: #0e0f11;
  --bg2: #141519;
  --bg3: #1c1d23;
  --bg4: #23252d;
  --surface: #1a1b22;
  --border: #2a2c36;
  --border2: #383b48;
  --text: #e8e9f0;
  --text2: #9a9cb0;
  --text3: #5c5e72;
  --accent: #e8703a;
  --accent2: #f0955f;
  --accentbg: rgba(232,112,58,0.1);
  --accentborder: rgba(232,112,58,0.25);
  --green: #4caf7d;
  --greenbg: rgba(76,175,125,0.1);
  --blue: #5b8dd9;
  --bluebg: rgba(91,141,217,0.1);
  --purple: #9b72dd;
  --purplebg: rgba(155,114,221,0.1);
  --rust: #d4644a;
  --rustbg: rgba(212,100,74,0.1);
  --java: #e8a020;
  --javabg: rgba(232,160,32,0.1);
  --radius: 6px;
  --radius-lg: 10px;
  --mono: 'JetBrains Mono', monospace;
  --sans: 'Syne', sans-serif;
  --serif: 'Literata', Georgia, serif;
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.75;
  min-height: 100vh;
  overflow-x: hidden;
}

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--bg4); border: 2px solid var(--bg); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--border2); }

a { color: inherit; text-decoration: none; }

header {
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
  height: 56px;
  display: flex;
  align-items: center;
  gap: 2rem;
}

.logo {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 18px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.logo-dot { width: 8px; height: 8px; background: var(--accent); border-radius: 50%; display: inline-block; }

nav { display: flex; align-items: center; gap: 0; flex: 1; overflow-x: auto; }

.nav-link {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  color: var(--text2);
  padding: 0 12px;
  height: 56px;
  display: flex;
  align-items: center;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
  white-space: nowrap;
}

.nav-link:hover { color: var(--text); }
.nav-link.active { color: var(--accent); border-bottom-color: var(--accent); }

.header-search {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 6px 12px;
  width: 200px;
  flex-shrink: 0;
}

.header-search input {
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-family: var(--sans);
  font-size: 13px;
  width: 100%;
}

.lang-picker { position: relative; display: inline-block; }
.lang-picker-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text2);
  font-family: var(--sans);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s;
  height: 34px;
  min-width: 120px;
}

.lang-picker-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  width: 180px;
  max-height: 400px;
  overflow-y: auto;
  z-index: 200;
  box-shadow: 0 10px 25px rgba(0,0,0,0.5);
}

.lang-picker.show .lang-picker-dropdown { display: block; }

.lang-option {
  display: block;
  padding: 10px 16px;
  color: var(--text2);
  font-family: var(--sans);
  font-size: 13px;
}

.lang-option:hover { background: var(--bg4); color: var(--text); }
.lang-option.active { color: var(--accent); font-weight: 600; }

.hero {
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  padding: 6rem 1rem;
  text-align: center;
}

.hero-title {
  font-family: var(--sans);
  font-size: clamp(32px, 6vw, 64px);
  font-weight: 800;
  margin-bottom: 1.5rem;
  color: var(--text);
}

.hero-subtitle {
  font-size: 20px;
  color: var(--text2);
  max-width: 700px;
  margin: 0 auto 3.5rem;
}

.big-search {
  max-width: 700px;
  margin: 0 auto;
  display: flex;
  background: var(--bg3);
  border: 2px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.big-search input {
  flex: 1;
  background: none;
  border: none;
  padding: 18px 24px;
  color: var(--text);
  font-family: var(--sans);
  font-size: 18px;
  outline: none;
}

.big-search button {
  background: var(--accent);
  color: white;
  border: none;
  padding: 0 32px;
  font-family: var(--sans);
  font-weight: 700;
  cursor: pointer;
}

.page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 1rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 4rem;
}

@media (max-width: 1024px) {
  .page { grid-template-columns: 1fr; gap: 3rem; }
}

.section-title {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 700;
  color: var(--text3);
  text-transform: uppercase;
  margin-bottom: 2.5rem;
  display: block;
}

.snippet-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-bottom: 2rem;
}

.snippet-title {
  font-family: var(--sans);
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
  display: block;
}

.snippet-desc {
  font-size: 15px;
  color: var(--text2);
  line-height: 1.7;
  margin-bottom: 18px;
}

.aside-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.volume-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 8px;
}

.ad-leaderboard, .ad-footer-bar {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem;
}

.ad-placeholder {
  background: var(--bg3);
  border: 1px dashed var(--border2);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text3);
  min-height: 90px;
  width: 100%;
}

.network-bar { background: var(--bg2); border-top: 1px solid var(--border); padding: 4rem 1rem; }
.network-inner { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 3rem; }
.network-col-title { font-family: var(--sans); font-size: 11px; font-weight: 700; color: var(--text3); text-transform: uppercase; margin-bottom: 1.5rem; display: block; }
.network-links { display: flex; flex-direction: column; gap: 10px; }

footer { background: var(--bg2); border-top: 1px solid var(--border); padding: 3rem 1rem; margin-top: 4rem; }
.footer-inner { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 2rem; }
.footer-bottom { max-width: 1200px; margin: 2rem auto 0; padding-top: 1.5rem; border-top: 1px solid var(--border); display: flex; justify-content: space-between; font-size: 12px; color: var(--text3); }

.cookie-banner { display: none; position: fixed; bottom: 2rem; left: 2rem; right: 2rem; max-width: 500px; background: var(--bg2); border: 1px solid var(--border2); border-radius: 12px; padding: 1.5rem; z-index: 300; box-shadow: 0 20px 50px rgba(0,0,0,0.6); }
.cookie-banner.show { display: block; }
.cookie-text { font-family: var(--sans); font-size: 14px; color: var(--text); margin-bottom: 1.25rem; line-height: 1.5; }
.cookie-btns { display: flex; gap: 12px; }
.cookie-btn { flex: 1; padding: 10px; border-radius: var(--radius); font-family: var(--sans); font-size: 13px; font-weight: 600; cursor: pointer; border: none; text-align: center; }
.cookie-btn-primary { background: var(--accent); color: white; }
.cookie-btn-secondary { background: var(--bg4); color: var(--text2); border: 1px solid var(--border2); }

/* Snippet Specific */
.snippet-header { margin-bottom: 2rem; }
.snippet-title { font-size: clamp(24px, 4vw, 32px); }
.snippet-byline { display: flex; gap: 16px; font-size: 13px; color: var(--text2); flex-wrap: wrap; }
.desc-box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.5rem; margin-bottom: 2rem; }
.ai-summary { background: linear-gradient(135deg, rgba(232,112,58,0.06) 0%, rgba(155,114,221,0.06) 100%); border: 1px solid var(--accentborder); border-radius: var(--radius-lg); padding: 1.25rem 1.5rem; margin-bottom: 2rem; display: flex; gap: 12px; }
.code-wrapper { background: var(--bg2); border: 1px solid var(--border); border-radius: 0 0 var(--radius-lg) var(--radius-lg); overflow: hidden; margin-bottom: 2rem; }
.code-toolbar { display: flex; justify-content: space-between; padding: 8px 14px; background: var(--bg3); border-bottom: 1px solid var(--border); }
pre { overflow-x: auto; padding: 1.5rem; font-family: var(--mono); font-size: 13px; color: #c9cdd8; }
.lang-tab { padding: 10px 18px; cursor: pointer; border-bottom: 2px solid transparent; transition: 0.15s; }
.lang-tab.active { border-bottom-color: var(--accent); color: var(--text); }
.code-pane { display: none; }
.code-pane.active { display: block; }
