/*
Theme Name: Manga18FX
Theme URI: https://manga18fx.net
Author: Manga18FX
Author URI: https://manga18fx.net
Description: Official WordPress theme for Manga18FX.net — the ultimate free manga reading platform.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: manga18fx
Tags: manga, dark, responsive, one-page, seo
*/

/* ==========================================
   Google Fonts
   ========================================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

/* ==========================================
   CSS Custom Properties (Theme Tokens)
   ========================================== */
:root {
  --bg:            #0e0f15;
  --bg-card:       #141620;
  --bg-muted:      #1a1d2a;
  --border:        #252838;
  --primary:       #f05a1a;
  --primary-hover: #e04a0a;
  --primary-glow:  rgba(240,90,26,0.35);
  --text:          #e8eaf2;
  --text-muted:    #7c8199;
  --text-dim:      #555870;
  --font:          'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --radius:        12px;
  --radius-sm:     8px;
  --radius-lg:     20px;
  --radius-full:   9999px;
  --transition:    0.25s cubic-bezier(0.4,0,0.2,1);
}

/* ==========================================
   Reset & Base
   ========================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button, input { font-family: inherit; }

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ==========================================
   Navigation
   ========================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(14,15,21,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 24px;
}

.nav-logo {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--primary);
  letter-spacing: -0.03em;
  white-space: nowrap;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color var(--transition);
}
.nav-links a:hover, .nav-links a.active { color: var(--text); }

.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-search {
  position: relative;
  display: none;
}
@media (min-width: 640px) { .nav-search { display: block; } }

.nav-search input {
  background: var(--bg-muted);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--radius-full);
  padding: 8px 16px 8px 38px;
  font-size: 0.875rem;
  width: 240px;
  outline: none;
  transition: border-color var(--transition), width var(--transition);
}
.nav-search input::placeholder { color: var(--text-dim); }
.nav-search input:focus { border-color: var(--primary); width: 280px; }

.nav-search svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  width: 16px;
  height: 16px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all var(--transition);
  border: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 0 24px var(--primary-glow);
}
.btn-primary:hover {
  background: var(--primary-hover);
  box-shadow: 0 0 36px var(--primary-glow);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1.5px solid var(--border);
}
.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-1px);
}

.btn-lg {
  padding: 14px 32px;
  font-size: 1rem;
  height: 56px;
}

/* ==========================================
   Hero Section
   ========================================== */
.hero {
  position: relative;
  overflow: hidden;
  padding: 100px 0 130px;
  text-align: center;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.25;
  mix-blend-mode: overlay;
}

.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--bg) 10%, rgba(14,15,21,0.7) 60%, transparent);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 780px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(240,90,26,0.12);
  border: 1px solid rgba(240,90,26,0.3);
  color: var(--primary);
  padding: 6px 16px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 28px;
}

.hero-badge .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

.hero h1 {
  font-size: clamp(2.5rem, 7vw, 5rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
}

.hero h1 .brand { color: var(--primary); display: block; }

.hero-desc {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 580px;
  margin: 0 auto 40px;
  line-height: 1.7;
}

.hero-ctas {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* ==========================================
   Section Titles
   ========================================== */
.section-header {
  text-align: center;
  margin-bottom: 56px;
}

.section-header h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  margin-bottom: 16px;
}

.section-header p {
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
  font-size: 1rem;
}

/* ==========================================
   Why Manga18FX – Features
   ========================================== */
.features-section {
  padding: 90px 0;
  background: rgba(20,22,32,0.5);
}

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

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}

.feature-card:hover {
  border-color: rgba(240,90,26,0.4);
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.3);
}

.feature-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-sm);
  background: rgba(240,90,26,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: var(--primary);
}

.feature-icon svg { width: 28px; height: 28px; }

.feature-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.feature-card p { color: var(--text-muted); font-size: 0.9rem; line-height: 1.65; }

/* ==========================================
   Latest Manga Updates
   ========================================== */
.updates-section { padding: 90px 0; }

.section-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.section-row h2 {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  margin-bottom: 10px;
}

.section-row p { color: var(--text-muted); max-width: 500px; font-size: 0.95rem; }

.manga-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

@media (min-width: 640px) { .manga-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 900px) { .manga-grid { grid-template-columns: repeat(4, 1fr); } }

