/* ═══════════════════════════════════════════════════════════
   Design System - CSS Custom Properties
   ═══════════════════════════════════════════════════════════ */
:root {
  /* Primary Colors */
  --color-primary: #667eea;
  --color-secondary: #764ba2;

  /* Theme Colors */
  --color-pink: #ff6b9d;
  --color-pink-light: #ffc3e1;
  --color-green: #56ab2f;
  --color-green-light: #a8e063;
  --color-yellow: #ffd93d;

  /* Text Colors */
  --color-text-dark: #2c3e50;
  --color-text-body: #333;
  --color-text-muted: #666;
  --color-text-light: #7f8c8d;
  --color-text-subtle: #999;

  /* Status Colors */
  --color-error: #e74c3c;
  --color-success: #27ae60;

  /* Backgrounds */
  --color-white: #ffffff;
  --color-bg-card: rgba(255, 255, 255, 0.95);
  --color-bg-section: rgba(255, 255, 255, 0.8);

  /* Gradients */
  --gradient-primary: linear-gradient(
    135deg,
    var(--color-primary) 0%,
    var(--color-secondary) 100%
  );
  --gradient-pink: linear-gradient(
    135deg,
    var(--color-pink) 0%,
    var(--color-pink-light) 100%
  );
  --gradient-green: linear-gradient(
    135deg,
    var(--color-green) 0%,
    var(--color-green-light) 100%
  );

  /* Shadows */
  --shadow-soft: 0 10px 40px rgba(0, 0, 0, 0.1);
  --shadow-medium: 0 10px 30px rgba(0, 0, 0, 0.2);
  --shadow-strong: 0 15px 40px rgba(0, 0, 0, 0.3);
  --shadow-nav: 0 4px 15px rgba(0, 0, 0, 0.1);

  /* Border Radius */
  --radius-small: 8px;
  --radius-medium: 15px;
  --radius-large: 20px;
  --radius-xl: 25px;
  --radius-round: 50px;
  --radius-circle: 50%;

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;

  /* Spacing */
  --spacing-xs: 8px;
  --spacing-sm: 12px;
  --spacing-md: 20px;
  --spacing-lg: 30px;
  --spacing-xl: 40px;
  --spacing-2xl: 60px;
}

/* ═══════════════════════════════════════════════════════════
   Base Styles
   ═══════════════════════════════════════════════════════════ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Fredoka", "Quicksand", sans-serif;
  background: var(--gradient-primary);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  font-weight: 400;
  display: flex;
  flex-direction: column;
}

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    rgba(102, 126, 234, 0.1) 0%,
    rgba(118, 75, 162, 0.1) 100%
  );
  z-index: -1;
}

/* Make media scale down predictably */
img,
svg,
video {
  max-width: 100%;
  height: auto;
}

/* Focus states for accessibility */
a:focus,
button:focus,
audio:focus {
  outline: 3px solid var(--color-primary);
  outline-offset: 2px;
}

/* Skip to content link */
.skip-link {
  position: fixed;
  top: -100px;
  left: 0;
  background: var(--color-primary);
  color: var(--color-white);
  padding: var(--spacing-xs) 16px;
  text-decoration: none;
  border-radius: 0 0 4px 0;
  z-index: 2000;
  font-weight: 500;
  transition: top var(--transition-normal);
}

.skip-link:focus {
  top: 0;
  outline: 3px solid var(--color-white);
  outline-offset: -3px;
}

/* Legacy top-nav removed - now using site-header */

/* ═══════════════════════════════════════════════════════════
   Site Header - Simple Minimal Navigation
   ═══════════════════════════════════════════════════════════ */
.site-header {
  width: 100%;
  padding: 1rem 2rem;
  background: transparent;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

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

/* Logo */
.header-logo {
  font-family: "Playfair Display", serif;
  font-weight: 700;
  font-size: 1.2rem;
  color: #fff;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.header-logo:hover {
  opacity: 0.8;
}

.header-logo:focus {
  outline: 2px solid #fff;
  outline-offset: 4px;
}

.logo-star,
.logo-text {
  display: contents;
  color: inherit;
}

/* Navigation Links */
.header-nav {
  display: flex;
  gap: 2rem;
}

.header-nav .nav-item {
  background: none;
  border: none;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.8);
  font-family: "Fredoka", "Quicksand", sans-serif;
  font-weight: 500;
  font-size: 0.9rem;
  transition: color 0.2s ease;
}

.header-nav .nav-item:hover {
  color: #fff;
  background: none;
  transform: none;
  box-shadow: none;
}

.header-nav .nav-item.active {
  color: #fff;
  font-weight: 600;
}

