:root {
  --primary: #4a9eff;
  --bg-dark: #0a0e1a;
  --bg-card: #1e2538;
  --text-light: #e8eaf0;
  --text-muted: #9ca3af;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg-dark);
  color: var(--text-light);
  line-height: 1.6;
  min-height: 100vh;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

header {
  background: linear-gradient(135deg, #1a1f3a 0%, #0f1423 100%);
  padding: 16px 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
}

nav {
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

nav a {
  flex: 1 1 0;
  min-width: 0;
  text-align: center;
  padding: 10px 8px;
  color: #a8b2d1;
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border-radius: 6px;
  transition: all 0.3s ease;
  font-weight: 500;
}

nav a:hover,
nav a.active {
  background: rgba(74, 158, 255, 0.15);
  color: var(--primary);
  text-decoration: none;
  transform: translateY(-1px);
}

@media (max-width: 768px) {
  nav a {
    font-size: 13px;
    padding: 8px 4px;
  }
}

@media (max-width: 480px) {
  nav a {
    font-size: 12px;
    padding: 6px 2px;
  }
}

.hero {
  padding: 60px 0 40px;
  text-align: center;
  background: linear-gradient(to bottom, rgba(74, 158, 255, 0.08), transparent);
}

h1 {
  font-size: 2.2em;
  margin-bottom: 20px;
  color: #fff;
  font-weight: 700;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

@media (max-width: 768px) {
  h1 {
    font-size: 1.6em;
  }
}

.intro {
  max-width: 900px;
  margin: 0 auto 40px;
  color: var(--text-muted);
  font-size: 1.05em;
  line-height: 1.8;
}

.section {
  margin: 60px 0;
}

.section h2 {
  font-size: 1.8em;
  margin-bottom: 28px;
  color: #fff;
  border-left: 4px solid var(--primary);
  padding-left: 16px;
  font-weight: 600;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

@media (max-width: 768px) {
  .grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
  }
}

.card {
  background: linear-gradient(135deg, var(--bg-card) 0%, #151925 100%);
  padding: 24px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
  border: 1px solid rgba(74, 158, 255, 0.1);
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 8px 24px rgba(74, 158, 255, 0.25);
  border-color: rgba(74, 158, 255, 0.3);
}

.card h3 {
  font-size: 1.25em;
  margin-bottom: 12px;
  color: var(--primary);
  font-weight: 600;
  line-height: 1.4;
}

.card h3 a {
  color: var(--primary);
  transition: color 0.3s;
}

.card h3 a:hover {
  color: #6bb3ff;
  text-decoration: none;
}

.card .meta {
  color: #6b7280;
  font-size: 0.9em;
  margin-bottom: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.card .desc {
  color: var(--text-muted);
  font-size: 0.95em;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

footer {
  margin-top: 80px;
  padding: 30px 0;
  background: #0f1423;
  text-align: center;
  color: #6b7280;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: all 0.3s;
}

a:hover {
  color: #6bb3ff;
  text-decoration: underline;
}

.back-to-top {
  position: fixed;
  bottom: 40px;
  right: 40px;
  width: 50px;
  height: 50px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(74, 158, 255, 0.4);
  transition: all 0.3s;
  z-index: 999;
}

.back-to-top:hover {
  background: #6bb3ff;
  transform: translateY(-4px);
  box-shadow: 0 6px 20px rgba(74, 158, 255, 0.6);
}

.back-to-top.show {
  display: flex;
}
