@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700;900&family=DM+Sans:wght@300;400;500;600;700&display=swap');

:root {
  --yellow: #ffd700;
  --yellow-deep: #ffb700;
  --yellow-soft: rgba(255,215,0,0.12);
  --pink: #ff6b9d;
  --pink-deep: #ff4081;
  --pink-soft: rgba(255,107,157,0.12);
  --pink-glow: rgba(255,107,157,0.3);
  --cyan: #64f0d3;
  --cyan-soft: rgba(100,240,211,0.12);
  --cyan-glow: rgba(100,240,211,0.3);
  --bg: #0a0812;
  --surface: rgba(18,14,28,0.85);
  --surface2: rgba(26,20,38,0.9);
  --border: rgba(255,255,255,0.06);
  --text: #ffffff;
  --text-soft: rgba(255,255,255,0.7);
  --muted: rgba(255,255,255,0.45);
  --font-display: 'Playfair Display', serif;
  --font-body: 'DM Sans', sans-serif;
  --radius-md: 16px;
  --radius-xl: 32px;
}

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

html { scroll-behavior: smooth; }

body {
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
}

/* ===== BACKGROUND VIDEO — Heavily Muted ===== */
.bg-video {
  position: fixed;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  transform: translate(-50%, -50%);
  z-index: -4;
  object-fit: cover;
  animation: slowZoom 40s ease-in-out infinite alternate;
  /* Reduce the video's visual impact but keep it visible */
  filter: brightness(0.3) saturate(0.5);
  opacity: 0.75;
}

@keyframes slowZoom {
  0% { transform: translate(-50%, -50%) scale(1); }
  100% { transform: translate(-50%, -50%) scale(1.1); }
}

/* ===== DARK OVERLAY — Tones down the overpowering gradient ===== */
.bg-overlay {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: 
    radial-gradient(ellipse at 30% 20%, rgba(255, 217, 0, 0.097) 0%, transparent 50%),
    radial-gradient(ellipse at 70% 80%, rgba(173, 9, 64, 0.148) 0%, transparent 50%),
    linear-gradient(180deg, 
      rgba(10,8,18,0.85) 0%, 
      rgba(10,8,18,0.75) 30%,
      rgba(10,8,18,0.8) 60%,
      rgba(10,8,18,0.95) 100%
    );
  pointer-events: none;
}

/* ===== PARTICLE CANVAS ===== */
#particles {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

/* ===== CENTER SUNFLOWER — Prominent with Glow ===== */
.center-sunflower {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 0;
  pointer-events: none;
  opacity: 0.5;
  filter: blur(3px);
}

.center-sunflower img {
  width: 700px;
  height: 700px;
  object-fit: contain;
  animation: sunflowerFloat 8s ease-in-out infinite, sunflowerGlow 4s ease-in-out infinite;
}

@keyframes sunflowerGlow {
  0%, 100% { filter: drop-shadow(0 0 40px rgba(255,215,0,0.3)); }
  50% { filter: drop-shadow(0 0 80px rgba(255,215,0,0.6)); }
}

@keyframes sunflowerFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-15px) rotate(2deg); }
}

/* ===== FALLING PETALS — Using sunflower_petal.png ===== */
.petals-container {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

.petal {
  position: absolute;
  top: -40px;
  width: 50px;
  height: auto;
  animation: petalFall linear forwards;
  pointer-events: none;
}

.petal img {
  width: 100%;
  height: auto;
  display: block;
  filter: brightness(1.2) drop-shadow(0 0 6px rgba(255,215,0,0.3));
}

@keyframes petalFall {
  0% {
    transform: translateY(0) rotate(0deg) translateX(0);
    opacity: 0;
  }
  8% { opacity: 0.35; }
  90% { opacity: 0.15; }
  100% {
    transform: translateY(105vh) rotate(360deg) translateX(80px);
    opacity: 0;
  }
}

/* ===== MAIN HUB CONTAINER ===== */
.hub {
  min-height: 100vh;
  width: min(1200px, 90vw);
  margin: 0 auto;
  position: relative;
  padding: 0 0 80px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* ===== LOGO PILL ===== */
.hub-logo {
  display: inline-flex;
  align-items: center;
  gap: 0px;
  margin-bottom: 48px;
  position: relative;
  background: var(--surface);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 60px;
  padding: 14px 36px 14px 30px;
  box-shadow: 
    0 0 40px rgba(255,215,0,0.08),
    0 0 80px rgba(255,107,157,0.05),
    0 20px 60px rgba(0,0,0,0.5);
  animation: fadeInDown 0.8s ease backwards, pillGlow 5s ease-in-out infinite 1s, logoFloat 6s ease-in-out infinite;
}

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

@keyframes pillGlow {
  0%, 100% { 
    box-shadow: 0 0 40px rgba(255,215,0,0.08), 0 0 80px rgba(255,107,157,0.05), 0 20px 60px rgba(0,0,0,0.5);
  }
  50% { 
    box-shadow: 0 0 60px rgba(255,215,0,0.15), 0 0 100px rgba(255,107,157,0.1), 0 25px 70px rgba(0,0,0,0.6);
  }
}

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

.logo-e {
  font-family: var(--font-display);
  font-size: 42px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--yellow) 0%, var(--yellow-deep) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 15px rgba(255,215,0,0.4));
  line-height: 1;
}