/* Mobile Menu Button */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  z-index: 1001;
}

.hamburger-line {
  width: 20px;
  height: 2px;
  background: #fff;
  border-radius: 1px;
  transition: all 0.2s ease;
}

.mobile-menu-toggle[aria-expanded="true"] .hamburger-line:nth-child(1) {
  transform: rotate(45deg) translate(4px, 4px);
}

.mobile-menu-toggle[aria-expanded="true"] .hamburger-line:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle[aria-expanded="true"] .hamburger-line:nth-child(3) {
  transform: rotate(-45deg) translate(4px, -4px);
}

/* Mobile Navigation Overlay */
.mobile-nav-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: var(--gradient-primary);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
  display: none;
}

.mobile-nav-overlay.active {
  opacity: 1;
  visibility: visible;
}

.mobile-nav {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100%;
  gap: 1.5rem;
}

.mobile-nav-item {
  color: #fff;
  text-decoration: none;
  font-family: "Playfair Display", serif;
  font-size: 1.5rem;
  font-weight: 500;
  transition: opacity 0.2s ease;
}

.mobile-nav-item:hover {
  opacity: 0.8;
}

/* No extra body padding - header is inline */
body.has-header {
  padding-top: 0;
}

/* Responsive */
@media (max-width: 600px) {
  .site-header {
    padding: 1rem 1.25rem;
  }

  .header-nav {
    display: none;
  }

  .mobile-menu-toggle {
    display: flex;
  }

  .mobile-nav-overlay {
    display: flex;
  }
}

@media (max-width: 400px) {
  .header-logo {
    font-size: 1.05rem;
  }
}

/* Footer */
.site-footer {
  background: var(--color-bg-card);
  padding: var(--spacing-md) var(--spacing-md);
  margin-top: 10px;
  text-align: center;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
  width: 100%;
}

.footer-content {
  max-width: 800px;
  margin: 0 auto;
}

.footer-social {
  display: flex;
  justify-content: center;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-md);
}

.footer-social a {
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 500;
  transition: color var(--transition-normal);
}

.footer-social a:hover {
  color: var(--color-secondary);
}

.footer-copyright {
  color: var(--color-text-muted);
  font-size: 0.9em;
  margin-top: 15px;
}

/* Sparkle animation */
@keyframes sparkle {
  0%,
  100% {
    opacity: 0;
    transform: scale(0);
  }
  50% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-8px);
  }
}

