/* style.css - Clean & Light */
:root {
  --bg: #0a0a0a;
  --card: #111111;
  --text: #ffffff;
  --text-muted: #888888;
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --border: #222222;
  --radius: 6px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
}


/* Header */
.header {
  padding: 15px 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
      flex-direction: row;
}

.logo {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  text-decoration: none;
}

.logo span {
  color: var(--accent);
}

.search-form {
  flex: 1;
  max-width: 400px;
  display: flex;
  gap: 8px;
}

.search-input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  border-radius: var(--radius);
  font-size: 14px;
}

.search-input:focus {
  outline: none;
  border-color: var(--accent);
}

.btn {
  padding: 8px 14px;
  border: none;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.btn-primary {
  background: var(--accent);
  color: white;
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-secondary {
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: #1a1a1a;
}

/* Grid System */
.grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}

/* Card Components */
.card {
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.2s;
  text-decoration: none;
  color: inherit;
  position: relative;
}

.card:hover {
  transform: translateY(-2px);
}

.card-cover {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.card-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  display: flex;
  gap: 4px;
  z-index: 2;
}

.badge {
  padding: 3px 6px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 700;
  background: rgba(0,0,0,0.8);
  color: white;
}

.badge-up {
  background: #f59e0b;
  color: black;
}

.flag {
  width: 18px;
  height: 12px;
  border-radius: 1px;
  object-fit: cover;
}

.card-content {
  padding: 10px;
}

.card-title {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
}

.card-rating {
  color: #f59e0b;
  font-weight: 600;
}

.card-chapter {
  color: var(--text-muted);
}

/* Section */
.section {
  margin-bottom: 30px;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 15px;
}

.section-title {
  font-size: 18px;
  font-weight: 700;
}

/* Detail Page */
.detail-header {
  display: flex;
  gap: 20px;
  margin-bottom: 25px;
}

.detail-cover {
  flex: 0 0 180px;
}

.detail-cover img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  border-radius: var(--radius);
}

.detail-info {
  flex: 1;
}

.detail-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 5px;
  line-height: 1.2;
}

.detail-subtitle {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 12px;
}

.detail-meta {
  display: flex;
  gap: 8px;
  margin-bottom: 15px;
  flex-wrap: wrap;
}

.meta-item {
  background: var(--card);
  padding: 6px 10px;
  border-radius: var(--radius);
  font-size: 13px;
}

.rating-stars {
  display: flex;
  gap: 2px;
  align-items: center;
}

.star {
  color: #f59e0b;
  font-size: 14px;
}

.detail-synopsis {
  background: var(--card);
  padding: 15px;
  border-radius: var(--radius);
  margin-bottom: 15px;
  line-height: 1.5;
  font-size: small;
  text-align: left;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  background: var(--card);
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 11px;
  color: var(--text);
  text-decoration: none;
  border: 1px solid var(--border);
  transition: all 0.2s;
}

