/* Shared shell for Manthan sub-pages (gallery, etc.) */
@font-face {
  font-family: 'CoalhandLuke';
  src: url('../fonts/coalhandluke/CoalhandLuke-Trial.ttf') format('truetype'),
    url('../fonts/coalhandluke/CoalhandLuke-Trial.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

body.manthan-ai-page {
  background: linear-gradient(to bottom, #113149 0%, #204965 25%, #6a5364 50%, #d87b55 75%, #904226 100%);
  color: #ffffff;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

body.manthan-ai-page main {
  flex: 1 0 auto;
  padding-top: 72px;
  display: flex;
  flex-direction: column;
}

.stars-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.star {
  position: absolute;
  background-color: #fff;
  border-radius: 50%;
  animation: manthan-twinkle linear infinite;
}

@keyframes manthan-twinkle {
  0%, 100% { opacity: 0.2; }
  50% { opacity: 1; }
}

.manthan-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 10px 0;
  z-index: 100;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease, padding 0.4s ease, backdrop-filter 0.4s ease;
}

.manthan-header.is-scrolled {
  padding: 8px 0;
  background: rgba(12, 28, 42, 0.52);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.22);
}

.manthan-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.manthan-header-logo {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none;
  opacity: 0.95;
}

.manthan-header-logo img {
  height: 38px;
  width: auto;
}

.manthan-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.manthan-header-menu {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 1.5px;
  border-radius: 50px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.manthan-header-menu a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 14px;
  border-radius: 50px;
  font-size: 12px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.78);
  text-decoration: none;
  transition: all 0.25s ease;
  white-space: nowrap;
}

.manthan-header-menu a:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

.manthan-header-menu a.manthan-nav-register {
  background: #ecc055;
  color: #1F3130;
  font-weight: 600;
}

.manthan-nav-sep {
  width: 1px;
  height: 10px;
  background: rgba(255, 255, 255, 0.14);
  margin: 0 3px;
}

.manthan-header-menu a.manthan-nav-home {
  color: #ecc055;
  border: 1px solid rgba(236, 192, 85, 0.35);
  background: rgba(236, 192, 85, 0.08);
  font-weight: 600;
}

.manthan-menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
  font-size: 16px;
  cursor: pointer;
}

.section-heading {
  text-align: center;
  margin-bottom: 40px;
}

.section-title {
  font-size: 42px;
  font-weight: 700;
  margin-bottom: 15px;
  background: linear-gradient(135deg, #ffffff, #c7dbe6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-subtitle {
  color: #a7bebd;
  font-size: 16px;
  max-width: 640px;
  margin: 0 auto;
}

.manthan-footer {
  background: linear-gradient(180deg, #0c1e2e 0%, #091620 100%);
  border-top: 1px solid rgba(236, 192, 85, 0.15);
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  margin-top: auto;
}

.footer-glow-bar {
  height: 2px;
  background: linear-gradient(to right, transparent, #ecc055 30%, #d87b55 70%, transparent);
  opacity: 0.6;
}

.footer-main {
  display: grid;
  grid-template-columns: 1.8fr 1fr 1fr;
  gap: 40px;
  padding: 50px 0 36px;
}

.footer-logo-wrap img {
  height: 44px;
  width: auto;
}

.footer-tagline {
  font-size: 13.5px;
  line-height: 1.7;
  color: rgba(199, 219, 230, 0.6);
  margin: 16px 0 0;
  max-width: 320px;
}

.footer-col-title {
  font-size: 12px;
  font-weight: 700;
  color: #ecc055;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  font-size: 13.5px;
  color: rgba(199, 219, 230, 0.65);
  text-decoration: none;
}

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

.footer-bottom-bar {
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  padding: 18px 0;
}

.footer-bottom-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  color: rgba(199, 219, 230, 0.5);
}

.footer-bottom-links a {
  color: rgba(199, 219, 230, 0.5);
  text-decoration: none;
}

/* Dialogue cards — shared with gallery album cards on sub-pages */
.dialogue-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 12px;
  padding: 0;
  height: 100%;
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.dialogue-card-header {
  flex: 0 0 auto;
  position: relative;
  line-height: 0;
}

.dialogue-card-image {
  width: 100%;
  aspect-ratio: 600 / 250;
  object-fit: cover;
  object-position: center;
  display: block;
  background: #0c2236;
}

.dialogue-card-header::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  aspect-ratio: 600 / 250;
  background: linear-gradient(180deg, rgba(17, 49, 73, 0.1) 0%, rgba(12, 34, 54, 0.35) 60%, rgba(12, 34, 54, 0.65) 100%);
  pointer-events: none;
  z-index: 1;
}

.dialogue-card.completed .dialogue-card-header::after {
  background: linear-gradient(180deg, rgba(17, 49, 73, 0.25) 0%, rgba(12, 34, 54, 0.5) 60%, rgba(12, 34, 54, 0.78) 100%);
}

.dialogue-card-header .dialogue-status,
.dialogue-card-header .dialogue-title {
  position: absolute;
  z-index: 2;
  line-height: normal;
}

.dialogue-card-header .dialogue-status {
  top: 12px;
  left: 20px;
}

.dialogue-card-header .dialogue-title {
  left: 20px;
  right: 20px;
  bottom: 14px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.65);
}

