/* L2 Pearl — custom styles */

html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
}

body {
  background: #05060a;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: #05060a;
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(to bottom, #d6cfe0, #6b3f8e);
  border-radius: 0;
}
::-webkit-scrollbar-thumb:hover {
  background: #d6cfe0;
}

::selection {
  background: rgba(214, 207, 224, 0.4);
  color: #fff;
}

/* Subtle film grain noise */
.noise {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='0.5'/></svg>");
  background-size: 200px;
}

/* Ornamental divider */
.ornament-divider {
  width: 220px;
  height: 16px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ornament-divider::before,
.ornament-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, transparent, #d6cfe0, transparent);
}
.ornament-divider::before {
  background: linear-gradient(to right, transparent, #d6cfe0);
}
.ornament-divider::after {
  background: linear-gradient(to left, transparent, #d6cfe0);
}
.ornament-divider {
  position: relative;
}
.ornament-divider > * { display: none; }
.ornament-divider {
  background-image:
    linear-gradient(to right, transparent, #d6cfe0 40%, transparent 40%, transparent 60%, #d6cfe0 60%, transparent);
  background-size: 100% 1px;
  background-position: center;
  background-repeat: no-repeat;
}
.ornament-divider::after {
  content: "✦";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  color: #d6cfe0;
  font-size: 14px;
  background: #05060a;
  padding: 0 12px;
  flex: none;
  height: auto;
  width: auto;
  display: block;
}
.ornament-divider::before { display: none; }

/* Feature card */
.feature-card {
  position: relative;
  background: linear-gradient(180deg, rgba(19, 21, 30, 0.9), rgba(11, 13, 20, 0.9));
  border: 1px solid rgba(214, 207, 224, 0.18);
  padding: 2.25rem;
  transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden;
}
.feature-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(to right, transparent, #d6cfe0, transparent);
  opacity: 0.6;
}
.feature-card:hover {
  border-color: rgba(214, 207, 224, 0.55);
  transform: translateY(-4px);
  box-shadow: 0 20px 40px -20px rgba(214, 207, 224, 0.25);
}

.feature-icon {
  width: 100%;
  height: 132px;
  display: block;
  background: linear-gradient(135deg, rgba(214, 207, 224, 0.15), rgba(107, 63, 142, 0.12));
  border: 1px solid rgba(214, 207, 224, 0.32);
  margin-bottom: 1.35rem;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.05), 0 18px 38px -28px rgba(153,102,204,0.85);
}
.feature-icon::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(9,11,18,0.05), rgba(9,11,18,0.76));
  pointer-events: none;
  z-index: 1;
}
.feature-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1.03);
  filter: saturate(1.08) contrast(1.08) brightness(0.9);
  transition: transform 0.45s ease, filter 0.45s ease;
}
.feature-card:hover .feature-photo img {
  transform: scale(1.1);
  filter: saturate(1.18) contrast(1.12) brightness(1);
}

/* Rate card */
.rate-card {
  background: linear-gradient(180deg, rgba(19, 21, 30, 0.95), rgba(11, 13, 20, 0.95));
  border: 1px solid rgba(214, 207, 224, 0.2);
  padding: 2rem 1.75rem;
  text-align: center;
  position: relative;
  transition: border-color 0.3s ease, transform 0.3s ease;
}
.rate-card::before, .rate-card::after {
  content: "";
  position: absolute;
  width: 12px;
  height: 12px;
  border: 1px solid #d6cfe0;
  opacity: 0.6;
}
.rate-card::before {
  top: 6px; left: 6px;
  border-right: none;
  border-bottom: none;
}
.rate-card::after {
  bottom: 6px; right: 6px;
  border-left: none;
  border-top: none;
}
.rate-card:hover {
  border-color: rgba(214, 207, 224, 0.6);
  transform: translateY(-3px);
}

/* Timeline */
.timeline-item {
  position: relative;
  padding-left: 3rem;
}
@media (min-width: 768px) {
  .timeline-item {
    padding-left: 0;
    width: 50%;
  }
  .timeline-item:nth-child(odd) {
    margin-right: auto;
    padding-right: 3rem;
    text-align: right;
  }
  .timeline-item:nth-child(even) {
    margin-left: auto;
    padding-left: 3rem;
  }
}
.timeline-dot {
  position: absolute;
  left: 0;
  top: 1.5rem;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  box-shadow: 0 0 0 4px #05060a, 0 0 20px currentColor;
  transform: translateX(-7px);
}
@media (min-width: 768px) {
  .timeline-item:nth-child(odd) .timeline-dot {
    left: auto;
    right: -8px;
    transform: none;
  }
  .timeline-item:nth-child(even) .timeline-dot {
    left: -8px;
    transform: none;
  }
}
.timeline-card {
  background: linear-gradient(180deg, rgba(19, 21, 30, 0.95), rgba(11, 13, 20, 0.95));
  border: 1px solid rgba(214, 207, 224, 0.25);
  padding: 1.75rem;
  position: relative;
  transition: border-color 0.3s ease;
}
.timeline-card:hover {
  border-color: rgba(214, 207, 224, 0.55);
}