@keyframes bounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.sparkles {
  position: fixed;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.sparkle {
  position: absolute;
  width: 10px;
  height: 10px;
  background: white;
  border-radius: 50%;
  animation: sparkle 3s infinite;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}

.sparkle:nth-child(1) {
  top: 10%;
  left: 20%;
  animation-delay: 0s;
}
.sparkle:nth-child(2) {
  top: 20%;
  left: 80%;
  animation-delay: 0.5s;
}
.sparkle:nth-child(3) {
  top: 40%;
  left: 10%;
  animation-delay: 1s;
}
.sparkle:nth-child(4) {
  top: 60%;
  left: 70%;
  animation-delay: 1.5s;
}
.sparkle:nth-child(5) {
  top: 80%;
  left: 30%;
  animation-delay: 2s;
}
.sparkle:nth-child(6) {
  top: 30%;
  left: 50%;
  animation-delay: 2.5s;
}
.sparkle:nth-child(7) {
  top: 15%;
  left: 45%;
  animation-delay: 0.3s;
}
.sparkle:nth-child(8) {
  top: 50%;
  left: 90%;
  animation-delay: 0.8s;
}
.sparkle:nth-child(9) {
  top: 70%;
  left: 15%;
  animation-delay: 1.3s;
}
.sparkle:nth-child(10) {
  top: 25%;
  left: 65%;
  animation-delay: 1.8s;
}
.sparkle:nth-child(11) {
  top: 85%;
  left: 75%;
  animation-delay: 2.3s;
}
.sparkle:nth-child(12) {
  top: 5%;
  left: 55%;
  animation-delay: 0.6s;
}
.sparkle:nth-child(13) {
  top: 45%;
  left: 35%;
  animation-delay: 1.1s;
}
.sparkle:nth-child(14) {
  top: 65%;
  left: 50%;
  animation-delay: 1.6s;
}
.sparkle:nth-child(15) {
  top: 90%;
  left: 60%;
  animation-delay: 2.1s;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  position: relative;
  z-index: 2;
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
}

/* Books pages - content flush with site header */
body.has-header .container {
  padding-top: 0;
  max-width: 100%;
  padding-left: 0;
  padding-right: 0;
}

body.has-header .container > header {
  border-radius: 0;
  max-width: 100%;
  box-shadow: none;
}

body.has-header .books-grid {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

body.has-header .book-page {
  max-width: 900px;
  margin-left: 20px;
  margin-right: 20px;
  margin-bottom: 40px;
}

@media (min-width: 940px) {
  body.has-header .book-page {
    margin-left: auto;
    margin-right: auto;
  }
}

header {
  text-align: center;
  padding: 40px 20px;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
}

h1 {
  font-size: 3em;
  color: var(--color-white);
  margin-bottom: 10px;
  font-weight: 700;
}

.tagline {
  font-size: 1.3em;
  color: var(--color-white);
  margin-top: 10px;
}

nav {
  padding: 15px;
  border-radius: var(--radius-large);
  text-align: center;
}

nav a {
  display: inline-block;
  margin: 0 15px;
  padding: 10px var(--spacing-md);
  background: var(--gradient-primary);
  color: var(--color-white);
  text-decoration: none;
  border-radius: var(--radius-medium);
  font-size: 1.1em;
  transition: transform var(--transition-normal),
    box-shadow var(--transition-normal);
  font-weight: 500;
}

nav a:hover {
  transform: scale(1.1);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* Homepage styles */
.books-grid {
  display: flex;
  flex-direction: row;
  gap: 30px;
  margin-top: 30px;
  margin-bottom: 60px;
  align-items: stretch;
}

.book-card {
  background: var(--color-white);
  border-radius: var(--radius-xl);
  padding: var(--spacing-lg);
  text-align: center;
  box-shadow: var(--shadow-medium);
  transition: transform var(--transition-normal),
    box-shadow var(--transition-normal);
  animation: float 5s infinite ease-in-out;
  font-weight: 400;
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* When card is an anchor */
a.book-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
}

.book-card:nth-child(2) {
  animation-delay: 0.5s;
}

.book-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-strong);
}

.book-cover {
  width: 100%;
  height: 300px;
  border-radius: var(--radius-medium);
  margin-bottom: var(--spacing-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2em;
  font-weight: bold;
  color: var(--color-white);
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.pink-cover {
  background: var(--gradient-pink);
}
.green-cover {
  background: var(--gradient-green);
}

.book-card h2 {
  font-size: 1.8em;
  color: var(--color-text-body);
  margin-bottom: 10px;
  font-weight: 600;
}

.book-card p {
  color: var(--color-text-muted);
  font-size: 1.1em;
}

/* Book info wrapper for consistent card heights */
.book-info {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.book-info p {
  flex: 1;
}

/* Pre-order button */
.preorder-btn {
  display: inline-block;
  margin-top: 15px;
  padding: 12px 28px;
  border: none;
  border-radius: var(--radius-xl);
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
  color: white;
}

.preorder-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.preorder-btn:active {
  transform: scale(0.98);
}

.preorder-btn-pink {
  background: linear-gradient(135deg, #e91e8c 0%, #ff6b9d 100%);
}

.preorder-btn-green {
  background: linear-gradient(135deg, #2e7d32 0%, #56ab2f 100%);
}

.preorder-btn:disabled {
  background: #9e9e9e;
  cursor: not-allowed;
  opacity: 0.7;
}

.preorder-btn:disabled:hover {
  transform: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.read-button {
  display: inline-block;
  margin-top: 15px;
  padding: var(--spacing-sm) var(--spacing-lg);
  background: var(--gradient-primary);
  color: var(--color-white);
  text-decoration: none;
  border-radius: var(--radius-xl);
  font-size: 1.1em;
  transition: transform var(--transition-normal);
  font-weight: 500;
}

.read-button:hover {
  transform: scale(1.1);
}

/* Book page styles */
.book-page {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: var(--spacing-xl);
  margin-bottom: var(--spacing-2xl);
  box-shadow: var(--shadow-medium);
}

.book-page.pink-theme {
  border: 8px solid var(--color-pink);
  background: linear-gradient(
    to bottom,
    var(--color-pink-light) 0%,
    var(--color-white) 100%
  );
}
.book-page.green-theme {
  border: 8px solid var(--color-green);
  background: linear-gradient(
    to bottom,
    var(--color-green-light) 0%,
    var(--color-white) 100%
  );
}

.book-header {
  text-align: center;
  margin-bottom: var(--spacing-lg);
}
.book-title {
  font-size: 2.5em;
  margin-bottom: 10px;
}
.pink-theme .book-title {
  color: var(--color-pink);
  text-shadow: 2px 2px 0 var(--color-yellow);
}
.green-theme .book-title {
  color: var(--color-green);
  text-shadow: 2px 2px 0 var(--color-yellow);
}
.book-author {
  font-size: 1.3em;
  color: var(--color-text-muted);
  font-style: italic;
}

.audio-section {
  background: var(--color-bg-section);
  padding: 25px;
  border-radius: var(--radius-large);
  margin: var(--spacing-lg) 0;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}
.audio-section h3 {
  text-align: center;
  margin-bottom: 15px;
  font-size: 1.5em;
  color: var(--color-text-body);
}
audio {
  width: 100%;
  border-radius: var(--radius-medium);
  outline: none;
}

.book-description {
  background: var(--color-bg-section);
  padding: 25px;
  border-radius: var(--radius-large);
  margin: var(--spacing-lg) 0;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}
.book-description h3 {
  font-size: 1.8em;
  margin-bottom: 15px;
  color: var(--color-text-body);
}
.book-description p {
  font-size: 1.2em;
  line-height: 1.8;
  color: #555;
}

.characters-section {
  border-radius: var(--radius-large);
  margin: var(--spacing-lg) 0;
}
.characters-section h3 {
  font-size: 1.8em;
  margin-bottom: var(--spacing-md);
  text-align: center;
  color: var(--color-text-body);
}

.characters-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--spacing-md);
  margin-top: var(--spacing-md);
}
.character {
  text-align: center;
  padding: var(--spacing-md);
  background: var(--color-white);
  border-radius: var(--radius-medium);
  transition: transform var(--transition-normal);
}
.character:hover {
  transform: scale(1.05);
}
.character-avatar {
  width: 200px;
  height: 200px;
  border-radius: var(--radius-circle);
  margin: 0 auto 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}
.character-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-circle);
  position: relative;
  z-index: 1;
}
.pink-theme .character-avatar {
  background: var(--gradient-pink);
}
.green-theme .character-avatar {
  background: var(--gradient-green);
}
.character-name {
  font-size: 1.2em;
  font-weight: 500;
  color: var(--color-text-body);
}

/* Featured Main Character Styles */
.featured-character {
  text-align: center;
  padding: var(--spacing-lg);
  margin-bottom: var(--spacing-xl);
  background: var(--color-white);
  border-radius: var(--radius-large);
  /* box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15); */
}

.featured-character-avatar {
  width: 280px;
  height: 280px;
  border-radius: var(--radius-circle);
  margin: 0 auto var(--spacing-md);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow-medium);
  transition: transform var(--transition-normal);
}

.featured-character:hover .featured-character-avatar {
  transform: scale(1.05);
}

.featured-character-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-circle);
  position: relative;
  z-index: 1;
}

