/* ACG Portal Main CSS - Geometric Balance Theme */

:root {
  --primary-color: #2563eb;       /* Vibrant Blue (blue-600) */
  --primary-hover: #1d4ed8;       /* Darker Blue (blue-700) */
  --primary-light: rgba(37, 99, 235, 0.08); /* Soft blue highlight */
  --secondary-color: #ea580c;     /* Geometric Orange-600 */
  --accent-color: #0284c7;        /* Geometric Sky-600 */
  --bg-dark: #f8fafc;             /* Slate-50 background - Clean Geometric canvas */
  --bg-card: #ffffff;             /* Pure White card container */
  --bg-card-hover: #f1f5f9;       /* Slate-100 hover background */
  --text-main: #0f172a;           /* Slate-900 high contrast dark text */
  --text-sub: #475569;            /* Slate-600 body/subtitle text */
  --text-muted: #64748b;          /* Slate-500 muted text */
  --border-color: #e2e8f0;        /* Slate-200 border */
  --border-light: #f1f5f9;        /* Slate-100 border */
  --shadow-glow: 0 4px 16px rgba(37, 99, 235, 0.12), 0 1px 3px rgba(15, 23, 42, 0.05);
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.06), 0 2px 4px -2px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 10px 25px -5px rgba(15, 23, 42, 0.08), 0 8px 10px -6px rgba(15, 23, 42, 0.04);
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

body {
  font-family: var(--font-family);
  background-color: var(--bg-dark);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
  transition: all 0.2s ease;
}

ul {
  list-style: none;
}

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

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--primary-color);
}

/* Header & Navigation */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #ffffff;
  border-bottom: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  padding: 0.85rem 2rem;
}

.nav-container {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: -0.025em;
  color: var(--primary-color);
}

.brand-logo span {
  color: var(--text-main);
}

.brand-icon {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  background: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1rem;
  font-weight: 900;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-item {
  position: relative;
  padding: 0.5rem 0.75rem;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-sub);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.2s ease;
}

.nav-item:hover, .nav-item.active {
  color: var(--primary-color);
  background: var(--primary-light);
}

.nav-item.active::after {
  content: '';
  position: absolute;
  bottom: -0.85rem;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  height: 2px;
  background: var(--primary-color);
}

/* Compliance Dropdown */
.dropdown {
  position: relative;
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% - 2px);
  left: 0;
  min-width: 220px;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 0.5rem 0;
  margin-top: 0;
  z-index: 1001;
}

.dropdown-menu::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: -8px;
  height: 8px;
}

.dropdown:hover .dropdown-menu {
  display: block;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.65rem 1.25rem;
  color: var(--text-sub);
  font-size: 0.875rem;
  font-weight: 500;
}

.dropdown-item:hover {
  background: var(--primary-light);
  color: var(--primary-color);
}

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

.search-bar {
  position: relative;
  display: flex;
  align-items: center;
}

.search-input {
  background: #f1f5f9;
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 0.45rem 1rem 0.45rem 2.2rem;
  border-radius: 6px;
  font-size: 0.85rem;
  outline: none;
  width: 180px;
  transition: all 0.3s ease;
}

.search-input:focus {
  width: 240px;
  border-color: var(--primary-color);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.search-icon {
  position: absolute;
  left: 0.75rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  pointer-events: none;
}

.btn-primary {
  background: #0f172a;
  color: #ffffff;
  border: none;
  padding: 0.55rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background: #1e293b;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-outline {
  background: #ffffff;
  color: var(--text-main);
  border: 1px solid #cbd5e1;
  padding: 0.55rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
}

.btn-outline:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
  background: var(--primary-light);
}

/* Mobile Menu Toggle */
.mobile-toggle {
  display: none;
  font-size: 1.4rem;
  cursor: pointer;
  color: var(--text-main);
}

/* Page Banner / Hero (Geometric Blue Motif) */
.page-banner {
  background-color: var(--primary-color);
  background-image: radial-gradient(rgba(255, 255, 255, 0.2) 1px, transparent 1px);
  background-size: 20px 20px;
  padding: 3rem 2rem 2.5rem;
  border-bottom: 1px solid #1d4ed8;
  margin-bottom: 2rem;
  position: relative;
  overflow: hidden;
  color: #ffffff;
}