.logo-sunflower {
  width: 32px;
  height: 32px;
  object-fit: contain;
  animation: sunflowerSpin 15s linear infinite;
  filter: drop-shadow(0 0 12px rgba(255,215,0,0.5));
  margin: 0 -7px;
}

@keyframes sunflowerSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.logo-flixer {
  font-family: var(--font-display);
  font-size: 42px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--pink) 0%, var(--pink-deep) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 15px rgba(255,107,157,0.4));
  line-height: 1;
}

/* ===== HERO SECTION ===== */
.hub__hero {
  text-align: center;
  margin-bottom: 64px;
  animation: fadeInUp 1s ease 0.2s backwards;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: translateY(0); }
}

.hub__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--yellow);
  letter-spacing: 0.3em;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 8px 20px;
  background: var(--yellow-soft);
  border: 1px solid rgba(255,215,0,0.2);
  border-radius: 50px;
  margin-bottom: 28px;
}

.hub__eyebrow svg {
  animation: iconPulse 2s ease-in-out infinite;
}

@keyframes iconPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}

.hub__title {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 24px;
}

.title-line {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 7vw, 5.5rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--text);
}

.title-gradient {
  background: linear-gradient(135deg, var(--yellow) 0%, var(--pink) 50%, var(--cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  background-size: 200% 200%;
  animation: gradientShift 6s ease-in-out infinite;
  filter: drop-shadow(0 0 30px rgba(255,107,157,0.2));
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.hub__subtitle {
  color: var(--text-soft);
  max-width: 580px;
  margin: 0 auto;
  line-height: 1.7;
  font-size: clamp(15px, 2vw, 18px);
  font-weight: 400;
}

/* ===== DECORATIVE DIVIDER ===== */
.hub__divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 40px;
}

.divider-line {
  width: 80px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
}

.divider-icon {
  width: 18px;
  height: 18px;
  opacity: 0.3;
  animation: sunflowerSpin 20s linear infinite;
}

/* ===== CARDS ===== */
.hub__cards {
  display: flex;
  justify-content: center;
  gap: 48px;
  flex-wrap: wrap;
  padding: 0 20px;
  width: 100%;
}

.hub-card {
  position: relative;
  width: 380px;
  min-height: 420px;
  border-radius: var(--radius-xl);
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  display: flex;
  animation: scaleIn 0.7s ease backwards;
}

.hub-card:nth-child(1) { animation-delay: 0.3s; }
.hub-card:nth-child(2) { animation-delay: 0.45s; }

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.9) translateY(30px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

/* Card Background */
.hub-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--surface2);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  z-index: 0;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.hub-card:hover::before {
  border-color: rgba(255,255,255,0.12);
  background: var(--surface);
}

/* Card Glow Effect */
.card-glow {
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: 0;
  transition: opacity 0.5s ease;
  border-radius: var(--radius-xl);
}

.hub-card--movies .card-glow {
  background: radial-gradient(circle at 50% 0%, rgba(255,107,157,0.12) 0%, transparent 60%);
}

.hub-card--anime .card-glow {
  background: radial-gradient(circle at 50% 0%, rgba(100,240,211,0.12) 0%, transparent 60%);
}

.hub-card:hover .card-glow {
  opacity: 1;
}

/* Card Content */
.card-content {
  position: relative;
  z-index: 2;
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.hub-card__icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  transition: all 0.4s ease;
}

.hub-card--movies .hub-card__icon {
  background: var(--pink-soft);
  border: 1px solid rgba(255,107,157,0.2);
}

.hub-card--anime .hub-card__icon {
  background: var(--cyan-soft);
  border: 1px solid rgba(100,240,211,0.2);
}

.hub-card__icon svg {
  width: 28px;
  height: 28px;
  transition: all 0.4s ease;
}

.hub-card--movies .hub-card__icon svg { fill: var(--pink); }
.hub-card--anime .hub-card__icon svg { fill: var(--cyan); }

.hub-card:hover .hub-card__icon svg {
  transform: scale(1.15);
}

.hub-card--movies:hover .hub-card__icon svg {
  filter: drop-shadow(0 0 12px var(--pink-glow));
}

.hub-card--anime:hover .hub-card__icon svg {
  filter: drop-shadow(0 0 12px var(--cyan-glow));
}

/* Badge */
.hub-card__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  font-size: 10px;
  letter-spacing: 0.2em;
  color: #fff;
  border-radius: 50px;
  font-weight: 700;
  padding: 6px 14px;
  margin-bottom: 18px;
  transition: all 0.4s ease;
}