.tag:hover {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

/* Chapter List */
.chapter-search {
  margin-bottom: 15px;
}

.chapter-list {
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
}

.chapter-item {
  display: flex;
  align-items: center;
  padding: 12px;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  transition: all 0.2s;
}

.chapter-item:hover {
  background: #1a1a1a;
}

.chapter-item:last-child {
  border-bottom: none;
}

.chapter-thumb {
  width: 70px;
  height: 50px;
  border-radius: var(--radius);
  object-fit: cover;
  margin-right: 12px;
  flex-shrink: 0;
}

.chapter-details {
  flex: 1;
}

.chapter-title {
  font-weight: 600;
  margin-bottom: 3px;
  font-size: 13px;
}

.chapter-meta {
  font-size: 11px;
  color: var(--text-muted);
}

.chapter-number {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 13px;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 25px;
  flex-wrap: wrap;
}

/* Chapter Reader */
.chapter-nav {
  background: var(--card);
  padding: 12px;
  border-radius: var(--radius);
  margin-bottom: 15px;
}

.nav-buttons {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}

.reader-image {
  width: 100%;
  display: block;
}

/* Breadcrumb */
.breadcrumb {
  margin-bottom: 15px;
  font-size: 13px;
  color: var(--text-muted);
}

.breadcrumb a {
  color: var(--accent);
  text-decoration: none;
}

.breadcrumb span {
  margin: 0 6px;
}

/* Scroll to Top */
.scroll-top {
  position: fixed;
  bottom: 15px;
  right: 15px;
  background: var(--accent);
  color: white;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  z-index: 1000;
}

.scroll-top:hover {
  background: var(--accent-hover);
}

/* Progress Bar */
.progress-bar {
  height: 2px;
  background: var(--border);
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
}

.progress-fill {
  height: 100%;
  background: var(--accent);
  width: 0%;
}

/* RESPONSIVE DESIGN */
/* Tablet (500px - 768px) - Bikin mirip mobile */
@media (max-width: 768px) {
  .header-content {
    flex-direction: column;
    gap: 12px;
  }
  
  .search-form {
    max-width: 100%;
  }
  
  .grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  
  .card-cover {
    height: 160px;
  }
  
  /* Detail page untuk tablet - bikin vertikal kayak mobile */
  .detail-header {
    flex-direction: column;
    gap: 15px;
  }
  
  .detail-cover {
    flex: none;
    max-width: 160px;
    margin: 0 auto;
  }
  
  .detail-cover img {
    height: 200px;
  }
  
  .detail-info {
    text-align: center;
  }
  
  .detail-meta {
    justify-content: center;
  }
  
  .detail-tags {
    justify-content: center;
  }
  
  .chapter-item {
    padding: 10px;
  }
  
  .chapter-thumb {
    width: 60px;
    height: 45px;
  }
}

/* Mobile kecil (max-width: 540px) */
@media (max-width: 540px) {

  
  .grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  
  .card-cover {
    height: 300px;
  }
  
  .card-content {
    padding: 8px;
  }
  
  .detail-title {
    font-size: 18px;
  }
  
  .detail-cover {
    max-width: 140px;
  }
  
  .detail-cover img {
    height: 180px;
  }
}


/* Footer */
.footer {
  text-align: center;
  padding: 30px 0;
  margin-top: 50px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 13px;
}

.footer a {
  color: var(--accent);
  text-decoration: none;
}


/* style.css - Tambahkan bagian ini di bawah responsive design */

/* Chapter Reader Styles (Old Style) */
.chapter-header {
  background: var(--card);
  padding: 20px;
  border-radius: var(--radius);
  margin-bottom: 20px;
  text-align: center;
}

.chapter-header .manga-title {
  margin-bottom: 8px;
}

.chapter-header .manga-title a {
  color: var(--accent);
  text-decoration: none;
  font-size: 16px;
  font-weight: 600;
}

.chapter-header .manga-title a:hover {
  text-decoration: underline;
}

.chapter-header .chapter-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
}

.chapter-header .chapter-info {
  color: var(--text-muted);
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.page-counter {
  text-align: center;
  margin: 15px 0;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
}

.chapter-images {
  background: var(--card);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
}

.chapter-image {
  width: 100%;
  height: auto;
  display: block;
  margin-bottom: 10px;
  border-radius: 4px;
  transition: opacity 0.3s ease;
}

.chapter-image:last-child {
  margin-bottom: 0;
}

.chapter-image.loading {
  opacity: 0.7;
}

/* Navigation buttons styling */
.nav-buttons {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.nav-buttons .btn {
  min-width: 140px;
  justify-content: center;
}

/* Reader controls */
.reader-controls {
  background: var(--card);
  padding: 15px;
  border-radius: var(--radius);
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.control-group {
  display: flex;
  gap: 10px;
  align-items: center;
}

.control-btn {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 12px;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 13px;
  transition: all 0.2s;
}

.control-btn:hover {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

/* Mobile responsive untuk chapter reader */
@media (max-width: 768px) {
  .chapter-header {
    padding: 15px;
  }
  
  .chapter-header .chapter-title {
    font-size: 18px;
  }
  
  .chapter-images {
    padding: 10px;
  }
  
  .reader-controls {
    flex-direction: column;
    gap: 10px;
  }
  
  .control-group {
    width: 100%;
    justify-content: center;
  }
  
  .nav-buttons .btn {
    min-width: 120px;
    font-size: 13px;
    padding: 8px 12px;
  }
}

@media (max-width: 540px) {
  .nav-buttons {
    flex-direction: column;
    width: 100%;
  }
  
  .nav-buttons .btn {
    width: 100%;
  }
}