.dialogue-card-body {
  flex: 1;
  padding: 18px 30px 30px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.dialogue-card.completed {
  border-color: rgba(255, 255, 255, 0.05);
  background: rgba(255, 255, 255, 0.02);
  opacity: 0.75;
}

.dialogue-card.completed .dialogue-status {
  background: rgba(255, 255, 255, 0.1);
  color: #d1e2e0;
}

.dialogue-status {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0;
  align-self: flex-start;
}

.status-completed {
  background: rgba(255, 255, 255, 0.1);
  color: #a7bebd;
}

.status-upcoming {
  background: rgba(236, 192, 85, 0.15);
  color: #ecc055;
  border: 1px solid rgba(236, 192, 85, 0.3);
}

.dialogue-number {
  position: absolute;
  top: 8px;
  right: 20px;
  font-size: 55px;
  font-weight: 900;
  color: rgba(255, 255, 255, 0.22);
  line-height: 1;
  pointer-events: none;
  user-select: none;
  z-index: 2;
}

.dialogue-title {
  font-family: 'CoalhandLuke', cursive, sans-serif;
  font-size: 28px;
  font-weight: normal;
  margin: 0;
  padding: 0;
  color: #ffffff;
  letter-spacing: 0.5px;
  line-height: 1.3;
}

.dialogue-meta {
  list-style: none;
  padding: 0;
  margin: 0 0 25px;
}

.dialogue-meta li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  color: #c7dbe6;
  margin-bottom: 8px;
}

.dialogue-meta li i {
  color: #ecc055;
  margin-top: 3px;
  font-size: 14px;
  width: 16px;
  text-align: center;
}

.dialogue-gallery-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
  width: 100%;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #ecc055;
  text-decoration: none;
  border: 1px solid rgba(236, 192, 85, 0.35);
  background: rgba(236, 192, 85, 0.08);
  transition: all 0.25s ease;
}

.gallery-album-card:hover .dialogue-gallery-link {
  color: #1f3130;
  background: #ecc055;
  border-color: #ecc055;
}

@media (max-width: 768px) {
  .manthan-menu-toggle { display: flex; }

  .manthan-header-menu {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    right: 16px;
    flex-direction: column;
    align-items: stretch;
    min-width: 200px;
    padding: 10px;
    border-radius: 16px;
    background: rgba(12, 28, 42, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
  }

  .manthan-header-menu.is-open { display: flex; }
  .manthan-header-menu a { justify-content: center; padding: 10px 14px; }
  .manthan-nav-sep { display: none; }

  .section-title { font-size: 32px; }
  .footer-main { grid-template-columns: 1fr; }
}
