/* Variables & Setup */
:root {
  --primary-color: #00d2ff;
  --secondary-color: #3a7bd5;
  --bg-dark: #0a0e17;
  --text-main: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.8);
  --glass-bg: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.1);
  --font-heading: 'M PLUS 1p', sans-serif;
  --font-body: 'Zen Kaku Gothic New', sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-dark);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

/* Background Canvas */
#bg-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -2;
  background: linear-gradient(135deg, #050b14 0%, #1a2a42 100%);
}

.container {
  width: 80%;
  max-width: 1200px;
  margin: 0 auto;
}

.text-center {
  text-align: center;
}

/* Glassmorphism Classes */
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* Navigation */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  padding: 1.5rem 0;
  z-index: 100;
  transition: all 0.3s ease;
}

.navbar.scrolled {
  background: rgba(10, 14, 23, 0.9);
  backdrop-filter: blur(10px);
  padding: 1rem 0;
  border-bottom: 1px solid var(--glass-border);
}

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

.nav-brand {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 900;
  background: linear-gradient(to right, #ffffff, var(--primary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: 2px;
}

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

.nav-links a {
  color: var(--text-main);
  text-decoration: none;
  font-weight: 700;
  font-size: 1rem;
  transition: color 0.3s;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -4px;
  left: 0;
  background: var(--primary-color);
  transition: width 0.3s;
}

.nav-links a:hover::after {
  width: 100%;
}

/* Hero Section */
.hero {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.hero-bg-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: top center; /* Changed from center to keep top visible */
  opacity: 0.25; /* Slightly increased visibility to look better */
  z-index: -1;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 60%, rgba(0,0,0,0) 100%);
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 60%, rgba(0,0,0,0) 100%);
}

.hero-content {
  text-align: center;
  z-index: 10;
  animation: fadeIn 1.5s ease-out;
}

.catchphrase {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 400;
  margin-bottom: 1.5rem;
  text-shadow: 0 0 10px rgba(0, 0, 0, 0.8);
}

.catchphrase .line-1 { display: inline-block; animation: slideRight 1s ease-out; }
.catchphrase .line-2 { display: inline-block; animation: slideLeft 1.2s ease-out; color: var(--primary-color); }

.main-title {
  font-family: var(--font-heading);
  font-size: 4.5rem;
  font-weight: 900;
  line-height: 1.1;
  background: linear-gradient(to right, #ffffff, #00d2ff, #3a7bd5);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 4px 20px rgba(0, 210, 255, 0.4);
  letter-spacing: 5px;
  margin-bottom: 0.5rem;
}

.subtitle {
  font-family: 'Zen Kaku Gothic New', sans-serif;
  letter-spacing: 8px;
  color: var(--text-secondary);
  margin-bottom: 3rem;
  font-size: 1rem;
}

.btn {
  display: inline-block;
  padding: 1rem 2.5rem;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.1rem;
  transition: all 0.3s;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.primary-btn {
  background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
  color: #fff;
  box-shadow: 0 4px 15px rgba(0, 210, 255, 0.4);
}

.primary-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 210, 255, 0.6);
}

/* Sections */
.section {
  padding: 6rem 0;
  position: relative;
}

.section-title {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  margin-bottom: 2rem;
  letter-spacing: 2px;
}

.section-text {
  font-size: 1.1rem;
  line-height: 2;
  color: var(--text-secondary);
}

/* Characters Section */
.characters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.character-card {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s, box-shadow 0.3s;
  overflow: hidden;
  border-top: 2px solid transparent;
}

.character-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 40px rgba(0, 210, 255, 0.2);
  border-top: 2px solid var(--primary-color);
}

.char-image-container {
  width: 100%;
  height: 400px; /* Reduced to fit better, will adjust if needed */
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  background: rgba(0,0,0,0.3);
  display: flex;
  justify-content: center;
  align-items: center;
}

.char-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: transform 0.5s ease;
}

.character-card:hover .char-img {
  transform: scale(1.05);
}

.char-info {
  padding: 1.5rem 0.5rem;
  text-align: center;
}

.char-name {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.char-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* Books Section */
.books-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.book-card {
  text-decoration: none;
  color: var(--text-main);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.book-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  border-color: var(--primary-color);
}

.book-cover {
  width: 100%;
  padding-top: 140%; /* aspect ratio roughly 1:1.4 */
  position: relative;
  background: #111;
}

.book-cover img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.3s;
}

.vol-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: bold;
  color: var(--primary-color);
  border: 1px solid rgba(0, 210, 255, 0.3);
}

.book-details {
  padding: 1.5rem;
  text-align: center;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.book-details h3 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  font-family: var(--font-heading);
}

.amazon-btn {
  background: transparent;
  color: #fff;
  border: 1px solid var(--primary-color);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 0.9rem;
}

.book-card:hover .amazon-btn {
  background: var(--primary-color);
  color: #000;
}

/* Footer */
.footer {
  text-align: center;
  padding: 3rem 0;
  border-top: 1px solid var(--glass-border);
  margin-top: 4rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* Animations & Utilities */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideRight {
  from { opacity: 0; transform: translateX(-30px); }
  to { opacity: 1; transform: translateX(0); }
}

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

.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.slide-up {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.slide-up.visible {
  opacity: 1;
  transform: translateY(0);
}

.worldview-image-container {
  margin-top: 1rem;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

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

/* Responsive */
@media (max-width: 768px) {
  .main-title { font-size: 3rem; }
  .catchphrase { font-size: 1.2rem; }
  .nav-links { display: none; } /* Could add hamburger menu for real project */
  .characters-grid { grid-template-columns: 1fr; }
}