.pink-theme .featured-character-avatar {
  background: var(--gradient-pink);
}

.green-theme .featured-character-avatar {
  background: var(--gradient-green);
}

.featured-character-name {
  font-size: 1.8em;
  font-weight: 600;
  color: var(--color-text-body);
  margin-top: 15px;
}

@media (max-width: 768px) {
  h1 {
    font-size: 2em;
  }
  .book-card h2 {
    font-size: 1.5em;
  }
  .book-title {
    font-size: 2em;
  }
  nav a {
    display: block;
    margin: 10px 0;
  }

  .top-nav {
    top: 10px;
    right: 10px;
    flex-direction: column;
  }

  .nav-link {
    padding: 10px 20px;
    font-size: 0.9em;
  }

  .site-footer {
    padding: 30px 15px;
    margin-top: 40px;
  }

  .footer-social {
    flex-direction: column;
    gap: 12px;
  }

  /* Stack book cards on tablet and below */
  .books-grid {
    flex-direction: column;
  }

  .book-card {
    flex: none;
    width: 100%;
  }
}

/* Narrow phones and small tablets */
@media (max-width: 600px) {
  .container {
    padding: 16px;
  }
  header {
    padding: 24px 16px;
    margin-bottom: 24px;
  }
  nav {
    padding: 12px;
  }
  nav a {
    width: 100%;
    padding: 12px 16px;
    font-size: 1em;
  }

  .books-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .book-card {
    padding: 20px;
  }
  .book-cover {
    height: 180px;
    font-size: 1.4em;
  }
  .read-button {
    width: 100%;
    padding: 14px;
    font-size: 1em;
  }

  .preorder-btn {
    width: 100%;
    padding: 14px;
    font-size: 1em;
    text-align: center;
  }

  .book-page {
    padding: 24px;
    border-radius: 20px;
  }
  .book-title {
    font-size: 1.8em;
  }
  .book-description h3,
  .characters-section h3 {
    font-size: 1.4em;
  }
  .book-description p {
    font-size: 1.05em;
    line-height: 1.7;
  }

  .characters-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  .character {
    padding: 12px;
  }
  .character-avatar {
    width: 120px;
    height: 120px;
  }

  /* Featured character mobile optimization */
  .featured-character {
    padding: 20px;
    margin-bottom: 30px;
  }
  .featured-character-avatar {
    width: 200px;
    height: 200px;
  }
  .featured-character-name {
    font-size: 1.4em;
  }
}