.page-banner::before {
  content: '';
  position: absolute;
  bottom: -40px;
  right: -40px;
  width: 220px;
  height: 220px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  pointer-events: none;
}

.page-banner::after {
  content: '';
  position: absolute;
  top: -30px;
  left: -30px;
  width: 160px;
  height: 160px;
  background: rgba(255, 255, 255, 0.08);
  transform: rotate(45deg);
  pointer-events: none;
}

.page-banner-content {
  max-width: 1280px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.page-title {
  font-size: 2.25rem;
  font-weight: 900;
  letter-spacing: -0.025em;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: #ffffff;
}

.page-subtitle {
  color: #dbeafe;
  font-size: 1rem;
  max-width: 720px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #93c5fd;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 0.75rem;
}

.breadcrumb a {
  color: #dbeafe;
}

.breadcrumb a:hover {
  color: #ffffff;
  text-decoration: underline;
}

/* Main Content Container */
.main-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem 3rem;
  flex: 1;
  width: 100%;
}

/* Cards & Grid Layouts */
.grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.5rem;
}

.hero-slider {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 2.5rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  border: 1px solid var(--border-color);
  background: #0f172a;
}

.slide-item {
  display: none;
  position: relative;
  min-height: 360px;
  background-size: cover;
  background-position: center;
}

.slide-item.active {
  display: block;
}

.slide-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.94) 0%, rgba(15, 23, 42, 0.45) 60%, transparent 100%);
  display: flex;
  align-items: center;
  padding: 0 3rem;
}

.slide-caption {
  max-width: 580px;
}

.slide-tag {
  display: inline-block;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  margin-bottom: 0.75rem;
}

.slide-title {
  font-size: 2.4rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
  margin-bottom: 0.75rem;
}

.slide-desc {
  color: #cbd5e1;
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
  line-height: 1.7;
}

.slider-nav {
  position: absolute;
  bottom: 1.25rem;
  right: 2rem;
  display: flex;
  gap: 0.5rem;
  z-index: 10;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  cursor: pointer;
  transition: all 0.3s;
}

.dot.active {
  width: 32px;
  border-radius: 6px;
  background: var(--primary-color);
}

.schedule-section {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  margin-bottom: 2.5rem;
  box-shadow: var(--shadow-sm);
}

.schedule-tabs {
  display: flex;
  gap: 0.5rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.75rem;
  margin-bottom: 1.5rem;
  overflow-x: auto;
}

.tab-btn {
  background: transparent;
  border: none;
  color: var(--text-sub);
  padding: 0.5rem 1.25rem;
  font-weight: 600;
  border-radius: 20px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}

.tab-btn:hover,
.tab-btn.active {
  background: var(--primary-color);
  color: #ffffff;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.schedule-item {
  display: flex;
  gap: 1rem;
  background: #f8fafc;
  padding: 0.75rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.schedule-img {
  width: 70px;
  height: 90px;
  border-radius: var(--radius-sm);
  object-fit: cover;
}

.filter-panel {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.25rem;
}

.filter-row {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  margin-bottom: 0.9rem;
}

.filter-row:last-child {
  margin-bottom: 0;
}

.filter-label {
  flex: 0 0 88px;
  color: var(--text-main);
  font-weight: 700;
  font-size: 0.9rem;
  padding-top: 0.15rem;
}

.filter-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag-item {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  background: #f8fafc;
  color: var(--text-sub);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}

.tag-item.active,
.tag-item:hover {
  background: var(--primary-color);
  color: #ffffff;
  border-color: var(--primary-color);
}

.pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.page-num {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-sub);
  font-weight: 700;
  cursor: pointer;
}

.page-num.active,
.page-num:hover {
  background: var(--primary-color);
  color: #ffffff;
  border-color: var(--primary-color);
}

.anime-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  transition: all 0.25s ease-in-out;
  display: flex;
  flex-direction: column;
  position: relative;
}

.anime-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary-color);
  box-shadow: var(--shadow-glow);
}

.card-cover {
  position: relative;
  aspect-ratio: 3/4;
  overflow: hidden;
  background: #f1f5f9;
}

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

.anime-card:hover .card-cover img {
  transform: scale(1.05);
}

.card-tag {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(4px);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  letter-spacing: 0.02em;
}

