:root {
  --primary: #dc2626;
  --primary-dark: #991b1b;
  --accent: #fbbf24;
  --bg-dark: #0a0a0a;
  --bg-card: #141414;
  --bg-card-hover: #1f1f1f;
  --text: #f5f5f5;
  --text-muted: #a3a3a3;
  --border: #262626;
  --gradient: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
  --glow: 0 0 20px rgba(220, 38, 38, 0.4);
}

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

body {
  font-family: 'Rajdhani', 'Noto Sans JP', sans-serif;
  background: var(--bg-dark);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
}

.header {
  background: rgba(10, 10, 10, 0.95);
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
}

.header-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.logo {
  font-family: 'Orbitron', sans-serif;
  font-size: 28px;
  font-weight: 900;
  color: var(--text);
  text-decoration: none;
  letter-spacing: 2px;
}

.logo-accent {
  color: var(--primary);
}

.nav {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  transition: color 0.2s;
}

.nav a:hover,
.nav a.active {
  color: var(--primary);
}

main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
}

.hero {
  text-align: center;
  padding: 40px 0;
}

.hero h1 {
  font-family: 'Orbitron', sans-serif;
  font-size: 42px;
  font-weight: 900;
  margin-bottom: 24px;
  letter-spacing: 1px;
}

.highlight {
  color: var(--primary);
  text-shadow: var(--glow);
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.stat {
  text-align: center;
}

.stat-num {
  display: block;
  font-size: 32px;
  font-weight: 700;
  color: var(--accent);
}

.stat-label {
  font-size: 14px;
  color: var(--text-muted);
}

#anime-search {
  width: 100%;
  max-width: 500px;
  padding: 16px 24px;
  border-radius: 50px;
  background: var(--bg-card);
  border: 2px solid var(--border);
  color: var(--text);
  font-size: 16px;
  outline: none;
  transition: all 0.3s;
}

#anime-search:focus {
  border-color: var(--primary);
  box-shadow: var(--glow);
}

#anime-search::placeholder {
  color: var(--text-muted);
}

.ad-unit {
  margin: 2rem 0;
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg-card);
}

.ad-unit--horizontal {
  width: 100%;
}

#filter {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin: 32px 0;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 10px 20px;
  border-radius: 25px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.filter-btn:hover {
  border-color: var(--primary);
  color: var(--text);
}

.filter-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

#daftar-anime {
  padding: 20px 0;
}

#daftar-anime h2 {
  font-family: 'Orbitron', sans-serif;
  font-size: 28px;
  text-align: center;
  margin-bottom: 32px;
}

#card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.anime-card {
  display: block;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  text-decoration: none;
  color: var(--text);
  position: relative;
  transition: all 0.3s;
}

.anime-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--primary);
  transform: translateY(-4px);
  box-shadow: var(--glow);
}

.anime-card.hidden {
  display: none;
}

.rank-badge {
  position: absolute;
  top: -10px;
  right: 16px;
  background: var(--gradient);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
}

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.site-icon {
  font-size: 36px;
}

.card-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.badge {
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.badge-top {
  background: var(--accent);
  color: #000;
}

.badge-hd {
  background: #3b82f6;
  color: white;
}

.badge-sub {
  background: #22c55e;
  color: white;
}

.badge-free {
  background: #a855f7;
  color: white;
}

.badge-dub {
  background: #f97316;
  color: white;
}

.card-name {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 4px;
}

.card-url {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 12px;
  word-break: break-all;
}

.card-desc {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 16px;
  line-height: 1.5;
}

.card-meta {
  display: flex;
  gap: 16px;
  font-size: 13px;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.dot-green {
  background: #22c55e;
}

.dot-red {
  background: #ef4444;
}

.card-arrow {
  position: absolute;
  bottom: 20px;
  right: 20px;
  font-size: 24px;
  color: var(--primary);
  opacity: 0;
  transition: opacity 0.2s;
}

.anime-card:hover .card-arrow {
  opacity: 1;
}

.tips,
.faq {
  margin: 60px 0;
  padding: 40px;
  background: var(--bg-card);
  border-radius: 12px;
}

.tips h3,
.faq h3 {
  font-family: 'Orbitron', sans-serif;
  font-size: 24px;
  margin-bottom: 20px;
  color: var(--primary);
}

.tips p {
  margin-bottom: 16px;
  line-height: 1.8;
}

.faq-item {
  margin-bottom: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.faq-question {
  width: 100%;
  padding: 16px 20px;
  background: var(--bg-card-hover);
  border: none;
  color: var(--text);
  font-size: 16px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-question::after {
  content: '+';
  font-size: 20px;
  color: var(--primary);
}

.faq-item.active .faq-question::after {
  content: '-';
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.faq-item.active .faq-answer {
  max-height: 200px;
}

.faq-answer p {
  padding: 16px 20px;
  color: var(--text-muted);
}

.footer {
  text-align: center;
  padding: 40px 20px;
  border-top: 1px solid var(--border);
  margin-top: 60px;
}

.footer p {
  color: var(--text-muted);
  font-size: 14px;
}

#back-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--primary);
  border: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
  box-shadow: var(--glow);
}

#back-to-top.show {
  opacity: 1;
  visibility: visible;
}

#back-to-top:hover {
  transform: translateY(-4px);
}

@media (max-width: 768px) {
  .hero h1 {
    font-size: 28px;
  }

  .hero-stats {
    gap: 24px;
  }

  .header-content {
    justify-content: center;
    text-align: center;
  }

  #card-grid {
    grid-template-columns: 1fr;
  }

  .tips,
  .faq {
    padding: 24px;
  }
}