/* Octane Comics - Premium Dark CSS Design System */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --bg-primary: #090810;
  --bg-surface: #121020;
  --bg-card: #18152b;
  --bg-card-hover: #221d3d;
  --border-color: #2b254a;
  
  --accent-purple: #7c4dff;
  --accent-purple-glow: rgba(124, 77, 255, 0.35);
  --accent-pill-bg: #251c42;
  
  --text-primary: #f1f0f8;
  --text-secondary: #a29dbd;
  --text-muted: #6e698a;

  --badge-ua-bg: #1c2b42;
  --badge-ua-text: #64b5f6;
  --badge-en-bg: #1b382b;
  --badge-en-text: #81c784;
  --badge-featured-bg: #421c27;
  --badge-featured-text: #ff8a80;

  --star-filled: #ffd54f;
  --star-empty: #45405e;

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

  --shadow-main: 0 10px 30px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 25px var(--accent-purple-glow);
}

/* Light mode overrides if toggled */
body.light-theme {
  --bg-primary: #f5f4fa;
  --bg-surface: #ffffff;
  --bg-card: #eef0f8;
  --bg-card-hover: #e0e4f5;
  --border-color: #d1cde5;
  --text-primary: #151326;
  --text-secondary: #4a4468;
  --text-muted: #6b648e;
  --accent-pill-bg: #e3dcf8;
}

body.light-theme h1,
body.light-theme h2,
body.light-theme h3,
body.light-theme h4,
body.light-theme h5,
body.light-theme h6,
body.light-theme .card-title,
body.light-theme .studio-header h2,
body.light-theme .studio-header h3,
body.light-theme .universe-info h3 {
  color: #151326 !important;
}

body.light-theme .form-control {
  background: #ffffff;
  color: #151326;
  border-color: #c4beea;
}


* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Outfit', 'Inter', sans-serif;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  line-height: 1.5;
}