/* Community card */
.community-card {
  display: block;
  background: linear-gradient(180deg, rgba(19, 21, 30, 0.95), rgba(11, 13, 20, 0.95));
  border: 1px solid rgba(214, 207, 224, 0.2);
  padding: 2.25rem;
  transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
}
.community-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, rgba(214, 207, 224, 0.08), transparent 60%);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.community-card:hover {
  border-color: rgba(214, 207, 224, 0.6);
  transform: translateY(-4px);
}
.community-card:hover::before {
  opacity: 1;
}

/* News card */
.news-card {
  background: linear-gradient(180deg, rgba(19, 21, 30, 0.95), rgba(11, 13, 20, 0.95));
  border: 1px solid rgba(214, 207, 224, 0.2);
  overflow: hidden;
  transition: border-color 0.3s ease, transform 0.3s ease;
}
.news-card:hover {
  border-color: rgba(214, 207, 224, 0.55);
  transform: translateY(-3px);
}
.news-image {
  height: 160px;
  border-bottom: 1px solid rgba(214, 207, 224, 0.2);
  position: relative;
}
.news-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 60%, rgba(5, 6, 10, 0.8));
}

/* Iridescent pearl shimmer for hero title */
@keyframes pearl-shimmer {
  0%, 100% {
    background-position: 0% 50%;
    filter: drop-shadow(0 0 30px rgba(214, 207, 224, 0.25));
  }
  50% {
    background-position: 100% 50%;
    filter: drop-shadow(0 0 40px rgba(153, 102, 204, 0.35));
  }
}
section#home h1 span {
  background: linear-gradient(
    110deg,
    #f0eaf7 0%,
    #d6cfe0 25%,
    #c4a8e0 50%,
    #d6cfe0 75%,
    #f0eaf7 100%
  );
  background-size: 200% 200%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: pearl-shimmer 6s ease-in-out infinite;
}

/* Reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Hero / section background images */
.hero-bg {
  opacity: 0.55;
  filter: saturate(0.85) contrast(1.05);
  animation: heroZoom 30s ease-in-out infinite alternate;
}
@keyframes heroZoom {
  from { transform: scale(1.0); }
  to   { transform: scale(1.08); }
}
.schedule-bg {
  opacity: 0.35;
  filter: saturate(0.9) contrast(1.05);
}

/* News card with photo background */
.news-image-photo {
  height: 180px;
  background-size: cover;
  background-position: center;
  border-bottom: 1px solid rgba(214, 207, 224, 0.2);
  position: relative;
  transition: transform 0.6s ease;
}
.news-image-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(5,6,10,0.1) 0%, rgba(5,6,10,0.55) 60%, rgba(5,6,10,0.85) 100%);
}
.news-card:hover .news-image-photo {
  transform: scale(1.04);
}

/* Sound toggle (background music) */
.sound-toggle {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9000;                /* above everything except critical modals */
  width: 56px;
  height: 56px;
  padding: 0;
  background: rgba(11, 13, 20, 0.9);
  border: 1px solid rgba(214, 207, 224, 0.45);
  color: #d6cfe0;
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.25s ease, background 0.25s ease, transform 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}
.sound-toggle:hover {
  border-color: #d6cfe0;
  background: rgba(107, 63, 142, 0.55);
  color: #f0eaf7;
  transform: translateY(-2px);
}
.sound-toggle:active {
  transform: translateY(0);
}
.sound-toggle svg {
  width: 22px;
  height: 22px;
  pointer-events: none;          /* let clicks fall through to the button */
}
.sound-toggle .icon-on  { display: none; }
.sound-toggle .icon-off { display: none; }
.sound-toggle.muted .icon-off          { display: block; color: #9a9aa8; }
.sound-toggle:not(.muted) .icon-on     { display: block; color: #f0eaf7; }
.sound-toggle:not(.muted) {
  border-color: rgba(214, 207, 224, 0.8);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), 0 0 28px rgba(153, 102, 204, 0.5);
}
.sound-toggle .sound-pulse {
  position: absolute;
  inset: -4px;
  border: 1px solid rgba(214, 207, 224, 0.4);
  pointer-events: none;
  opacity: 0;
}
.sound-toggle:not(.muted) .sound-pulse {
  animation: soundPulse 2s ease-out infinite;
}
@keyframes soundPulse {
  0% { opacity: 0.5; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.4); }
}