/* Small phones - single column characters */
@media (max-width: 480px) {
  .characters-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .character {
    padding: 16px;
  }
  .character-avatar {
    width: 150px;
    height: 150px;
  }
}

/* Extra-small devices */
@media (max-width: 380px) {
  .book-cover {
    height: 140px;
    font-size: 1.2em;
  }
  .character-avatar {
    width: 130px;
    height: 130px;
  }
  .character-name {
    font-size: 1.1em;
  }

  /* Featured character extra-small mobile */
  .featured-character {
    padding: 16px;
    margin-bottom: 24px;
  }
  .featured-character-avatar {
    width: 160px;
    height: 160px;
  }
  .featured-character-name {
    font-size: 1.2em;
  }
}

/* Reduce motion for accessibility and battery */
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
  .sparkles {
    display: none;
  }
}

/* Avoid hover-only effects on touch devices */
@media (hover: none) {
  .book-card:hover,
  nav a:hover {
    transform: none;
    box-shadow: none;
  }
}

/* ═══════════════════════════════════════════════════════════
   Homepage / Landing Page Styles
   ═══════════════════════════════════════════════════════════ */
.landing-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: var(--spacing-2xl) var(--spacing-md) 0;
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  width: 100%;
}

.landing-content {
  background: var(--color-white);
  border-radius: var(--radius-large);
  padding: var(--spacing-2xl);
  box-shadow: var(--shadow-soft);
  max-width: 1100px;
  width: 100%;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  gap: var(--spacing-xl);
}

.content-left {
  flex: 1;
  text-align: left;
}

.profile-image-wrapper {
  flex-shrink: 0;
}

.profile-image {
  display: block;
  width: 350px;
  height: 350px;
  max-width: 100%;
  border-radius: var(--radius-circle);
  object-fit: cover;
  object-position: center top;
  border: 6px solid #e8ecef;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
  transition: transform var(--transition-normal),
    box-shadow var(--transition-normal);
  background-color: #f0f0f0;
}

.profile-image:hover {
  transform: scale(1.02);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.2);
}

.landing-title {
  font-family: "Playfair Display", serif;
  font-size: 3em;
  color: var(--color-text-dark);
  margin-bottom: 8px;
  font-weight: 600;
  letter-spacing: -0.5px;
}

.landing-subtitle {
  font-size: 1.25em;
  color: var(--color-text-light);
  margin-bottom: 10px;
  font-weight: 400;
}

.bio {
  font-size: 1.125em;
  line-height: 1.8;
  color: #5a6c7d;
  margin: var(--spacing-xl) 0;
}

.actions-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 15px;
  margin-top: var(--spacing-lg);
}

.social-links {
  display: flex;
  gap: 15px;
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: var(--spacing-sm) 28px;
  color: var(--color-white);
  text-decoration: none;
  border-radius: var(--radius-small);
  font-size: 1em;
  font-weight: 500;
  transition: all var(--transition-normal);
}

.social-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.social-link.linkedin {
  background: #0077b5;
}

.social-link.linkedin:hover {
  background: #006399;
}

.social-link.instagram {
  background: linear-gradient(135deg, #833ab4 0%, #fd1d1d 50%, #fcb045 100%);
}

.cta-button {
  display: inline-block;
  padding: 14px var(--spacing-xl);
  background: var(--gradient-primary);
  color: var(--color-white);
  text-decoration: none;
  border-radius: var(--radius-round);
  font-size: 1em;
  font-weight: 600;
  transition: all var(--transition-normal);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
  position: relative;
  overflow: hidden;
}

.cta-button::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left var(--transition-slow);
}

.cta-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 35px rgba(102, 126, 234, 0.4);
}

.cta-button:hover::before {
  left: 100%;
}

/* Home page specific nav */
.home-nav {
  position: fixed;
  top: var(--spacing-md);
  right: var(--spacing-md);
  z-index: 1000;
}

/* Homepage responsive styles */
@media (max-width: 1024px) {
  .landing-content {
    gap: var(--spacing-lg);
    padding: 50px var(--spacing-xl);
  }

  .profile-image {
    width: 280px;
    height: 280px;
  }
}

