/* YJ-Novels - Modern Overseas H5 Novel Portal Design System */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Plus+Jakarta+Sans:wght@500;700;800&family=Lora:ital,wght@0,400;0,600;1,400&display=swap');

:root {
  /* Color Palette */
  --bg-dark: #0b0e17;
  --bg-card: rgba(21, 27, 38, 0.7);
  --bg-card-hover: rgba(30, 39, 56, 0.85);
  --bg-surface: #121824;
  --bg-glass: rgba(18, 24, 36, 0.75);
  
  --primary: #8b5cf6;
  --primary-hover: #7c3aed;
  --primary-light: rgba(139, 92, 246, 0.15);
  --accent-cyan: #06b6d4;
  --accent-pink: #ec4899;
  --accent-gold: #f59e0b;
  --accent-emerald: #10b981;

  --text-bright: #ffffff;
  --text-main: #e2e8f0;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --border-color: rgba(255, 255, 255, 0.08);
  --border-highlight: rgba(139, 92, 246, 0.3);

  --gradient-brand: linear-gradient(135deg, #8b5cf6 0%, #06b6d4 100%);
  --gradient-hero: radial-gradient(circle at 50% 0%, rgba(139, 92, 246, 0.25) 0%, rgba(11, 14, 23, 0) 70%);
  --gradient-card: linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0) 100%);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.3);
  --shadow-glow: 0 0 25px rgba(139, 92, 246, 0.25);

  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-display: 'Plus Jakarta Sans', system-ui, sans-serif;
  --font-reader: 'Lora', Georgia, serif;

  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

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

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--text-bright);
  font-weight: 700;
  line-height: 1.25;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Utility Containers */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Gradient Text */
.gradient-text {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.badge-hot {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.badge-primary {
  background: var(--primary-light);
  color: #a78bfa;
  border: 1px solid var(--border-highlight);
}

.badge-verification {
  background: rgba(6, 182, 212, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(6, 182, 212, 0.3);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.6rem;
  border-radius: var(--radius-full);
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  outline: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--gradient-brand);
  color: #ffffff;
  box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 35px rgba(139, 92, 246, 0.45);
  opacity: 0.95;
}

.btn-outline {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-bright);
  border: 1px solid var(--border-color);
  backdrop-filter: blur(10px);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--border-highlight);
  color: #ffffff;
  transform: translateY(-2px);
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(11, 14, 23, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  transition: var(--transition);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.35rem;
  color: #ffffff;
}

.logo-img {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  box-shadow: 0 0 12px rgba(139, 92, 246, 0.4);
}

.brand-name span {
  color: var(--accent-cyan);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-link {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-muted);
  position: relative;
  padding: 0.4rem 0;
}

.nav-link:hover, .nav-link.active {
  color: #ffffff;
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--gradient-brand);
  border-radius: 2px;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.mobile-toggle {
  display: none;
  background: transparent;
  border: none;
  color: var(--text-bright);
  font-size: 1.35rem;
  cursor: pointer;
  padding: 0.5rem;
}

/* Hero Section */
.hero {
  position: relative;
  padding: 140px 0 80px;
  background: var(--gradient-hero);
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 3rem;
  align-items: center;
}

.hero-content h1 {
  font-size: 3.1rem;
  letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
}

.hero-content p {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  max-width: 580px;
}

.hero-buttons {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
}

.stat-item h3 {
  font-size: 1.8rem;
  color: var(--text-bright);
  margin-bottom: 0.2rem;
}

.stat-item p {
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-bottom: 0;
}

.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-book-stack {
  position: relative;
  width: 280px;
  height: 380px;
}

.stack-card {
  position: absolute;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  border: 1px solid var(--border-color);
}

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

.card-1 {
  width: 180px;
  height: 250px;
  top: 0;
  left: -20px;
  transform: rotate(-10deg);
  z-index: 1;
  opacity: 0.7;
}

.card-2 {
  width: 190px;
  height: 260px;
  bottom: 10px;
  right: -20px;
  transform: rotate(12deg);
  z-index: 2;
  opacity: 0.85;
}

.card-main {
  width: 220px;
  height: 310px;
  top: 35px;
  left: 30px;
  z-index: 3;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6), var(--shadow-glow);
}

.card-main:hover {
  transform: scale(1.04) translateY(-5px);
}

/* Sections */
.section {
  padding: 80px 0;
}

.section-header {
  text-align: center;
  max-width: 650px;
  margin: 0 auto 3rem;
}

.section-header h2 {
  font-size: 2.2rem;
  margin: 0.75rem 0;
}

