:root {
  --primary-color: #2c3e50;
  --secondary-color: #3498db;
  --text-color: #333;
  --bg-color: #f9f9f9;
  --card-bg: #ffffff;
  --border-color: #e0e0e0;
  --hover-color: #2980b9;
  --accent: #3498db;
  --accent-2: #9b59b6;
  --muted: #7f8c8d;
  --shadow: 0 15px 35px rgba(0,0,0,0.08);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.8;
  background: linear-gradient(135deg, #f8f9ff 0%, #e8f2ff 50%, #f0f8ff 100%);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  color: #2c3e50;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><text y="50" font-size="20" fill="rgba(100,120,200,0.02)">书</text><text x="30" y="30" font-size="15" fill="rgba(100,120,200,0.015)">读</text><text x="70" y="80" font-size="18" fill="rgba(100,120,200,0.02)">文</text></svg>') repeat;
  z-index: -1;
  pointer-events: none;
}

@keyframes float {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(1deg); }
}

.bg-orb, .bg-grid {
  display: none;
}

.hero {
  background: linear-gradient(135deg, rgba(255,255,255,0.98) 0%, rgba(248,250,255,0.95) 100%);
  backdrop-filter: blur(10px);
  padding: 4rem 2rem;
  box-shadow: 0 8px 32px rgba(0,0,0,0.08);
  border-bottom: 3px solid #f39c12;
  position: relative;
  z-index: 1;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #e74c3c, #f39c12, #f1c40f, #2ecc71, #3498db, #9b59b6);
  animation: rainbow 3s ease-in-out infinite;
}

@keyframes rainbow {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 0.8; }
}

.hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  align-items: center;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0 0 1rem;
}

.hero h1 {
  font-size: 3rem;
  margin: 0 0 1rem;
  background: linear-gradient(135deg, #2c3e50, #34495e, #e74c3c);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: bold;
}

.subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 1.2rem;
  font-style: italic;
}

