:root {
  --bg: #0d1117;
  --bg2: #161b22;
  --bg3: #1c2333;
  --text: #e6edf3;
  --text-dim: #8b949e;
  --accent: #58a6ff;
  --accent2: #bc8cff;
  --border: #30363d;
  --red: #f85149;
  --green: #3fb950;
  --radius: 12px;
  --shadow: 0 4px 24px rgba(0,0,0,.4);
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0 }
html { scroll-behavior: smooth }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}
a { color: var(--accent); text-decoration: none }
a:hover { text-decoration: underline }
img { max-width: 100%; height: auto }

/* ========== GLOBAL TYPOGRAPHY ========== */
h1, h2, h3, h4, h5 { line-height: 1.3; font-weight: 700 }
h1 {
  text-align: center;
  padding: 40px 24px 0;
  font-size: clamp(28px, 4vw, 44px);
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
h2 { font-size: 22px; margin: 36px 0 12px; color: var(--text) }
h3 { font-size: 16px; font-weight: 400; color: var(--text-dim); line-height: 1.8 }
h4 { font-size: 15px; color: var(--text-dim); font-weight: 600; margin: 20px 0 8px }
h5 { font-size: 14px; color: var(--text-dim); font-weight: 400; margin: 4px 0 }
hr { border: none; border-top: 1px solid var(--border); margin: 28px 0 }

/* ========== NAV ========== */
nav {
  background: rgba(22,27,34,.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  max-width: 720px;
  margin: 20px auto 0;
  padding: 0 6px;
  display: flex;
  align-items: center;
  height: 50px;
  transition: box-shadow .3s;
}
nav:hover { box-shadow: 0 2px 16px rgba(0,0,0,.3) }
nav ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 2px;
  height: 100%;
  width: 100%;
  justify-content: center;
}
nav ul li { height: 100%; display: flex; align-items: center }
nav ul li a {
  color: var(--text-dim);
  padding: 8px 18px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  transition: all .2s;
  white-space: nowrap;
  letter-spacing: .3px;
}
nav ul li a:hover {
  color: #fff;
  background: var(--bg3);
  text-decoration: none;
}
nav ul li:first-child a { font-size: 20px; padding: 8px 14px }

/* ========== CONTENT ========== */
.content {
  max-width: 720px;
  margin: 0 auto;
  padding: 28px 24px 48px;
}
.content h2 {
  font-size: 22px;
  margin: 36px 0 12px;
  color: var(--text);
  padding-left: 12px;
  border-left: 3px solid var(--accent);
}
.content h3 { font-size: 16px; font-weight: 400; color: var(--text-dim); margin: 10px 0; line-height: 1.8 }
.content h4 { font-size: 15px; color: var(--text-dim); font-weight: 600; margin: 20px 0 8px }
.content h5 { font-size: 14px; color: var(--text-dim); font-weight: 400; margin: 4px 0 }
.content p { font-size: 16px; color: var(--text-dim); margin: 10px 0; line-height: 1.8 }
.content ul { margin: 10px 0 10px 24px }
.content li { font-size: 16px; color: var(--text-dim); line-height: 1.8; margin: 4px 0 }
.content a { color: var(--accent); font-weight: 500; transition: color .2s }
.content a:hover { color: #79c0ff; text-decoration: underline }

/* ========== IMAGES ========== */
.content img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(0,0,0,.35);
  border: 1px solid var(--border);
  display: block;
  margin: 28px auto;
  transition: transform .3s, box-shadow .3s;
}
.content img:hover {
  transform: scale(1.01);
  box-shadow: 0 8px 40px rgba(0,0,0,.5);
}
.content li img {
  display: inline;
  margin: 0 6px 0 0;
  vertical-align: middle;
  max-height: 28px;
  width: auto;
  border-radius: 4px;
  box-shadow: none;
  border: none;
}
.content li img:hover { transform: none; box-shadow: none }
.content div { text-align: center }
.content div img { display: inline-block; margin: 20px auto }

/* ========== TABLES ========== */
.content table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 14px;
  color: var(--text-dim);
}
.content table, .content th, .content td {
  border: 1px solid var(--border);
}
.content th, .content td {
  padding: 8px 12px;
  text-align: left;
}
.content th {
  background: var(--bg3);
  color: var(--text);
  font-weight: 600;
}
.content caption {
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
  text-align: left;
}

/* ========== FOOTER ========== */
footer {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  padding: 48px 24px 32px;
  margin-top: 80px;
}
.footer-content {
  max-width: 720px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 32px;
}
.footer-section h3 {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--text-dim);
  margin-bottom: 14px;
  opacity: .7;
}
.footer-section p { font-size: 14px; color: var(--text-dim); margin: 0 }
.footer-section ul { list-style: none; padding: 0 }
.footer-section ul li { margin-bottom: 8px }
.footer-section ul li a { color: var(--text-dim); font-size: 14px; transition: color .2s }
.footer-section ul li a:hover { color: var(--accent) }
.footer-section a { color: var(--text-dim); font-size: 14px; display: block; margin-bottom: 8px; transition: color .2s }
.footer-section a:hover { color: var(--accent) }
.footer-bottom {
  max-width: 720px;
  margin: 28px auto 0;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--text-dim);
  font-size: 13px;
  opacity: .6;
}
.social-media-icons a {
  color: var(--text-dim);
  font-size: 14px;
  display: block;
  margin-bottom: 8px;
  transition: color .2s;
}
.social-media-icons a:hover { color: var(--accent) }