.section-header p {
  color: var(--text-muted);
  font-size: 1rem;
}

/* Genre Filter Bar */
.genre-filter-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}

.filter-btn {
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.filter-btn:hover, .filter-btn.active {
  background: var(--gradient-brand);
  border-color: transparent;
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

/* Novel Cards Grid */
.novel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.75rem;
}

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

.novel-card:hover {
  transform: translateY(-6px);
  background: var(--bg-card-hover);
  border-color: var(--border-highlight);
  box-shadow: var(--shadow-md), 0 0 20px rgba(139, 92, 246, 0.15);
}

.cover-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 3/4;
  overflow: hidden;
}

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

.novel-card:hover .cover-wrapper img {
  transform: scale(1.06);
}

.genre-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(11, 14, 23, 0.75);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 600;
  z-index: 2;
}

.novel-content {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.novel-title {
  font-size: 1.1rem;
  margin-bottom: 0.3rem;
  color: var(--text-bright);
}

.novel-author {
  font-size: 0.82rem;
  color: var(--text-dim);
  margin-bottom: 0.75rem;
}

.novel-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex-grow: 1;
}

.novel-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-color);
}

.rating {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--accent-gold);
  font-size: 0.88rem;
  font-weight: 700;
}

/* Corporate Verification Section */
.corp-section {
  padding: 60px 0;
  background: var(--bg-surface);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.corp-card {
  background: var(--bg-card);
  border: 1px solid var(--border-highlight);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-md);
}

.corp-badge-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.corp-details-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 1.75rem;
}

.corp-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  padding: 1.25rem;
  border-radius: var(--radius-md);
}

.corp-item h4 {
  font-size: 0.8rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.4rem;
}

.corp-item p {
  font-size: 0.95rem;
  color: var(--text-bright);
  font-weight: 500;
  word-break: break-word;
}

/* Footer */
.footer {
  background: #070910;
  padding: 70px 0 30px;
  border-top: 1px solid var(--border-color);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 2.5rem;
  margin-bottom: 3.5rem;
}

.footer-col h4 {
  font-size: 1rem;
  color: var(--text-bright);
  margin-bottom: 1.25rem;
}

.footer-col p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.65rem;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.88rem;
}

.footer-links a:hover {
  color: var(--accent-cyan);
}

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-dim);
  flex-wrap: wrap;
  gap: 1rem;
}

/* Modal Reader */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(12px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  padding: 1.25rem;
}

.modal.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background: #121824;
  border: 1px solid var(--border-highlight);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 800px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.7);
  overflow: hidden;
}

.modal-header {
  padding: 1.25rem 1.75rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(18, 24, 36, 0.95);
}

.modal-close {
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: var(--text-muted);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.modal-close:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
}

.reader-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.75rem;
  background: rgba(0, 0, 0, 0.2);
  border-bottom: 1px solid var(--border-color);
  gap: 1rem;
  flex-wrap: wrap;
}

.theme-controls, .font-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.theme-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: var(--transition);
}

.theme-btn.active {
  border-color: var(--primary);
  transform: scale(1.1);
}

.theme-dark { background: #121824; color: #e2e8f0; }
.theme-sepia { background: #fbf0d9; color: #3b2a1a; }
.theme-light { background: #ffffff; color: #1e293b; }

.font-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-color);
  color: var(--text-bright);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.82rem;
}

.reader-body {
  padding: 2rem 2.25rem;
  overflow-y: auto;
  font-family: var(--font-reader);
  font-size: 1.05rem;
  line-height: 1.85;
  color: var(--text-main);
}

.reader-body p {
  margin-bottom: 1.4rem;
  text-indent: 1.5rem;
}

/* H5 Responsive Optimization */
@media (max-width: 992px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-content p {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-buttons {
    justify-content: center;
  }

  .hero-visual {
    margin-top: 2rem;
  }

  .corp-details-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 72px;
    left: 0;
    width: 100%;
    background: #0b0e17;
    flex-direction: column;
    padding: 2rem;
    gap: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    transform: translateY(-150%);
    transition: transform 0.3s ease;
  }

  .nav-links.active {
    transform: translateY(0);
  }

  .mobile-toggle {
    display: block;
  }

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

  .hero-stats {
    grid-template-columns: 1fr 1fr 1fr;
    gap: 0.75rem;
  }

  .stat-item h3 {
    font-size: 1.35rem;
  }

  .corp-details-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .corp-badge-header {
    flex-direction: column;
  }

  .reader-body {
    padding: 1.25rem 1.5rem;
  }
}