.card-rating {
  position: absolute;
  bottom: 0.5rem;
  right: 0.5rem;
  background: #2563eb;
  color: #fff;
  font-weight: 800;
  font-size: 0.8rem;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
}

.card-body {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex: 1;
  background: #ffffff;
}

.card-title {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-info {
  font-size: 0.8rem;
  color: var(--text-sub);
  display: flex;
  justify-content: space-between;
}

.card-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
}

/* Compliance Content Panel Style */
.compliance-panel {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 2rem;
}

.detail-backdrop {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.82) 0%, rgba(15, 23, 42, 0.95) 100%),
              url('/template-assets/manhua_single_b/images/hero-banner.svg') center/cover no-repeat;
  padding: 3rem 0;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 2.5rem;
  color: #ffffff;
}

.detail-header-flex {
  display: flex;
  gap: 2.5rem;
  align-items: flex-start;
}

.detail-poster {
  width: 240px;
  flex-shrink: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 15px 35px rgba(0,0,0,0.2);
  border: 2px solid rgba(255,255,255,0.1);
  background: #fff;
}

.detail-poster img {
  width: 100%;
  display: block;
}

.detail-meta h1 {
  font-size: 2.2rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 0.75rem;
}

.meta-badges {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.badge {
  background: var(--primary-light);
  color: var(--primary-color);
  border: 1px solid rgba(99,102,241,0.3);
  padding: 0.2rem 0.75rem;
  border-radius: 15px;
  font-size: 0.85rem;
  font-weight: 600;
}

.episodes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}

.ep-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 0.6rem;
  border-radius: var(--radius-sm);
  text-align: center;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.2s;
}

.ep-btn:hover {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: #ffffff;
  transform: translateY(-2px);
}

.cast-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
}

.cast-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--primary-color);
}

.playlist-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  height: 100%;
  box-shadow: var(--shadow-sm);
}

.playlist-scroll {
  overflow-y: auto;
  max-height: 480px;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 1rem;
}

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

.compliance-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--primary-light);
  color: var(--primary-color);
  padding: 0.35rem 0.85rem;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 700;
  border: 1px solid rgba(37, 99, 235, 0.2);
}

.compliance-section {
  margin-bottom: 2rem;
}

.compliance-section h2, section h2, main h2 {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.compliance-section p {
  color: var(--text-sub);
  line-height: 1.8;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.compliance-box {
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  margin: 1rem 0;
}

/* Timeline & Flowcharts */
.flow-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
  margin: 1.5rem 0;
}

.flow-step-card {
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  text-align: center;
  position: relative;
  transition: all 0.25s ease;
}

.flow-step-card:hover {
  border-color: var(--primary-color);
  background: #ffffff;
  transform: translateY(-3px);
  box-shadow: var(--shadow-sm);
}

.step-num {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  background: var(--primary-color);
  color: #fff;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.75rem;
}

.step-title {
  font-size: 0.95rem;
  font-weight: 800;
  margin-bottom: 0.4rem;
  color: var(--text-main);
}

.step-desc {
  font-size: 0.85rem;
  color: var(--text-sub);
}

/* Forms & Inputs */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.4rem;
}