.hero-panel {
  display: flex;
  gap: 1.5rem;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.stat {
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(52, 152, 219, 0.2);
  border-radius: 20px;
  padding: 1.5rem 2rem;
  min-width: 140px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(15px);
}

.stat-label {
  display: block;
  font-size: 1rem;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.stat-value {
  font-size: 2rem;
  color: var(--primary-color);
  font-weight: bold;
}

.shell {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 2rem;
  position: relative;
  z-index: 1;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(15px);
  border-radius: 20px;
  padding: 1.5rem;
  border: 1px solid rgba(255,255,255,0.3);
  box-shadow: var(--shadow);
}

.tabs {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.tab {
  border: 2px solid transparent;
  background: rgba(52, 152, 219, 0.1);
  color: var(--secondary-color);
  padding: 0.8rem 1.5rem;
  border-radius: 25px;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.3s ease;
  font-weight: 500;
}

.tab:hover {
  background: rgba(52, 152, 219, 0.15);
  transform: translateY(-2px);
}

.tab.active {
  color: #fff;
  background: linear-gradient(135deg, #3498db, #9b59b6);
  border-color: transparent;
  box-shadow: 0 8px 20px rgba(52, 152, 219, 0.3);
}

.search {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.search input {
  border: 2px solid rgba(52, 152, 219, 0.2);
  border-radius: 15px;
  padding: 0.8rem 1.2rem;
  min-width: 240px;
  font-size: 1rem;
  font-family: inherit;
  transition: all 0.3s ease;
}

.search input:focus {
  outline: none;
  border-color: var(--secondary-color);
  box-shadow: 0 4px 15px rgba(52, 152, 219, 0.2);
}

.search button {
  border: none;
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  color: #fff;
  padding: 0.8rem 1.5rem;
  border-radius: 15px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

.search button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(231, 76, 60, 0.3);
}

.toolbar {
  margin: 2rem 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.toolbar-left {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.pill {
  border: 1px solid rgba(52, 152, 219, 0.2);
  border-radius: 25px;
  padding: 0.6rem 1.2rem;
  background: rgba(255, 255, 255, 0.9);
  font-size: 0.95rem;
  color: var(--muted);
}

.select {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-size: 1rem;
  color: var(--muted);
}

.select select {
  border-radius: 12px;
  border: 2px solid rgba(52, 152, 219, 0.2);
  padding: 0.6rem 1rem;
  font-family: inherit;
  font-size: 1rem;
}

.list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.card {
  background: #ffffff;
  border-radius: 16px;
  padding: 2rem 2.5rem;
  border: 1px solid rgba(52, 152, 219, 0.15);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  animation: fadeInUp 0.6s ease-out forwards;
  transition: all 0.3s ease;
}

.card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

.card-head {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.2rem;
}

.badge {
  background: linear-gradient(135deg, rgba(52, 152, 219, 0.15), rgba(155, 89, 182, 0.15));
  color: var(--secondary-color);
  padding: 0.4rem 1rem;
  border-radius: 25px;
  font-size: 0.9rem;
  font-weight: 500;
}

.source {
  font-weight: 600;
  color: var(--primary-color);
}

.index {
  margin-left: auto;
  color: var(--muted);
  font-size: 0.9rem;
}

.section {
  margin-top: 1.2rem;
}

.section-title,
summary {
  font-size: 15px;
  color: #3498db;
  font-weight: 600;
  margin-bottom: 0.8rem;
}

summary {
  cursor: pointer;
  list-style: none;
  user-select: none;
}

summary::-webkit-details-marker {
  display: none;
}

.section details,
details.section {
  background: #f8f9fa;
  border-radius: 12px;
  padding: 1.2rem 1.5rem;
  border: 1px solid rgba(52, 152, 219, 0.15);
  margin-top: 0.8rem;
}

.content {
  margin-top: 0.8rem;
  color: #2c3e50;
  line-height: 1.9;
  font-size: 15px;
  letter-spacing: 0.3px;
}

.content p {
  margin: 0 0 1rem;
}

.content img {
  max-width: 100%;
  height: auto;
  border-radius: 15px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.content table {
  width: 100%;
  border-collapse: collapse;
  font-size: 1rem;
}

.content table td,
.content table th {
  border: 1px solid rgba(52, 152, 219, 0.2);
  padding: 0.8rem 1rem;
}

.content table th {
  background: rgba(52, 152, 219, 0.1);
  font-weight: 600;
}

.empty {
  color: var(--muted);
  font-style: italic;
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  align-items: center;
  justify-content: center;
  margin-top: 2rem;
}

.page-btn {
  border: 2px solid rgba(52, 152, 219, 0.2);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.9);
  padding: 0.8rem 1.2rem;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.3s ease;
  font-weight: 500;
}

.page-btn:hover {
  background: rgba(52, 152, 219, 0.1);
  transform: translateY(-2px);
}

.page-btn.active {
  background: linear-gradient(135deg, #3498db, #9b59b6);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.footer {
  text-align: center;
  color: var(--muted);
  padding: 3rem 2rem;
  font-size: 1rem;
  background: linear-gradient(135deg, #f8f9ff 0%, #e8f2ff 100%);
  border-top: 1px solid rgba(44, 62, 80, 0.1);
  position: relative;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #e74c3c, #f39c12, #f1c40f, #2ecc71, #3498db, #9b59b6);
  opacity: 0.6;
}

@media (max-width: 768px) {
  body {
    font-size: 16px;
  }

  .hero {
    padding: 3rem 1rem;
  }

  .hero h1 {
    font-size: 2.2rem;
  }

  .hero-panel {
    justify-content: flex-start;
  }

  .shell {
    padding: 2rem 1rem;
  }

  .controls {
    flex-direction: column;
    align-items: stretch;
    padding: 1.2rem;
  }

  .search {
    width: 100%;
  }

  .search input {
    flex: 1;
    min-width: 0;
  }

  .card {
    padding: 1.5rem;
  }
}
