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

:root {
  --bg-main: #0B1120;
  --bg-card: #151D2E;
  --bg-card-hover: #1A2540;
  --border: rgba(255,255,255,0.08);
  --text-main: #E0E0E0;
  --text-dim: rgba(255,255,255,0.45);
  --text-dimmer: rgba(255,255,255,0.25);
  --accent: #7C6CFF;
  --accent-dim: rgba(124,108,255,0.15);
  --green: #4CAF50;
  --red: #EF5350;
  --orange: #FFA726;
  --blue: #42A5F5;
}

body {
  background: var(--bg-main);
  color: var(--text-main);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Inter, sans-serif;
  line-height: 1.6;
}

/* === NAV === */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(11,17,32,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 30px;
  display: flex; align-items: center; height: 56px;
}
.nav-logo { font-size: 20px; font-weight: 700; color: #fff; text-decoration: none; margin-right: 40px; }
.nav-logo span { color: var(--accent); }
.nav-links { display: flex; gap: 2px; overflow-x: auto; }
.nav-links a {
  color: var(--text-dim); text-decoration: none; padding: 6px 10px;
  border-radius: 8px; font-size: 13px; font-weight: 500; transition: all 0.2s; white-space: nowrap;
}
.nav-links a:hover { color: #fff; background: var(--accent-dim); }
.nav-links a.active { color: #fff; background: var(--accent-dim); }

/* === MAIN === */
.main { max-width: 1000px; margin: 0 auto; padding: 80px 30px 60px; }

/* === PAGE HEADER === */
.page-header { margin-bottom: 30px; }
.page-header h1 { font-size: 28px; font-weight: 700; color: #fff; margin-bottom: 6px; }
.page-header p { color: var(--text-dim); font-size: 15px; }

/* === CHANGELOG === */
.changelog-controls {
  display: flex; gap: 10px; margin-bottom: 24px; flex-wrap: wrap;
}
.changelog-controls button {
  background: var(--bg-card); border: 1px solid var(--border); color: var(--text-dim);
  padding: 6px 16px; border-radius: 8px; cursor: pointer; font-size: 13px; transition: all 0.2s;
}
.changelog-controls button:hover, .changelog-controls button.active {
  background: var(--accent-dim); color: #fff; border-color: var(--accent);
}

.timeline { position: relative; padding-left: 30px; }
.timeline::before {
  content: ''; position: absolute; left: 8px; top: 0; bottom: 0;
  width: 2px; background: var(--border);
}

.timeline-item {
  position: relative; margin-bottom: 24px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 12px; padding: 20px 24px; transition: all 0.2s;
}
.timeline-item:hover { border-color: rgba(124,108,255,0.3); background: var(--bg-card-hover); }
.timeline-item::before {
  content: ''; position: absolute; left: -26px; top: 24px;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--accent); border: 2px solid var(--bg-main);
}

.timeline-item .meta {
  display: flex; align-items: center; gap: 12px; margin-bottom: 10px; flex-wrap: wrap;
}
.timeline-item .version {
  background: var(--accent-dim); color: var(--accent);
  padding: 3px 10px; border-radius: 6px; font-size: 12px; font-weight: 600;
}
.timeline-item .date { color: var(--text-dimmer); font-size: 13px; }
.timeline-item .tag {
  padding: 2px 8px; border-radius: 4px; font-size: 11px; font-weight: 600;
}
.tag-feature { background: rgba(76,175,80,0.15); color: var(--green); }
.tag-fix { background: rgba(239,83,80,0.15); color: var(--red); }
.tag-improvement { background: rgba(66,165,245,0.15); color: var(--blue); }
.tag-learning { background: rgba(255,167,38,0.15); color: var(--orange); }

.timeline-item h3 { font-size: 16px; font-weight: 600; color: #fff; margin-bottom: 6px; }
.timeline-item .desc { color: var(--text-dim); font-size: 14px; }

/* === INSTRUCTIONS === */
.instruction-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 12px; margin-bottom: 16px; overflow: hidden; transition: all 0.2s;
}
.instruction-card:hover { border-color: rgba(124,108,255,0.3); }
.instruction-card-header {
  padding: 16px 20px; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between;
}
.instruction-card-header h3 { font-size: 15px; font-weight: 600; color: #fff; }
.instruction-card-header .chevron {
  color: var(--text-dimmer); transition: transform 0.2s; font-size: 18px;
}
.instruction-card.open .chevron { transform: rotate(180deg); }
.instruction-card-body {
  display: none; padding: 0 20px 20px;
  border-top: 1px solid var(--border);
}
.instruction-card.open .instruction-card-body { display: block; padding-top: 16px; }

.instruction-card-body pre {
  background: rgba(0,0,0,0.3); border-radius: 8px; padding: 14px;
  overflow-x: auto; font-size: 13px; line-height: 1.5; color: var(--text-dim);
}
.instruction-card-body code { color: var(--accent); }
.instruction-card-body ul { padding-left: 20px; }
.instruction-card-body li { color: var(--text-dim); font-size: 14px; margin-bottom: 6px; }
.instruction-card-body p { color: var(--text-dim); font-size: 14px; margin-bottom: 10px; }
.instruction-card-body table {
  width: 100%; border-collapse: collapse; margin: 10px 0;
}
.instruction-card-body th, .instruction-card-body td {
  padding: 8px 12px; text-align: left; font-size: 13px;
  border-bottom: 1px solid var(--border);
}
.instruction-card-body th { color: var(--text-dim); font-weight: 600; }

/* === FILE BROWSER === */
.file-list { display: flex; flex-direction: column; gap: 8px; }
.file-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 10px; cursor: pointer; transition: all 0.2s;
}
.file-item:hover { background: var(--bg-card-hover); border-color: rgba(124,108,255,0.3); }
.file-icon { font-size: 22px; }
.file-name { font-size: 14px; font-weight: 500; color: #fff; }
.file-meta { color: var(--text-dimmer); font-size: 12px; margin-left: auto; }

/* === EMPTY STATE === */
.empty { text-align: center; padding: 60px 20px; color: var(--text-dimmer); }
.empty .icon { font-size: 48px; margin-bottom: 16px; }

/* === STATS BAR === */
.stats-bar {
  display: flex; gap: 16px; margin-bottom: 24px; flex-wrap: wrap;
}
.stat-item {
  background: var(--bg-card); border: 1px solid var(--border);
  padding: 12px 20px; border-radius: 10px; min-width: 140px;
}
.stat-item .label { font-size: 12px; color: var(--text-dimmer); margin-bottom: 4px; }
.stat-item .value { font-size: 22px; font-weight: 700; color: #fff; }