.manga-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 3/4;
  background: var(--bg-muted);
}

.manga-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.manga-card:hover img { transform: scale(1.08); }

.manga-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.3) 50%, transparent 100%);
  transition: opacity var(--transition);
}

.manga-card-genre {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(4px);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

.manga-card-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 16px;
}

.manga-card-info h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
  margin-bottom: 6px;
}

.manga-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
}

.manga-card-meta .chapter { color: var(--primary); font-weight: 700; }
.manga-card-meta .time { color: rgba(255,255,255,0.6); }

.view-all-btn {
  display: flex;
  justify-content: center;
  margin-top: 40px;
}

/* ==========================================
   Categories
   ========================================== */
.categories-section {
  padding: 90px 0;
  background: rgba(20,22,32,0.5);
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

@media (min-width: 480px) { .categories-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 768px) { .categories-grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1024px) { .categories-grid { grid-template-columns: repeat(5, 1fr); } }

.cat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 22px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-card);
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
}

.cat-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,0.3); }

.cat-emoji { font-size: 2rem; }
.cat-name { font-size: 0.85rem; font-weight: 700; }
.cat-count { font-size: 0.75rem; color: var(--text-muted); }

/* Category color variants */
.cat-action  { border-color: rgba(239,68,68,0.25); } .cat-action:hover  { border-color: rgba(239,68,68,0.6); }
.cat-romance { border-color: rgba(236,72,153,0.25); } .cat-romance:hover { border-color: rgba(236,72,153,0.6); }
.cat-fantasy { border-color: rgba(139,92,246,0.25); } .cat-fantasy:hover { border-color: rgba(139,92,246,0.6); }
.cat-horror  { border-color: rgba(156,163,175,0.25); } .cat-horror:hover  { border-color: rgba(156,163,175,0.6); }
.cat-scifi   { border-color: rgba(6,182,212,0.25); } .cat-scifi:hover   { border-color: rgba(6,182,212,0.6); }
.cat-shounen { border-color: rgba(249,115,22,0.25); } .cat-shounen:hover { border-color: rgba(249,115,22,0.6); }
.cat-isekai  { border-color: rgba(99,102,241,0.25); } .cat-isekai:hover  { border-color: rgba(99,102,241,0.6); }
.cat-comedy  { border-color: rgba(234,179,8,0.25);  } .cat-comedy:hover  { border-color: rgba(234,179,8,0.6); }
.cat-sol     { border-color: rgba(34,197,94,0.25);  } .cat-sol:hover     { border-color: rgba(34,197,94,0.6); }
.cat-drama   { border-color: rgba(225,29,72,0.25);  } .cat-drama:hover   { border-color: rgba(225,29,72,0.6); }
.cat-sports  { border-color: rgba(16,185,129,0.25); } .cat-sports:hover  { border-color: rgba(16,185,129,0.6); }
.cat-martial { border-color: rgba(245,158,11,0.25); } .cat-martial:hover { border-color: rgba(245,158,11,0.6); }
.cat-super   { border-color: rgba(168,85,247,0.25); } .cat-super:hover   { border-color: rgba(168,85,247,0.6); }
.cat-mecha   { border-color: rgba(59,130,246,0.25); } .cat-mecha:hover   { border-color: rgba(59,130,246,0.6); }
.cat-mystery { border-color: rgba(100,116,139,0.25);} .cat-mystery:hover { border-color: rgba(100,116,139,0.6); }

/* ==========================================
   Why Readers Choose Section
   ========================================== */
.why-section { padding: 90px 0; }

.why-section .section-header { text-align: center; margin-bottom: 56px; }

.why-content {
  max-width: 820px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.why-content p { color: var(--text-muted); font-size: 1rem; line-height: 1.8; }
.why-content p strong { color: var(--text); }

/* ==========================================
   How to Use Section
   ========================================== */
.how-section {
  padding: 90px 0;
  background: rgba(20,22,32,0.5);
}

.steps-list {
  max-width: 780px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 28px;
  position: relative;
}

.steps-list::before {
  content: '';
  position: absolute;
  left: 28px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--border);
}

.step-item {
  display: flex;
  gap: 28px;
  align-items: flex-start;
  position: relative;
}

.step-num {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: var(--radius-sm);
  background: var(--primary);
  color: #fff;
  font-weight: 900;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
  box-shadow: 0 0 20px var(--primary-glow);
}

