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

:root {
  --bg: #0a0a0f;
  --bg2: #12121a;
  --bg3: #1a1a2e;
  --text: #e8e8f0;
  --text2: #8888a0;
  --accent: #6C5CE7;
  --accent2: #A29BFE;
  --card: #16162a;
  --border: #2a2a4a;
  --success: #00B894;
  --warning: #FDCB6E;
  --danger: #E74C3C;
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

/* Header */
.header {
  background: linear-gradient(135deg, var(--bg3), var(--bg2));
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(20px);
}

.header-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.logo-icon {
  font-size: 28px;
}

.logo-text {
  font-size: 22px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.logo-tagline {
  font-size: 11px;
  color: var(--text2);
  margin-top: -2px;
}

.nav-links {
  display: flex;
  gap: 8px;
}

.nav-link {
  color: var(--text2);
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
}

.nav-link:hover, .nav-link.active {
  color: var(--text);
  background: var(--bg3);
}

.search-box {
  display: flex;
  align-items: center;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 14px;
  gap: 8px;
  width: 280px;
  transition: border-color 0.2s;
}

.search-box:focus-within {
  border-color: var(--accent);
}

.search-box input {
  background: none;
  border: none;
  color: var(--text);
  font-size: 14px;
  width: 100%;
  outline: none;
}

.search-box input::placeholder {
  color: var(--text2);
}

/* Hero */
.hero {
  background: linear-gradient(135deg, var(--bg3) 0%, var(--bg2) 50%, var(--bg) 100%);
  padding: 60px 24px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.hero h1 {
  font-size: 42px;
  font-weight: 800;
  margin-bottom: 12px;
  background: linear-gradient(135deg, #fff, var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  font-size: 18px;
  color: var(--text2);
  max-width: 600px;
  margin: 0 auto 24px;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-top: 30px;
}

.stat {
  text-align: center;
}

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

.stat-label {
  font-size: 13px;
  color: var(--text2);
  margin-top: 4px;
}

/* Categories */
.categories {
  padding: 24px;
  max-width: 1400px;
  margin: 0 auto;
}

.section-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cat-grid {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.cat-btn {
  padding: 8px 18px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--bg2);
  color: var(--text2);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.cat-btn:hover, .cat-btn.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* Comics Grid */
.comics-section {
  padding: 0 24px 60px;
  max-width: 1400px;
  margin: 0 auto;
}

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

.comic-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  transition: all 0.3s;
  cursor: pointer;
  text-decoration: none;
  color: var(--text);
  display: block;
}

.comic-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 12px 40px rgba(108, 92, 231, 0.15);
}

.comic-cover {
  width: 100%;
  height: 280px;
  object-fit: cover;
  background: var(--bg3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 60px;
  position: relative;
  overflow: hidden;
}

.comic-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.comic-cover-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
}

.comic-status {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
}

.status-ongoing {
  background: rgba(0, 184, 148, 0.9);
  color: #fff;
}

.status-completed {
  background: rgba(108, 92, 231, 0.9);
  color: #fff;
}

.comic-source {
  position: absolute;
  bottom: 8px;
  left: 8px;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  backdrop-filter: blur(10px);
}

.comic-info {
  padding: 14px;
}

.comic-title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.comic-author {
  font-size: 12px;
  color: var(--text2);
  margin-bottom: 8px;
}

.comic-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.comic-rating {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--warning);
}

.comic-chapters {
  font-size: 12px;
  color: var(--text2);
}

.comic-genres {
  display: flex;
  gap: 4px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.genre-tag {
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 600;
  background: var(--bg3);
  color: var(--accent2);
  border: 1px solid var(--border);
}

/* Footer */
.footer {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  padding: 30px 24px;
  text-align: center;
}

.footer p {
  font-size: 13px;
  color: var(--text2);
}

.footer a {
  color: var(--accent);
  text-decoration: none;
}

/* Responsive */
@media (max-width: 768px) {
  .header-inner {
    flex-wrap: wrap;
    height: auto;
    padding: 12px 0;
    gap: 10px;
  }
  
  .search-box {
    width: 100%;
    order: 3;
  }
  
  .nav-links {
    display: none;
  }
  
  .hero h1 {
    font-size: 28px;
  }
  
  .hero-stats {
    gap: 20px;
  }
  
  .stat-num {
    font-size: 24px;
  }
  
  .comics-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
  }
  
  .comic-cover {
    height: 220px;
  }
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

/* Loading */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px;
  color: var(--text2);
  font-size: 16px;
}

/* No results */
.no-results {
  text-align: center;
  padding: 60px;
  color: var(--text2);
}

.no-results .icon {
  font-size: 48px;
  margin-bottom: 12px;
}