/* Header & Nav (Strict single line logo & matching user screenshot) */
.main-header {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.header-container {
  max-width: 1300px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

/* Single line logo preventing wrap */
.logo {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 1.65rem;
  font-weight: 800;
  white-space: nowrap;
  letter-spacing: -0.5px;
  color: var(--text-primary);
  cursor: pointer;
  user-select: none;
}

.logo-img {
  max-height: 42px;
  width: auto;
  object-fit: contain;
  display: block;
}

.logo span.logo-highlight {
  color: var(--accent-purple);
}

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

.nav-item {
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.nav-item:hover {
  color: var(--text-primary);
}

.nav-item.active {
  background-color: var(--accent-pill-bg);
  border-color: rgba(124, 77, 255, 0.4);
  color: #c7b3ff;
  box-shadow: 0 0 12px rgba(124, 77, 255, 0.2);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lang-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 6px 14px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
}

.lang-btn:hover {
  border-color: var(--accent-purple);
}

.theme-toggle-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.1rem;
  transition: all 0.2s;
}

.studio-launch-btn {
  background: linear-gradient(135deg, var(--accent-purple), #512da8);
  color: #fff;
  border: none;
  padding: 8px 18px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  box-shadow: 0 4px 15px var(--accent-purple-glow);
  transition: transform 0.2s, box-shadow 0.2s;
  white-space: nowrap;
}

.studio-launch-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(124, 77, 255, 0.5);
}

/* Custom Site Header / Footer Banners */
.site-banner-header {
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  display: block;
}

/* Main Container */
main.main-content {
  max-width: 1300px;
  margin: 0 auto;
  padding: 30px 24px;
  flex: 1;
  width: 100%;
}

/* Hero Featured Banner */
.featured-hero {
  position: relative;
  background: linear-gradient(135deg, #1d1838, #0e0c1a);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 36px;
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 36px;
  align-items: center;
  margin-bottom: 40px;
  box-shadow: var(--shadow-main);
  overflow: hidden;
}

.featured-hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, var(--accent-purple-glow) 0%, transparent 70%);
  pointer-events: none;
}

.hero-cover {
  width: 100%;
  height: 340px;
  object-fit: cover;
  border-radius: var(--radius-md);
  box-shadow: 0 12px 25px rgba(0,0,0,0.6);
  border: 1px solid var(--border-color);
}

.hero-info {
  display: flex;
  flex-direction: column;
  gap: 16px;
  z-index: 1;
}

.hero-badge {
  align-self: flex-start;
  background: var(--badge-featured-bg);
  color: var(--badge-featured-text);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  border: 1px solid rgba(255, 138, 128, 0.3);
}

.hero-title {
  font-size: 2.6rem;
  font-weight: 800;
  line-height: 1.1;
  color: #ffffff;
}

.hero-desc {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 750px;
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.hero-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-read-hero {
  align-self: flex-start;
  background: linear-gradient(90deg, var(--accent-purple), #9d4edd);
  color: #ffffff;
  padding: 14px 32px;
  border-radius: 999px;
  font-size: 1.1rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 6px 20px var(--accent-purple-glow);
  margin-top: 10px;
}

.btn-read-hero:hover {
  transform: scale(1.04);
  box-shadow: 0 10px 30px rgba(124, 77, 255, 0.6);
}

/* Filter Chips Section */
.universe-filters {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.chip-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 8px 20px;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.chip-btn:hover {
  border-color: var(--accent-purple);
  color: var(--text-primary);
}

.chip-btn.active {
  background: var(--accent-purple);
  color: #fff;
  border-color: var(--accent-purple);
  box-shadow: 0 4px 12px var(--accent-purple-glow);
}

/* Universe Header Card */
.universe-header-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.universe-info h3 {
  font-size: 1.5rem;
  color: #fff;
  margin-bottom: 6px;
}

.universe-actions {
  display: flex;
  gap: 12px;
}

.btn-secondary {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-secondary:hover {
  border-color: var(--accent-purple);
  background: var(--bg-card-hover);
}

/* Comic Grid Catalog */
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 28px;
}

.comic-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  display: flex;
  flex-direction: column;
}

.comic-card:hover {
  transform: translateY(-6px);
  border-color: var(--accent-purple);
  box-shadow: var(--shadow-main), 0 0 20px rgba(124, 77, 255, 0.2);
}

.card-cover-wrap {
  position: relative;
  width: 100%;
  height: 340px;
  overflow: hidden;
  cursor: pointer;
}

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

.comic-card:hover .card-cover {
  transform: scale(1.06);
}

.badges-top {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
}

.badge {
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  backdrop-filter: blur(8px);
}

.badge-ua {
  background: var(--badge-ua-bg);
  color: var(--badge-ua-text);
  border: 1px solid rgba(100, 181, 246, 0.3);
}

.badge-uaen {
  background: var(--badge-en-bg);
  color: var(--badge-en-text);
  border: 1px solid rgba(129, 199, 132, 0.3);
}

.badge-status {
  background: rgba(18, 16, 32, 0.85);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}

.card-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.card-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
  cursor: pointer;
}


.card-genres {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.genre-tag {
  background: var(--bg-surface);
  color: var(--text-muted);
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 4px;
}

.card-rating-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--border-color);
}

.stars-display {
  display: flex;
  gap: 2px;
  color: var(--star-filled);
}

.star-interactive {
  cursor: pointer;
  transition: transform 0.15s;
}

.star-interactive:hover {
  transform: scale(1.25);
}

/* Interactive Reader Modal */
.reader-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(5, 4, 10, 0.95);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.reader-header {
  padding: 14px 24px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.reader-chapter-select {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  outline: none;
}

.reader-main-area {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
}

/* Interactive Split-Screen Mouse Flipping Container */
.reader-page-wrapper {
  position: relative;
  max-width: 1000px;
  width: 100%;
  margin: 0 auto;
  border-radius: var(--radius-md);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.8);
  display: block;
}

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



/* Mouse Hover Dynamic Split Zones */
.split-zone {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50%;
  z-index: 10;
}

.left-zone {
  left: 0;
  cursor: w-resize; /* Dynamic mouse arrow pointing left */
}

.right-zone {
  right: 0;
  cursor: e-resize; /* Dynamic mouse arrow pointing right */
}

/* Visual click effect indicators */
.split-zone:active::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0; left: 0; right: 0;
  background: rgba(124, 77, 255, 0.15);
}