.form-control {
  width: 100%;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.85rem;
  color: var(--text-main);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

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

/* Modals */
.modal-backdrop {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-box {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 480px;
  padding: 2rem;
  box-shadow: var(--shadow-lg);
  position: relative;
  color: var(--text-main);
  animation: modalIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1.25rem;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
}

.modal-close:hover {
  color: var(--text-main);
}

/* Footer & Compliance Bar */
.footer {
  background: #0f172a;
  color: #f8fafc;
  border-top: 1px solid #1e293b;
  padding: 3rem 2rem 1.5rem;
  margin-top: auto;
}

.footer-container {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}

.footer-col h4 {
  font-size: 0.95rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 1rem;
  letter-spacing: 0.02em;
}

.footer-col p {
  color: #94a3b8;
  font-size: 0.85rem;
  line-height: 1.6;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer-links a {
  color: #94a3b8;
  font-size: 0.85rem;
}

.footer-links a:hover {
  color: #60a5fa;
}

.footer-bottom {
  max-width: 1280px;
  margin: 0 auto;
  padding-top: 1.5rem;
  border-top: 1px solid #1e293b;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.75rem;
  color: #64748b;
}

.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 42px;
  height: 42px;
  border-radius: 6px;
  background: #0f172a;
  color: #fff;
  border: none;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  z-index: 999;
  transition: all 0.2s ease;
}

.back-to-top:hover {
  transform: translateY(-2px);
  background: var(--primary-color);
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  top: 5rem;
  right: 2rem;
  z-index: 2500;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.toast {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--primary-color);
  color: var(--text-main);
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 280px;
  animation: toastIn 0.3s ease;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateX(50px); }
  to { opacity: 1; transform: translateX(0); }
}

/* Page Banner Explicit Geometric Styling Overrides */
.page-banner .page-title {
  color: #ffffff !important;
}
.page-banner .page-title i {
  color: #ffffff !important;
}
.page-banner .page-subtitle {
  color: #dbeafe !important;
}
.page-banner .breadcrumb, .page-banner .breadcrumb span {
  color: #93c5fd !important;
}
.page-banner .breadcrumb a {
  color: #dbeafe !important;
}

/* Compliance Panels & Modals Explicit Geometric Text Overrides */
.compliance-panel h1, .compliance-panel h2, .compliance-panel h3, .compliance-panel h4, .compliance-panel h5,
.modal-box h1, .modal-box h2, .modal-box h3, .modal-box h4 {
  color: var(--text-main) !important;
}

.rule-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  text-align: center;
  transition: all 0.25s ease;
  box-shadow: var(--shadow-sm);
}

.rule-card:hover {
  border-color: var(--primary-color);
  transform: translateY(-3px);
  box-shadow: var(--shadow-glow);
}

.reader-shell {
  max-width: 980px;
  margin: 0 auto 2.5rem;
  padding: 1.25rem;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 18px;
  background:
    radial-gradient(circle at top left, rgba(99, 102, 241, 0.12), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.96));
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.12);
}

.manga-reader-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
  margin-bottom: 2rem;
}

.manga-stage {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.manga-stage-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  padding: 0.25rem 0.25rem 1rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.22);
}

.reader-shell .breadcrumb,
.reader-shell .breadcrumb span {
  color: #64748b !important;
}

.reader-shell .breadcrumb a {
  color: #2563eb !important;
}

.reader-shell .breadcrumb a:hover {
  color: #1d4ed8 !important;
}

.reader-shell .page-title,
.reader-shell .page-title span {
  color: #0f172a !important;
  text-shadow: none;
}

.reader-shell .page-title i {
  color: #ea580c !important;
}

.reader-shell .page-subtitle {
  color: #475569 !important;
}

.manga-meta-pill {
  background: var(--primary-light);
  color: var(--primary-color);
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
  font-size: 0.85rem;
  font-weight: 700;
  white-space: nowrap;
}

.manga-page-rail {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
  align-items: center;
}

.comic-page-card {
  width: min(100%, 820px);
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 16px 42px rgba(15, 23, 42, 0.10);
}

.comic-page-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 1.1rem;
  background: #f8fafc;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-sub);
  font-size: 0.85rem;
  font-weight: 700;
}

.comic-page-card img {
  width: 100%;
  max-height: none;
  display: block;
  background: #f8fafc;
  object-fit: contain;
}

.page-chip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
  padding: 0.85rem 1rem;
  background: var(--bg-dark);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-sub);
  font-size: 0.875rem;
  font-weight: 700;
}

.page-chip:hover,
.page-chip.active {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: #ffffff;
}

.reader-note {
  margin-top: 0.75rem;
  padding: 0.85rem 1rem;
  background: #f8fafc;
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-sub);
  font-size: 0.85rem;
}

/* Responsive Rules */
@media (max-width: 1024px) {
  .footer-container {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .navbar {
    padding: 0.75rem 1rem;
  }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #ffffff;
    flex-direction: column;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
  }
  .nav-links.active {
    display: flex;
  }
  .mobile-toggle {
    display: block;
  }
  .footer-container {
    grid-template-columns: 1fr;
  }
  .page-title {
    font-size: 1.75rem;
  }
  .compliance-panel {
    padding: 1.5rem;
  }
  .manga-reader-layout {
    grid-template-columns: 1fr;
  }
}
