/* StarNovels Design System & Global Styles */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Playfair+Display:ital,wght@0,600;0,700;1,600&display=swap');

:root {
  --bg-dark: #090714;
  --bg-card: rgba(22, 18, 38, 0.7);
  --bg-card-hover: rgba(32, 26, 56, 0.85);
  --bg-glass: rgba(18, 14, 32, 0.85);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(139, 92, 246, 0.3);
  
  --primary: #8b5cf6;
  --primary-hover: #7c3aed;
  --primary-glow: rgba(139, 92, 246, 0.4);
  --accent-cyan: #06b6d4;
  --accent-gold: #f59e0b;
  --accent-pink: #ec4899;
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-serif: 'Playfair Display', Georgia, serif;
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --container-width: 1240px;
}

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

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;
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(139, 92, 246, 0.12) 0%, transparent 40%),
    radial-gradient(circle at 85% 65%, rgba(6, 182, 212, 0.1) 0%, transparent 45%),
    radial-gradient(circle at 50% 90%, rgba(236, 72, 153, 0.08) 0%, transparent 50%);
  background-attachment: fixed;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #090714;
}
::-webkit-scrollbar-thumb {
  background: #2a224a;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Utility Components */
.gradient-text {
  background: linear-gradient(135deg, #a78bfa 0%, #38bdf8 50%, #f472b6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.gold-gradient-text {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 50%, #d97706 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.85rem 1.8rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  outline: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, #6d28d9 100%);
  color: #ffffff;
  box-shadow: 0 4px 20px var(--primary-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(139, 92, 246, 0.6);
  background: linear-gradient(135deg, #9333ea 0%, #7e22ce 100%);
}

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

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

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

.badge-verification {
  background: rgba(6, 182, 212, 0.15);
  color: var(--accent-cyan);
  border: 1px solid rgba(6, 182, 212, 0.3);
}

.badge-hot {
  background: rgba(245, 158, 11, 0.15);
  color: var(--accent-gold);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

/* Header Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 1.2rem 0;
  transition: var(--transition);
}

.navbar.scrolled {
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  padding: 0.8rem 0;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

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

.brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  vertical-align: middle;
}

.logo-img {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  object-fit: cover;
  object-position: center 40%;
  box-shadow: 0 0 15px rgba(6, 182, 212, 0.4), 0 0 20px rgba(139, 92, 246, 0.3);
  border: 1px solid rgba(6, 182, 212, 0.5);
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

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

.logo-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent-cyan) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: 1.3rem;
  box-shadow: 0 4px 15px var(--primary-glow);
}

.brand-name {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #ffffff;
}

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

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

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: var(--transition);
}

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

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

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
}

/* Hero Section */
.hero {
  padding: 10rem 0 6rem 0;
  position: relative;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3.5rem;
  align-items: center;
}

.hero-content h1 {
  font-size: 3.6rem;
  line-height: 1.15;
  font-weight: 800;
  margin-bottom: 1.5rem;
  letter-spacing: -1px;
}

.hero-content p {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin-bottom: 2.2rem;
  max-width: 560px;
}

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

.hero-stats {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
}

.stat-item h3 {
  font-size: 1.8rem;
  font-weight: 800;
  color: #ffffff;
}

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

/* Hero Showcase Carousel / Stack */
.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-book-stack {
  position: relative;
  width: 320px;
  height: 440px;
}

.stack-card {
  position: absolute;
  width: 240px;
  height: 340px;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
  transition: var(--transition);
  border: 1px solid var(--border-color);
}

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

.stack-card.card-1 {
  top: 0;
  left: 40px;
  transform: rotate(-6deg) scale(0.95);
  z-index: 1;
  opacity: 0.7;
}

.stack-card.card-2 {
  top: 20px;
  right: 20px;
  transform: rotate(8deg) scale(0.98);
  z-index: 2;
  opacity: 0.85;
}

.stack-card.card-main {
  top: 40px;
  left: 40px;
  transform: rotate(0deg);
  z-index: 3;
  box-shadow: 0 25px 50px rgba(139, 92, 246, 0.35);
  border-color: rgba(139, 92, 246, 0.5);
}

.hero-visual:hover .card-1 {
  transform: rotate(-12deg) translateX(-30px);
}
.hero-visual:hover .card-2 {
  transform: rotate(14deg) translateX(30px);
}
.hero-visual:hover .card-main {
  transform: scale(1.04);
}

/* Section Common */
.section {
  padding: 5rem 0;
}

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

.section-header h2 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-top: 0.5rem;
  margin-bottom: 1rem;
}

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

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

.filter-btn {
  padding: 0.65rem 1.4rem;
  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.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.filter-btn:hover, .filter-btn.active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 4px 15px var(--primary-glow);
}

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

.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;
  backdrop-filter: blur(10px);
}

.novel-card:hover {
  transform: translateY(-8px);
  border-color: var(--border-glow);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), 0 0 20px rgba(139, 92, 246, 0.2);
  background: var(--bg-card-hover);
}

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

.cover-wrapper img {
  position: absolute;
  top: 0;
  left: 0;
  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;
  right: 12px;
  background: rgba(9, 7, 20, 0.85);
  backdrop-filter: blur(8px);
  color: var(--accent-cyan);
  border: 1px solid rgba(6, 182, 212, 0.4);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  z-index: 2;
}

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

.novel-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 0.4rem;
  line-height: 1.3;
}

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

.novel-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 1.2rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.novel-meta {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

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

.read-count {
  font-size: 0.82rem;
  color: var(--text-dim);
}

/* App Download Section */
.app-section {
  background: linear-gradient(180deg, rgba(139, 92, 246, 0.05) 0%, rgba(9, 7, 20, 0) 100%);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.app-box {
  background: linear-gradient(135deg, rgba(26, 20, 48, 0.9) 0%, rgba(14, 10, 28, 0.95) 100%);
  border: 1px solid rgba(139, 92, 246, 0.25);
  border-radius: var(--radius-lg);
  padding: 4rem 3rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}

.app-info h2 {
  font-size: 2.4rem;
  font-weight: 800;
  margin-bottom: 1.2rem;
}

.app-features {
  list-style: none;
  margin: 1.8rem 0 2.2rem 0;
}

.app-features li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 0.8rem;
}

.app-features i {
  color: var(--accent-cyan);
}

.store-buttons {
  display: flex;
  gap: 1.2rem;
  flex-wrap: wrap;
}

.store-btn {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.75rem 1.6rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-color);
  color: #fff;
  text-decoration: none;
  transition: var(--transition);
}

.store-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--primary);
  transform: translateY(-3px);
}