.hub-card--movies .hub-card__badge {
  background: linear-gradient(135deg, var(--pink) 0%, var(--pink-deep) 100%);
  box-shadow: 0 4px 20px var(--pink-glow);
}

.hub-card--anime .hub-card__badge {
  background: linear-gradient(135deg, var(--cyan) 0%, #00d4aa 100%);
  box-shadow: 0 4px 20px var(--cyan-glow);
}

.hub-card__badge svg {
  width: 8px;
  height: 8px;
  animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* Card Title */
.hub-card h2 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.2rem);
  font-weight: 900;
  margin-bottom: 14px;
  transition: all 0.4s ease;
}

.hub-card--movies:hover h2 { color: var(--pink); }
.hub-card--anime:hover h2 { color: var(--cyan); }

/* Card Description */
.hub-card p {
  color: var(--muted);
  line-height: 1.7;
  font-size: 15px;
  margin-bottom: auto;
  transition: color 0.4s ease;
}

.hub-card:hover p { color: var(--text-soft); }

/* Card CTA */
.hub-card__cta {
  margin-top: 28px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.02em;
  transition: all 0.4s ease;
}

.hub-card--movies .hub-card__cta { color: var(--pink); }
.hub-card--anime .hub-card__cta { color: var(--cyan); }

.hub-card__cta svg {
  transition: transform 0.4s ease;
}

.hub-card:hover .hub-card__cta svg {
  transform: translateX(6px);
}

.hub-card__cta::after {
  content: '';
  position: absolute;
  bottom: 32px;
  left: 32px;
  width: 0;
  height: 2px;
  transition: width 0.4s ease;
}

.hub-card--movies .hub-card__cta::after { background: var(--pink); }
.hub-card--anime .hub-card__cta::after { background: var(--cyan); }

.hub-card:hover .hub-card__cta::after {
  width: calc(100% - 64px);
}

/* Card Hover Transform */
.hub-card:hover {
  transform: translateY(-10px);
}

.hub-card--movies:hover {
  box-shadow: 0 30px 80px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,107,157,0.2);
}

.hub-card--anime:hover {
  box-shadow: 0 30px 80px rgba(0,0,0,0.5), 0 0 0 1px rgba(100,240,211,0.2);
}

/* ===== FOOTER ===== */
.hub__footer {
  margin-top: 80px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  animation: fadeIn 1s ease 0.8s backwards;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ===== SELECTION ===== */
::selection {
  background: var(--pink);
  color: white;
}

/* ===== CUSTOM SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.1);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover { background: var(--pink); }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .hub {
    padding-top: 40px;
    justify-content: flex-start;
  }

  .hub-logo {
    margin-bottom: 32px;
  }

  .logo-e, .logo-flixer {
    font-size: 32px;
  }

  .logo-sunflower {
    width: 24px;
    height: 24px;
  }

  .hub__hero {
    margin-bottom: 48px;
  }

  .hub__cards {
    flex-direction: column;
    align-items: center;
    gap: 32px;
  }

  .hub-card {
    width: 90%;
    max-width: 400px;
    min-height: 380px;
  }

  .center-sunflower img {
    width: 400px;
    height: 400px;
  }

  .divider-line {
    width: 50px;
  }
}

@media (max-width: 500px) {
  .hub-logo {
    padding: 10px 24px 10px 20px;
  }

  .logo-e, .logo-flixer {
    font-size: 26px;
  }

  .logo-sunflower {
    width: 20px;
    height: 20px;
  }

  .hub__eyebrow {
    font-size: 9px;
    padding: 6px 14px;
  }

  .hub-card {
    min-height: 340px;
  }

  .card-content {
    padding: 28px 24px;
  }

  .center-sunflower img {
    width: 250px;
    height: 250px;
  }
}