@media (max-width: 768px) {
  .home-nav {
    top: 10px;
    right: 10px;
  }

  .landing-content {
    flex-direction: column;
    padding: 50px var(--spacing-lg);
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-2xl);
  }

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

  .profile-image {
    width: 300px;
    height: 300px;
  }

  .landing-title {
    font-size: 2.2em;
  }

  .landing-subtitle {
    font-size: 1.1em;
  }

  .bio {
    font-size: 1.05em;
  }

  .actions-row {
    align-items: center;
    gap: var(--spacing-md);
  }

  .social-links {
    flex-direction: column;
    align-items: stretch;
    gap: 15px;
    width: 100%;
  }

  .social-link {
    justify-content: center;
  }

  .cta-button {
    width: 100%;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .landing-container {
    padding: var(--spacing-lg) 15px 0;
  }

  .landing-content {
    padding: var(--spacing-xl) 25px;
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
  }

  .profile-image {
    width: 250px;
    height: 250px;
  }

  .landing-title {
    font-size: 1.9em;
  }

  .landing-subtitle {
    font-size: 1em;
  }

  .bio {
    font-size: 1em;
  }

  .cta-button {
    padding: 14px 36px;
    font-size: 1em;
  }
}

/* ═══════════════════════════════════════════════════════════
   UI Enhancements - Animations & Polish
   ═══════════════════════════════════════════════════════════ */

/* Page Load Animation */
@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes gentle-pulse {
  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  }
  50% {
    transform: scale(1.02);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.2);
  }
}

@keyframes glow-pulse {
  0%,
  100% {
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.3);
  }
  50% {
    box-shadow: 0 0 30px rgba(102, 126, 234, 0.5);
  }
}

/* Page Content Fade In */
.container > header,
.book-page,
.books-grid,
.landing-content {
  animation: fade-in-up 0.6s ease-out;
}

/* Enhanced Book Cards */
.book-card {
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275),
    box-shadow 0.3s ease;
}

.book-card:hover {
  transform: translateY(-15px) scale(1.02);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
}

/* Book Cover Glow on Hover */
.book-cover {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.book-card:hover .book-cover {
  box-shadow: 0 0 30px rgba(102, 126, 234, 0.4);
}

/* Character Avatar Animations */
.character-avatar,
.featured-character-avatar {
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275),
    box-shadow 0.3s ease;
}

.character:hover .character-avatar {
  transform: scale(1.1);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.featured-character-avatar {
  animation: gentle-pulse 4s ease-in-out infinite;
}

/* Staggered Character Grid Animation */
.characters-grid .character {
  opacity: 0;
  animation: fade-in-up 0.5s ease-out forwards;
}

.characters-grid .character:nth-child(1) {
  animation-delay: 0.1s;
}
.characters-grid .character:nth-child(2) {
  animation-delay: 0.2s;
}
.characters-grid .character:nth-child(3) {
  animation-delay: 0.3s;
}
.characters-grid .character:nth-child(4) {
  animation-delay: 0.4s;
}

/* Featured Character Animation */
.featured-character {
  animation: fade-in-up 0.6s ease-out;
}

/* Audio Player Styling */
audio {
  width: 100%;
  border-radius: var(--radius-medium);
  background: linear-gradient(135deg, #f5f7fa 0%, #e4e8ec 100%);
  padding: 4px;
}

audio::-webkit-media-controls-panel {
  background: linear-gradient(135deg, #f5f7fa 0%, #e4e8ec 100%);
  border-radius: var(--radius-medium);
}

.audio-section {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.audio-section:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Theme-specific Audio Accent Colors */
.pink-theme audio {
  accent-color: var(--color-pink);
}

.green-theme audio {
  accent-color: var(--color-green);
}

/* Book Description Enhancement */
.book-description {
  transition: transform 0.3s ease;
}

.book-description:hover {
  transform: translateY(-2px);
}

/* Enhanced Button Hover States */
.cta-button,
.read-button,
.social-link {
  position: relative;
  overflow: hidden;
}

.cta-button::after,
.read-button::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.5s ease;
}

.cta-button:hover::after,
.read-button:hover::after {
  left: 100%;
}

/* Softer Shadows Throughout */
.book-page {
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.12);
}

.book-description,
.audio-section {
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}

/* Profile Image Enhancement */
.profile-image {
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275),
    box-shadow 0.4s ease;
}

.profile-image:hover {
  transform: scale(1.03);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
}

/* Footer Link Hover */
.footer-social a {
  position: relative;
}

.footer-social a::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-primary);
  transition: width 0.3s ease;
}

.footer-social a:hover::after {
  width: 100%;
}