.author-note-card {
  max-width: 900px;
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-top: 20px;
}

.comments-section {
  max-width: 900px;
  width: 100%;
  margin-top: 24px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
}

.comment-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 14px;
  margin-bottom: 12px;
}

/* Author Studio Modal */
.studio-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.studio-modal {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 1100px;
  height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow-main);
}

.studio-header {
  padding: 18px 28px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.studio-nav-tabs {
  display: flex;
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-color);
  padding: 0 20px;
  overflow-x: auto;
}

.studio-tab {
  padding: 14px 20px;
  font-weight: 600;
  color: var(--text-secondary);
  border: none;
  background: transparent;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: all 0.2s;
}

.studio-tab.active {
  color: var(--accent-purple);
  border-bottom-color: var(--accent-purple);
}

.studio-tab-content {
  flex: 1;
  padding: 28px;
  overflow-y: auto;
}

/* Form inputs styling */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.form-group label {
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.form-control {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  outline: none;
}

.form-control:focus {
  border-color: var(--accent-purple);
  box-shadow: 0 0 10px var(--accent-purple-glow);
}

textarea.form-control {
  min-height: 100px;
  resize: vertical;
}

/* Footer Banner & Footer */
footer.site-footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border-color);
  margin-top: 60px;
}

.footer-content {
  max-width: 1300px;
  margin: 0 auto;
  padding: 30px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Responsive queries */
@media (max-width: 900px) {
  .featured-hero {
    grid-template-columns: 1fr;
  }
  .hero-cover {
    height: 260px;
  }
  .header-container {
    flex-wrap: wrap;
  }
}

/* Social Media Vertical Buttons Stack */
.social-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 20px;
  width: 100%;
}

.social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 14px 24px;
  border-radius: var(--radius-md);
  color: #fff;
  font-weight: 700;
  font-size: 1.05rem;
  text-decoration: none;
  width: 100%;
  transition: transform 0.2s ease, filter 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}

.social-btn svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
  flex-shrink: 0;
}

.social-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.15);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}


.social-insta {
  background: #e1306c;
}

.social-bluesky {
  background: #0085ff;
}

.social-fb {
  background: #1877f2;
}

.social-patreon {
  background: #ff424d;
}

.social-email {
  background: #6c5ce7;
}


/* Mobile Responsive Optimization (Smartphones & Tablets) */
@media (max-width: 768px) {
  .header-container {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 12px 14px;
  }

  .logo {
    justify-content: center;
    font-size: 1.45rem;
  }

  .header-actions {
    justify-content: space-between;
    width: 100%;
    flex-wrap: wrap;
    gap: 8px;
  }

  .nav-links {
    justify-content: flex-start;
    width: 100%;
    overflow-x: auto;
    padding-bottom: 6px;
    -webkit-overflow-scrolling: touch;
  }

  .nav-item {
    padding: 6px 12px;
    font-size: 0.85rem;
    flex-shrink: 0;
  }

  .featured-hero {
    padding: 20px;
    gap: 20px;
  }

  .hero-title {
    font-size: 1.8rem;
  }

  .hero-cover {
    height: 240px;
  }

  .universe-filters {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
  }

  .chip-btn {
    white-space: nowrap;
    padding: 6px 14px;
    font-size: 0.85rem;
    flex-shrink: 0;
  }

  .universe-header-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  .catalog-grid {
    grid-template-columns: repeat(auto-fill, minmax(145px, 1fr));
    gap: 14px;
  }

  .card-cover-wrap {
    height: 220px;
  }

  .card-title {
    font-size: 1rem;
  }

  .card-body {
    padding: 12px;
  }

  .reader-header {
    flex-direction: column;
    gap: 10px;
    padding: 10px 14px;
  }

  .studio-modal {

    width: 100vw;
    height: 100vh;
    border-radius: 0;
  }

  .studio-header {
    padding: 14px 16px;
  }

  .studio-tab-content {
    padding: 16px;
  }

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

  /* Prevent iOS zoom on input focus */
  .form-control {
    font-size: 16px !important;
  }
}