/* ========== INDEX NAV ========== */
#navbartop {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: rgba(13,17,23,.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
#navbartop .First {
  color: var(--text);
  font-size: 18px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 8px;
  transition: background .2s;
}
#navbartop .First:hover { background: var(--bg3); text-decoration: none }
.nav-inline { display: flex; align-items: center; gap: 8px }
.nav-inline a {
  color: var(--text-dim);
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  transition: all .2s;
}
.nav-inline a:hover { color: var(--text); background: var(--bg3); text-decoration: none }
.nav-dropdown { display: none }
.hamburger {
  display: none;
  flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 8px;
}
.hamburger span {
  display: block; width: 24px; height: 2px;
  background: var(--text); border-radius: 2px;
  transition: all .3s;
}
.hamburger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg) }
.hamburger.active span:nth-child(2) { opacity: 0 }
.hamburger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg) }
.nav-overlay {
  position: fixed; inset: 0; z-index: 999;
  background: rgba(0,0,0,.6); opacity: 0; pointer-events: none;
  transition: opacity .3s;
}
.nav-overlay.active { opacity: 1; pointer-events: auto }
.hero-wrap {
  padding: 120px 24px 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 50vh;
  text-align: center;
}
.section {
  max-width: 960px;
  margin: 0 auto;
  padding: 40px 24px;
}
.section-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 24px;
  color: var(--text);
  letter-spacing: -.3px;
}
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: all .25s;
  display: block;
  position: relative;
}
.card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  text-decoration: none;
}
.card h3 { font-size: 17px; font-weight: 600; margin-bottom: 6px; color: var(--text) }
.card p { font-size: 14px; color: var(--text-dim); margin: 0 }
.card-new { border-color: var(--green) }
.card-new:hover { border-color: var(--green); box-shadow: 0 4px 24px rgba(63,185,80,.2) }
.card-badge {
  position: absolute; top: -8px; right: 12px;
  background: var(--green); color: #fff;
  font-size: 11px; font-weight: 700;
  padding: 2px 10px; border-radius: 20px;
  text-transform: uppercase; letter-spacing: .5px;
}
.monthly-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 8px;
}
.monthly-item {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 16px;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  transition: all .2s;
  text-align: center;
}
.monthly-item:hover {
  border-color: var(--accent);
  color: var(--accent);
  text-decoration: none;
  transform: translateY(-1px);
}
.monthly-divider { grid-column: 1 / -1; border: none; border-top: 1px solid var(--border); margin: 8px 0 }

/* ========== MOBILE ========== */
@media (max-width: 768px) {
  nav {
    margin: 10px 12px 0;
    max-width: none;
    width: calc(100% - 24px);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    backdrop-filter: none;
    height: 46px;
    padding: 0 4px;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  nav::-webkit-scrollbar { display: none }
  nav ul {
    justify-content: flex-start;
    padding: 0;
    gap: 4px;
    flex-wrap: nowrap;
    width: max-content;
    height: 100%;
  }
  nav ul li a {
    font-size: 13px;
    padding: 10px 16px;
    border-radius: 20px;
    white-space: nowrap;
    letter-spacing: 0;
    color: var(--text-dim);
  }
  nav ul li:first-child a { font-size: 17px; padding: 10px 14px }
  nav ul li a:hover { background: var(--bg3); color: #fff }

  #navbartop { padding: 0 16px; height: 54px }
  #navbartop .First { font-size: 16px; padding: 6px 12px; border-radius: 10px }
  .nav-inline { display: none }
  .nav-dropdown {
    display: flex;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    flex-direction: column;
    position: fixed;
    top: 62px;
    left: 8px;
    right: 8px;
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 8px;
    gap: 2px;
    box-shadow: 0 12px 32px rgba(0,0,0,.5);
    z-index: 1000;
    transition: opacity .2s, visibility .2s;
  }
  .nav-dropdown.open { visibility: visible; opacity: 1; pointer-events: auto }
  .nav-dropdown a {
    font-size: 15px;
    padding: 14px 16px;
    border-radius: 12px;
    color: var(--text-dim);
  }
  .nav-dropdown a:active { background: var(--bg3); color: #fff }
  .hamburger { display: flex; padding: 6px; z-index: 1001 }
  .hamburger span { width: 22px; height: 2px; background: var(--text) }
  .hamburger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg) }
  .hamburger.active span:nth-child(2) { opacity: 0 }
  .hamburger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg) }
  .nav-overlay.active { z-index: 998 }

  .content { padding: 16px }
  .content h2 { font-size: 18px; border-left-width: 2px; padding-left: 8px; margin: 28px 0 10px }
  .content h3 { font-size: 15px; line-height: 1.7 }
  .content img { border-radius: 8px; margin: 20px auto }
  .content img:hover { transform: none }
  .content li img { max-height: 22px }
  .content table { font-size: 12px }
  .content th, .content td { padding: 6px 8px }
  .footer-content { grid-template-columns: 1fr 1fr; gap: 20px }
  footer { padding: 32px 16px 24px; margin-top: 40px }
  h1 { padding: 28px 16px 0; font-size: clamp(24px, 6vw, 32px) }
  .hero-wrap { padding: 80px 16px 32px; min-height: auto }
  .section { padding: 24px 16px }
  .card-grid { grid-template-columns: 1fr }
  .monthly-list { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)) }
  .monthly-item { font-size: 13px; padding: 8px 12px }
}

@media (max-width: 480px) {
  .footer-content { grid-template-columns: 1fr }
  nav { margin: 8px 8px 0; height: 42px }
  nav ul li a { font-size: 12px; padding: 6px 12px }
  nav ul li:first-child a { font-size: 16px; padding: 6px 10px }
  .content { padding: 12px }
  .content h2 { border-left: none; padding-left: 0; font-size: 16px }
  .content h3 { font-size: 14px }
  .monthly-list { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)) }
  .monthly-item { font-size: 12px; padding: 6px 10px }
}