/* Disable animations for users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  .container > header,
  .book-page,
  .books-grid,
  .landing-content,
  .characters-grid .character,
  .featured-character,
  .featured-character-avatar {
    animation: none;
    opacity: 1;
  }

  .book-card,
  .character-avatar,
  .featured-character-avatar,
  .audio-section,
  .book-description,
  .profile-image {
    transition: none;
  }
}

/* ═══════════════════════════════════════════════════════════
   Book Order Modal
   ═══════════════════════════════════════════════════════════ */

/* Modal Overlay */
.order-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-md);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-normal), visibility var(--transition-normal);
}

.order-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Modal Container */
.order-modal {
  --modal-accent: var(--color-primary);
  --modal-accent-light: rgba(102, 126, 234, 0.1);
  --modal-gradient: var(--gradient-primary);

  background: var(--color-white);
  border-radius: var(--radius-xl);
  max-width: 440px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-strong);
  position: relative;
  transform: translateY(20px) scale(0.95);
  transition: transform var(--transition-normal);
}

.order-modal-overlay.active .order-modal {
  transform: translateY(0) scale(1);
}

/* Theme Classes */
.order-modal.theme-pink {
  --modal-accent: var(--color-pink);
  --modal-accent-light: rgba(255, 107, 157, 0.1);
  --modal-gradient: var(--gradient-pink);
  border-top: 5px solid var(--color-pink);
}

.order-modal.theme-green {
  --modal-accent: var(--color-green);
  --modal-accent-light: rgba(86, 171, 47, 0.1);
  --modal-gradient: var(--gradient-green);
  border-top: 5px solid var(--color-green);
}

/* Close Button */
.modal-close {
  position: absolute;
  top: var(--spacing-sm);
  right: var(--spacing-sm);
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  font-size: 28px;
  color: var(--color-text-muted);
  cursor: pointer;
  border-radius: var(--radius-circle);
  transition: background var(--transition-fast), color var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.modal-close:hover {
  background: rgba(0, 0, 0, 0.08);
  color: var(--color-text-dark);
}

/* Modal Header */
.modal-header {
  padding: var(--spacing-lg) var(--spacing-lg) var(--spacing-sm);
  text-align: center;
}

.modal-title {
  font-size: 1.5em;
  color: var(--color-text-dark);
  margin: 0;
  font-weight: 600;
}

.modal-title span {
  color: var(--modal-accent);
}

/* Form Styles */
.order-form {
  padding: var(--spacing-sm) var(--spacing-lg) var(--spacing-lg);
}

.form-group {
  margin-bottom: var(--spacing-md);
}

.form-group label {
  display: block;
  font-weight: 500;
  color: var(--color-text-body);
  margin-bottom: 6px;
  font-size: 0.95em;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"] {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid #e8ecef;
  border-radius: var(--radius-medium);
  font-size: 1em;
  font-family: inherit;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  background: var(--color-white);
}

.form-group input:focus {
  outline: none;
  border-color: var(--modal-accent);
  box-shadow: 0 0 0 3px var(--modal-accent-light);
}

.form-group input.error {
  border-color: var(--color-error);
}

.form-group input.error:focus {
  box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.15);
}

.error-message {
  display: block;
  color: var(--color-error);
  font-size: 0.85em;
  margin-top: 4px;
  min-height: 1.2em;
}

/* Phone Input with Country Selector */
.phone-input-wrapper {
  display: flex;
  position: relative;
}

.country-selector {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 12px;
  background: #f8f9fa;
  border: 2px solid #e8ecef;
  border-right: none;
  border-radius: var(--radius-medium) 0 0 var(--radius-medium);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.95em;
  transition: background-color 0.2s, border-color 0.2s;
  white-space: nowrap;
}

.country-selector:hover {
  background: #eef1f4;
}

.country-selector:focus {
  outline: none;
  border-color: var(--modal-accent);
  background: #eef1f4;
}

.country-flag {
  font-size: 1.2em;
  line-height: 1;
}

.country-code {
  font-weight: 500;
  color: var(--color-text-body);
}

.dropdown-arrow {
  font-size: 0.6em;
  color: #6c757d;
  margin-left: 2px;
}

.phone-input-wrapper input[type="tel"] {
  flex: 1;
  border-radius: 0 var(--radius-medium) var(--radius-medium) 0 !important;
  border-left: none !important;
}

.phone-input-wrapper input[type="tel"]:focus {
  border-color: var(--modal-accent);
}

/* Country Dropdown */
.country-dropdown {
  position: fixed;
  width: 280px;
  max-height: 250px;
  overflow-y: auto;
  background: white;
  border: 2px solid #e8ecef;
  border-radius: var(--radius-medium);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  z-index: 10000;
}

