/* RPHM Anime Verse - Custom Styles */

:root {
  --background: #080808;
  --surface: #101010;
  --border: #1a1a1a;
  --text-primary: #eaeaea;
  --text-secondary: #9ca3af;
  --accent: #e50914;
  --accent-hover: #ff1f2a;
  --accent-gold: #f5c542;
  /* Animation timing */
  --transition-fast: 0.2s ease;
  --transition-medium: 0.3s ease;
  --transition-slow: 0.5s ease;
}

/* Smooth transitions for auth elements */
.auth-element {
  transition: all var(--transition-medium);
}

.auth-modal {
  transition: all var(--transition-medium) cubic-bezier(0.4, 0, 0.2, 1);
}

.auth-modal-enter {
  opacity: 0;
  transform: scale(0.95) translateY(20px);
}

.auth-modal-enter-active {
  opacity: 1;
  transform: scale(1) translateY(0);
}

.auth-modal-exit {
  opacity: 1;
  transform: scale(1) translateY(0);
}

.auth-modal-exit-active {
  opacity: 0;
  transform: scale(0.95) translateY(20px);
}

/* Button hover effects with premium feel */
.btn-auth {
  position: relative;
  overflow: hidden;
  transition: all var(--transition-fast);
}

.btn-auth::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-medium);
}

.btn-auth:hover::before {
  left: 100%;
}

.btn-auth:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(229, 9, 20, 0.3);
}

/* Form field animations */
.form-field {
  transition: all var(--transition-fast);
}

.form-field:focus-within {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(229, 9, 20, 0.2);
}

/* Loading animations */
@keyframes pulse-glow {
  0% {
    box-shadow: 0 0 0 0 rgba(229, 9, 20, 0.4);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(229, 9, 20, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(229, 9, 20, 0);
  }
}

.pulse-glow {
  animation: pulse-glow 2s infinite;
}

/* Fade in animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fadeInUp var(--transition-medium) forwards;
}

/* Staggered animations */
.animate-stagger > * {
  opacity: 0;
  transform: translateY(15px);
}

.animate-stagger > *:nth-child(1) { animation: fadeInUp var(--transition-medium) 0.1s forwards; }
.animate-stagger > *:nth-child(2) { animation: fadeInUp var(--transition-medium) 0.2s forwards; }
.animate-stagger > *:nth-child(3) { animation: fadeInUp var(--transition-medium) 0.3s forwards; }
.animate-stagger > *:nth-child(4) { animation: fadeInUp var(--transition-medium) 0.4s forwards; }

/* Override Tailwind-inspired utility colors to match the premium theme */
.bg-background { background-color: var(--background); }
.bg-surface { background-color: var(--surface); }
.border-border { border-color: var(--border); }
.text-text-primary { color: var(--text-primary); }
.text-text-secondary { color: var(--text-secondary); }
.bg-accent { background-color: var(--accent); }
.bg-accent-hover { background-color: var(--accent-hover); }
.text-accent { color: var(--accent); }
.bg-accent\/10 { background-color: rgba(229, 9, 20, 0.12); }
.border-accent\/20 { border-color: rgba(229, 9, 20, 0.25); }

/* Gold highlight utility */
.text-gold { color: var(--accent-gold); }
.bg-gold { background-color: var(--accent-gold); }
.bg-gold-soft { background-color: rgba(245, 197, 66, 0.14); }
.border-gold { border-color: rgba(245, 197, 66, 0.8); }

/* Cinematic drop shadow for character art */
.drop-shadow-cinematic {
  filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.9));
}

/* Section divider */
.section-divider {
  height: 1px;
  width: 100%;
  margin: 3rem auto;
  max-width: 72rem;
  background: radial-gradient(circle at 0% 50%, rgba(245, 197, 66, 0.0), rgba(245, 197, 66, 0.45), rgba(229, 9, 20, 0.0)),
              linear-gradient(90deg, transparent, rgba(229, 9, 20, 0.8), rgba(245, 197, 66, 0.7), transparent);
}

/* Premium buttons */
.btn-primary {
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}
.btn-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 0% 0%, rgba(245, 197, 66, 0.3), transparent 55%);
  opacity: 0;
  transition: opacity 0.25s ease;
}
.btn-primary:hover {
  transform: translateY(-1px) scale(1.02);
  box-shadow: 0 0 30px rgba(229, 9, 20, 0.45);
}
.btn-primary:hover::after {
  opacity: 1;
}

.btn-ghost {
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}
.btn-ghost:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 24px rgba(245, 197, 66, 0.3);
}

/* "Read Now" pill inside cards */
.read-now-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.7rem;
  font-weight: 500;
  background-color: rgba(229, 9, 20, 0.08);
  border: 1px solid rgba(229, 9, 20, 0.45);
  color: var(--accent);
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.read-now-pill::after {
  content: '↗';
  font-size: 0.7rem;
}
.card-hover:hover .read-now-pill {
  background-color: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
  transform: translateY(-1px);
}

* {
  box-sizing: border-box;
  padding: 0;
  margin: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--background);
  color: var(--text-primary);
  min-height: 100vh;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--surface);
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-secondary);
}

/* Selection */
::selection {
  background-color: var(--accent);
  color: var(--text-primary);
}

/* Focus styles */
*:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Reading mode styles */
.prose-reading {
  font-family: 'Merriweather', Georgia, serif;
  line-height: 1.8;
  max-width: 680px;
  margin: 0 auto;
}

.prose-reading p {
  margin-bottom: 1.5em;
}

/* Font size utilities for story reader */
.text-size-sm { font-size: 16px; }
.text-size-md { font-size: 18px; }
.text-size-lg { font-size: 20px; }
.text-size-xl { font-size: 22px; }

/* Manga reader */
.manga-reader {
  background-color: #000;
  min-height: 100vh;
}

/* Animation utilities */
.fade-in {
  animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(12px);
    filter: blur(1px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

/* Hero text entrance */
.hero-animate {
  opacity: 0;
  transform: translateY(18px);
  animation: heroFadeIn 0.8s ease-out forwards;
}

@keyframes heroFadeIn {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Scroll reveal */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

.animate-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Card hover effect */
.card-hover {
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.card-hover:hover {
  border-color: rgba(139, 92, 246, 0.5);
}

/* Image placeholder */
.img-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--surface);
}

/* Mobile menu */
.mobile-menu {
  display: none;
}

.mobile-menu.active {
  display: block;
}

/* Line clamp */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Avatar fade animations */
.avatar-fade {
  transition: opacity var(--transition-medium), transform var(--transition-medium);
  opacity: 1;
}

.avatar-fade:hover {
  transform: scale(1.05);
  opacity: 0.9;
}

.avatar-updating {
  opacity: 0.5;
  transform: scale(0.95);
  transition: all var(--transition-medium);
}

.avatar-updated {
  animation: avatarPulse 0.6s ease-in-out;
}

@keyframes avatarPulse {
  0% { transform: scale(0.95); opacity: 0.5; }
  50% { transform: scale(1.05); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

/* Disclaimer fade-in animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in {
  animation: fadeIn 0.5s ease-out forwards;
}

.avatar-updating {
  opacity: 0.5;
  transform: scale(0.95);
  transition: all var(--transition-medium);
}

.avatar-updated {
  animation: avatarPulse 0.6s ease-in-out;
}

@keyframes avatarPulse {
  0% { transform: scale(0.95); opacity: 0.5; }
  50% { transform: scale(1.05); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}