@media (max-width: 640px) {
  .sound-toggle { bottom: 16px; right: 16px; width: 46px; height: 46px; }
  .sound-toggle svg { width: 18px; height: 18px; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  *:hover { transform: none !important; }
}


/* L2Pearl official hero logo */
.hero-logo-stage {
  position: relative;
  width: min(92vw, 980px);
  padding: clamp(16px, 3vw, 34px) clamp(14px, 3vw, 34px);
  border-radius: 34px;
  background:
    radial-gradient(circle at 50% 48%, rgba(105, 197, 255, 0.22), transparent 45%),
    linear-gradient(180deg, rgba(3, 8, 18, 0.46), rgba(3, 8, 18, 0.12));
  box-shadow:
    0 34px 120px rgba(73, 158, 255, 0.18),
    0 12px 52px rgba(0, 0, 0, 0.5),
    inset 0 0 0 1px rgba(180, 224, 255, 0.12);
  isolation: isolate;
}

.hero-logo-stage::before {
  content: "";
  position: absolute;
  inset: 12% 8%;
  background: radial-gradient(ellipse at center, rgba(95, 179, 255, 0.28), transparent 62%);
  filter: blur(28px);
  z-index: -1;
}

.hero-main-logo {
  display: block;
  width: 100%;
  height: auto;
  max-height: 430px;
  object-fit: contain;
  filter:
    drop-shadow(0 0 22px rgba(97, 187, 255, 0.42))
    drop-shadow(0 18px 30px rgba(0, 0, 0, 0.72));
}

@media (max-width: 640px) {
  .hero-logo-stage {
    width: min(96vw, 520px);
    border-radius: 24px;
    padding: 14px 8px;
  }

  .hero-main-logo {
    max-height: 230px;
  }
}

/* Softer L2Pearl logo presentation - removes heavy card frame */
.hero-logo-stage {
  width: min(90vw, 940px) !important;
  padding: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  overflow: visible !important;
}

.hero-logo-stage::before {
  inset: 20% 10% !important;
  background:
    radial-gradient(ellipse at center, rgba(89, 178, 255, 0.34), transparent 58%),
    radial-gradient(ellipse at center, rgba(143, 92, 255, 0.16), transparent 70%) !important;
  filter: blur(34px) !important;
}

.hero-main-logo {
  width: min(100%, 880px) !important;
  margin: 0 auto !important;
  border-radius: 0 !important;
  mix-blend-mode: screen;
  filter:
    drop-shadow(0 0 16px rgba(113, 199, 255, 0.5))
    drop-shadow(0 0 42px rgba(65, 132, 255, 0.26))
    drop-shadow(0 22px 34px rgba(0, 0, 0, 0.78)) !important;
}

@media (max-width: 640px) {
  .hero-logo-stage {
    width: min(96vw, 520px) !important;
  }

  .hero-main-logo {
    max-height: 230px !important;
  }
}


/* Final blended hero logo: no frame, dissolves into the background */
.hero-logo-stage {
  width: min(92vw, 980px) !important;
  padding: 0 !important;
  margin-top: -6px !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  overflow: visible !important;
}

.hero-logo-stage::before {
  content: "";
  position: absolute;
  inset: 16% 11% 8% 11% !important;
  background:
    radial-gradient(ellipse at center, rgba(74, 169, 255, 0.28), transparent 58%),
    radial-gradient(ellipse at center, rgba(165, 120, 255, 0.12), transparent 72%) !important;
  filter: blur(38px) !important;
  opacity: 0.78;
  z-index: -1;
}

.hero-main-logo {
  width: min(100%, 900px) !important;
  max-height: 470px !important;
  margin: 0 auto !important;
  object-fit: contain !important;
  opacity: 0.98;
  mix-blend-mode: normal !important;
  -webkit-mask-image: radial-gradient(ellipse at center, #000 54%, rgba(0,0,0,0.88) 67%, transparent 91%);
  mask-image: radial-gradient(ellipse at center, #000 54%, rgba(0,0,0,0.88) 67%, transparent 91%);
  filter:
    drop-shadow(0 0 18px rgba(112, 205, 255, 0.34))
    drop-shadow(0 0 54px rgba(46, 116, 255, 0.18))
    drop-shadow(0 18px 28px rgba(0, 0, 0, 0.55)) !important;
}

@media (max-width: 640px) {
  .hero-logo-stage {
    width: min(100vw, 560px) !important;
    margin-top: 0 !important;
  }

  .hero-main-logo {
    max-height: 260px !important;
  }
}


/* Premium top-right action buttons */
.nav-cta-group {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px;
  border: 1px solid rgba(214, 207, 224, 0.12);
  background: linear-gradient(180deg, rgba(255,255,255,0.045), rgba(255,255,255,0.015));
  border-radius: 999px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 16px 38px rgba(0,0,0,0.28);
}

.nav-cta {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 18px;
  border-radius: 999px;
  font-family: var(--font-display, inherit);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: transform 180ms ease, border-color 180ms ease, color 180ms ease, background 180ms ease, box-shadow 180ms ease;
  white-space: nowrap;
}

.nav-cta:hover { transform: translateY(-1px); }

.nav-cta-login {
  color: rgba(214, 207, 224, 0.76);
  border: 1px solid transparent;
  background: transparent;
}

.nav-cta-login:hover,
.nav-cta-login.is-active {
  color: #f7f2ff;
  background: rgba(255,255,255,0.055);
  border-color: rgba(214,207,224,0.14);
}

.nav-cta-register {
  color: #e9dcff;
  border: 1px solid rgba(214, 207, 224, 0.34);
  background: linear-gradient(180deg, rgba(255,255,255,0.085), rgba(255,255,255,0.025));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.12);
}

.nav-cta-register:hover,
.nav-cta-register.is-active {
  color: #ffffff;
  border-color: rgba(205, 172, 255, 0.64);
  background: linear-gradient(180deg, rgba(142, 91, 214, 0.28), rgba(142, 91, 214, 0.12));
}

.nav-cta-play {
  color: #ffffff;
  border: 1px solid rgba(206, 151, 255, 0.72);
  background:
    radial-gradient(circle at 28% 18%, rgba(255,255,255,0.22), transparent 24%),
    linear-gradient(135deg, #b87aff 0%, #7d3fc2 46%, #52277e 100%);
  box-shadow: 0 0 28px rgba(157, 92, 255, 0.34), inset 0 1px 0 rgba(255,255,255,0.24);
}

.nav-cta-play:hover {
  border-color: rgba(233, 210, 255, 0.9);
  box-shadow: 0 0 36px rgba(174, 112, 255, 0.48), inset 0 1px 0 rgba(255,255,255,0.28);
}

@media (max-width: 900px) {
  .nav-cta-group { gap: 6px; padding: 4px; }
  .nav-cta { min-height: 34px; padding: 0 12px; font-size: 11px; letter-spacing: 0.1em; }
  .nav-cta-login { display: none; }
}

@media (max-width: 560px) {
  .nav-cta-register { display: none; }
}


/* News modal */
.news-modal { position: fixed; inset: 0; z-index: 9999; display: grid; place-items: center; padding: 28px; opacity: 0; pointer-events: none; transition: opacity 180ms ease; }
.news-modal.is-open { opacity: 1; pointer-events: auto; }
.news-modal-backdrop { position: absolute; inset: 0; background: rgba(2, 4, 10, 0.82); backdrop-filter: blur(12px); }
.news-modal-panel { position: relative; width: min(920px, 94vw); max-height: min(82vh, 820px); overflow: auto; padding: clamp(28px, 4vw, 52px); border: 1px solid rgba(214, 207, 224, 0.2); border-radius: 28px; background: radial-gradient(circle at 70% 0%, rgba(142, 91, 214, 0.22), transparent 32%), radial-gradient(circle at 12% 12%, rgba(87, 176, 255, 0.16), transparent 36%), linear-gradient(180deg, rgba(18, 15, 28, 0.98), rgba(5, 7, 14, 0.98)); box-shadow: 0 34px 120px rgba(0,0,0,0.62), inset 0 1px 0 rgba(255,255,255,0.08); }
.news-modal-close { position: absolute; top: 18px; right: 20px; width: 40px; height: 40px; border-radius: 999px; border: 1px solid rgba(214, 207, 224, 0.24); color: #f7f2ff; background: rgba(255,255,255,0.06); font-size: 28px; line-height: 1; }
.news-modal-body p { margin-bottom: 1rem; }
.news-modal-body strong { color: #fff; }
.news-modal-body h3 { margin: 1.35rem 0 0.65rem; color: #e9dcff; font-family: var(--font-display, inherit); font-size: 1.1rem; letter-spacing: 0.12em; text-transform: uppercase; }
.news-modal-body ul { display: grid; gap: 0.55rem; margin: 0 0 1rem 0; padding: 0; list-style: none; }
.news-modal-body li { padding: 0.7rem 0.85rem; border: 1px solid rgba(214,207,224,0.12); background: rgba(255,255,255,0.035); border-radius: 14px; }
.reward-list { display: grid; gap: 12px; margin: 1.25rem 0; }
.reward-list div { display: flex; justify-content: space-between; gap: 18px; padding: 15px 18px; border: 1px solid rgba(184, 122, 255, 0.24); border-radius: 16px; background: linear-gradient(180deg, rgba(142,91,214,0.14), rgba(255,255,255,0.035)); }
.reward-list span { color: rgba(214,207,224,0.86); }
.reward-list strong { color: #ffffff; white-space: nowrap; }
.news-modal-open { overflow: hidden; }