.country-dropdown[hidden] {
  display: none;
}

.country-search {
  position: sticky;
  top: 0;
  padding: 10px 12px;
  background: white;
  border-bottom: 1px solid #e8ecef;
}

.country-search input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #e8ecef;
  border-radius: var(--radius-small);
  font-size: 0.9em;
  font-family: inherit;
}

.country-search input:focus {
  outline: none;
  border-color: var(--modal-accent);
}

.country-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  cursor: pointer;
  transition: background-color 0.15s;
}

.country-option:hover,
.country-option:focus {
  background: #f0f4f8;
  outline: none;
}

.country-option.selected {
  background: var(--modal-accent-light);
}

.country-option .flag {
  font-size: 1.3em;
  line-height: 1;
}

.country-option .name {
  flex: 1;
  font-size: 0.9em;
  color: var(--color-text-body);
}

.country-option .dial-code {
  font-size: 0.85em;
  color: #6c757d;
  font-weight: 500;
}

/* Quantity Selector */
.quantity-selector {
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
  max-width: 160px;
}

.qty-btn {
  width: 44px;
  height: 44px;
  border: 2px solid #e8ecef;
  background: var(--color-white);
  border-radius: var(--radius-medium);
  font-size: 1.4em;
  font-weight: 600;
  color: var(--color-text-body);
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
}

.qty-btn:hover {
  border-color: var(--modal-accent);
  background: var(--modal-accent-light);
  color: var(--modal-accent);
}

.qty-btn:active {
  transform: scale(0.95);
}

.quantity-selector input[type="number"] {
  width: 60px;
  text-align: center;
  padding: 12px 8px;
  border: 2px solid #e8ecef;
  border-radius: var(--radius-medium);
  font-size: 1.1em;
  font-weight: 600;
  font-family: inherit;
  -moz-appearance: textfield;
}

.quantity-selector input[type="number"]::-webkit-outer-spin-button,
.quantity-selector input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Submit Button */
.submit-btn {
  width: 100%;
  padding: 16px 24px;
  background: var(--modal-gradient);
  color: var(--color-white);
  border: none;
  border-radius: var(--radius-round);
  font-size: 1.1em;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  margin-top: var(--spacing-sm);
}

.submit-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.submit-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.btn-loading {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* Success/Error States */
.modal-success,
.modal-error {
  text-align: center;
  padding: var(--spacing-xl) var(--spacing-lg);
}

.success-icon {
  width: 70px;
  height: 70px;
  background: var(--gradient-green);
  color: white;
  border-radius: var(--radius-circle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  margin: 0 auto var(--spacing-md);
}

.error-icon {
  width: 70px;
  height: 70px;
  background: linear-gradient(135deg, var(--color-error), #c0392b);
  color: white;
  border-radius: var(--radius-circle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  font-weight: bold;
  margin: 0 auto var(--spacing-md);
}

.modal-success h3,
.modal-error h3 {
  font-size: 1.4em;
  margin-bottom: var(--spacing-xs);
  color: var(--color-text-dark);
}

.modal-success p,
.modal-error p {
  color: var(--color-text-muted);
  margin-bottom: var(--spacing-lg);
  font-size: 1em;
}

.close-success-btn,
.retry-btn {
  padding: 12px 32px;
  border: none;
  border-radius: var(--radius-round);
  font-size: 1em;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: transform var(--transition-fast);
}

.close-success-btn {
  background: var(--gradient-green);
  color: white;
}

.retry-btn {
  background: var(--gradient-primary);
  color: white;
}

.close-success-btn:hover,
.retry-btn:hover {
  transform: translateY(-2px);
}

/* Make book cards clickable */
.book-card[role="button"] {
  cursor: pointer;
}

/* Modal Responsive */
@media (max-width: 600px) {
  .order-modal-overlay {
    padding: 0;
    align-items: flex-end;
  }

  .order-modal {
    max-height: 92vh;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    max-width: 100%;
  }

  .modal-header {
    padding: var(--spacing-md) var(--spacing-md) var(--spacing-xs);
  }

  .order-form {
    padding: var(--spacing-xs) var(--spacing-md) var(--spacing-md);
  }

  .modal-title {
    font-size: 1.3em;
  }

  .form-group input[type="text"],
  .form-group input[type="email"],
  .form-group input[type="tel"] {
    padding: 12px 14px;
  }
}

/* Modal reduced motion */
@media (prefers-reduced-motion: reduce) {
  .order-modal-overlay,
  .order-modal {
    transition: none;
  }
}