.store-btn i {
  font-size: 1.8rem;
}

.store-text span {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  color: var(--text-dim);
}

.store-text strong {
  font-size: 1rem;
  font-weight: 700;
}

.app-mockup {
  display: flex;
  justify-content: center;
  position: relative;
}

.phone-frame {
  width: 280px;
  height: 560px;
  background: #000;
  border-radius: 40px;
  border: 8px solid #2d264a;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 30px rgba(139, 92, 246, 0.3);
  overflow: hidden;
  position: relative;
}

.phone-screen {
  width: 100%;
  height: 100%;
  background: #0d091e;
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
}

.phone-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.phone-card {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 0.8rem;
  margin-bottom: 0.8rem;
  display: flex;
  gap: 0.8rem;
}

.phone-card img {
  width: 50px;
  height: 70px;
  border-radius: 6px;
  object-fit: cover;
}

.phone-card-info h4 {
  font-size: 0.85rem;
  color: #fff;
}

.phone-card-info p {
  font-size: 0.72rem;
  color: var(--text-dim);
}

/* Corporate Verification Section (Meta BM Focus) */
.corp-section {
  padding: 5rem 0;
  position: relative;
}

.corp-card {
  background: rgba(18, 14, 34, 0.8);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-lg);
  padding: 3.5rem;
  backdrop-filter: blur(16px);
  position: relative;
}

.corp-badge-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
  flex-wrap: wrap;
  gap: 1rem;
}

.corp-details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

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

.corp-item p {
  font-size: 1.05rem;
  font-weight: 600;
  color: #ffffff;
}

/* Footer Section */
.footer {
  background: #05040b;
  border-top: 1px solid var(--border-color);
  padding: 5rem 0 2rem 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 3rem;
  margin-bottom: 4rem;
}

.footer-col h4 {
  color: #ffffff;
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 1.4rem;
}

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

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

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  transition: var(--transition);
}

.footer-links a:hover {
  color: #ffffff;
  padding-left: 4px;
}

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

/* Modals */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(5, 4, 11, 0.85);
  backdrop-filter: blur(12px);
  z-index: 2000;
  justify-content: center;
  align-items: center;
  padding: 1.5rem;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: #120e24;
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-lg);
  max-width: 720px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  padding: 2.5rem;
  position: relative;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.8);
}

.modal-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: #fff;
  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: var(--primary);
}

.reader-chapter-title {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  color: #ffffff;
  margin-bottom: 1.5rem;
}

.reader-text {
  font-size: 1.05rem;
  line-height: 1.8;
  color: #cbd5e1;
}

.reader-text p {
  margin-bottom: 1.2rem;
}

/* Responsive Breakpoints */
@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-stats {
    justify-content: center;
  }

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

  .app-box {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .app-features li {
    justify-content: center;
  }

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

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

@media (max-width: 768px) {
  .nav-links, .nav-actions {
    display: none;
  }

  .mobile-toggle {
    display: block;
  }

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

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

/* Web Features Grid 4-in-a-row Layout */
@media (max-width: 992px) {
  .web-features-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}
@media (max-width: 576px) {
  .web-features-grid {
    grid-template-columns: 1fr !important;
  }
}



/* Email link styling */
.email-link {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: var(--transition);
}
.email-link:hover {
  color: var(--primary);
  opacity: 0.85;
}