.step-body { padding-top: 10px; }
.step-label { font-size: 0.7rem; font-weight: 800; color: var(--primary); letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 6px; }
.step-body h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 8px; }
.step-body p { color: var(--text-muted); font-size: 0.9rem; line-height: 1.65; }

/* ==========================================
   FAQ Section
   ========================================== */
.faq-section { padding: 90px 0; }

.faq-list {
  max-width: 860px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color var(--transition);
}

.faq-item.open { border-color: rgba(240,90,26,0.35); }

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  cursor: pointer;
  gap: 16px;
  font-weight: 600;
  font-size: 0.975rem;
  user-select: none;
}

.faq-chevron {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: var(--text-muted);
  transition: transform var(--transition);
}

.faq-item.open .faq-chevron { transform: rotate(180deg); color: var(--primary); }

.faq-answer {
  display: none;
  padding: 0 24px 20px;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.75;
}

.faq-item.open .faq-answer { display: block; }

/* ==========================================
   Blog Section
   ========================================== */
.blog-section {
  padding: 90px 0;
  background: rgba(20,22,32,0.5);
}

.blog-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

@media (min-width: 640px)  { .blog-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .blog-grid { grid-template-columns: repeat(3, 1fr); } }

.blog-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color var(--transition), transform var(--transition);
}

.blog-card:hover { border-color: rgba(240,90,26,0.35); transform: translateY(-4px); }

.blog-card-stripe { height: 4px; background: linear-gradient(to right, var(--primary), rgba(240,90,26,0.4)); }

.blog-card-body { padding: 24px; flex: 1; display: flex; flex-direction: column; }

.blog-card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.blog-tag {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

.tag-picks    { background: rgba(240,90,26,0.15);  color: var(--primary); }
.tag-updates  { background: rgba(6,182,212,0.15);  color: #06b6d4; }
.tag-guide    { background: rgba(34,197,94,0.15);  color: #22c55e; }
.tag-trending { background: rgba(249,115,22,0.15); color: #f97316; }
.tag-reviews  { background: rgba(168,85,247,0.15); color: #a855f7; }
.tag-news     { background: rgba(225,29,72,0.15);  color: #e11d48; }

.blog-date { font-size: 0.75rem; color: var(--text-muted); display: flex; align-items: center; gap: 5px; }

.blog-card h3 { font-size: 1rem; font-weight: 700; line-height: 1.4; margin-bottom: 12px; transition: color var(--transition); }
.blog-card:hover h3 { color: var(--primary); }

.blog-card p { color: var(--text-muted); font-size: 0.875rem; line-height: 1.65; flex: 1; margin-bottom: 20px; }

.read-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary);
  transition: gap var(--transition);
}

.blog-card:hover .read-more { gap: 10px; }

/* ==========================================
   Final CTA Section
   ========================================== */
.cta-section {
  padding: 100px 0;
  text-align: center;
  background: radial-gradient(ellipse at center, rgba(240,90,26,0.15) 0%, transparent 70%);
}

.cta-section h2 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}

.cta-section p {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 580px;
  margin: 0 auto 40px;
  line-height: 1.7;
}

/* ==========================================
   Footer
   ========================================== */
.site-footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 64px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

@media (min-width: 768px) { .footer-grid { grid-template-columns: 1fr 1fr; } }

.footer-brand h2 { font-size: 1.3rem; font-weight: 900; color: var(--primary); margin-bottom: 16px; }
.footer-brand p { color: var(--text-muted); font-size: 0.875rem; line-height: 1.75; }

.footer-links-title {
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--text-dim);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.footer-links-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.footer-links-grid a {
  font-size: 0.875rem;
  color: var(--text-muted);
  transition: color var(--transition);
}
.footer-links-grid a:hover { color: var(--primary); }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 24px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-copy { font-size: 0.8rem; color: var(--text-dim); }
.footer-copy p:last-child { margin-top: 6px; }

.footer-socials { display: flex; gap: 10px; }

.social-link {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: all var(--transition);
}

.social-link:hover { border-color: var(--primary); color: var(--primary); }

.social-link svg { width: 16px; height: 16px; }

/* ==========================================
   Utilities
   ========================================== */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* Responsive nav */
@media (max-width: 767px) {
  .nav-links { display: none; }
}
