:root {
  --morea-bg: #020202;
  --morea-primary: #B22222;
  --morea-primary-soft: rgba(178, 34, 34, 0.7);
  --morea-text: #E8E4D5;
  --morea-border-soft: rgba(232, 228, 213, 0.13);
}

#morea-preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at top, #181818 0%, #050505 45%, #000 100%);
  overflow: hidden;
}

#morea-preloader.morea-hide {
  animation: morea-fade-out 0.45s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

#morea-preloader::before {
  content: "";
  position: absolute;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.12) 0%, transparent 55%);
  opacity: 0.26;
  mix-blend-mode: screen;
  filter: blur(3px);
  animation: morea-orbit-light 8s ease-in-out infinite alternate;
}

#morea-preloader::after {
  content: "";
  position: absolute;
  inset: -20%;
  background: repeating-linear-gradient(
    120deg,
    rgba(255, 255, 255, 0.03),
    rgba(255, 255, 255, 0.03) 1px,
    transparent 1px,
    transparent 18px
  );
  mix-blend-mode: soft-light;
  opacity: 0.16;
  animation: morea-streaks 14s linear infinite;
}

.morea-starfield {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  opacity: 0.65;
  z-index: 0;
}

.morea-starfield span {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: rgba(232, 228, 213, 0.32);
  filter: blur(0.4px);
  animation: morea-star-twinkle linear infinite;
  animation-timing-function: ease-in-out;
  will-change: transform, opacity;
}

.morea-starfield span::after {
  content: "";
  position: absolute;
  inset: -80% -200% 40% -200%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  opacity: 0.45;
  transform: rotate(18deg);
}

.morea-loader-scene {
  position: relative;
  width: 280px;
  height: 340px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 1.5rem;
  z-index: 1;
}

.morea-loader-ring {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 260px;
  height: 260px;
  border-radius: 999px;
  border: 1px solid rgba(232, 228, 213, 0.16);
  box-shadow:
    0 0 24px rgba(0, 0, 0, 1),
    0 0 28px rgba(178, 34, 34, 0.5);
  opacity: 0.75;
  pointer-events: none;
}

.morea-loader-ring::before {
  content: "";
  position: absolute;
  inset: 18%;
  border-radius: inherit;
  border-top: 3px solid var(--morea-primary);
  border-right: 3px solid rgba(178, 34, 34, 0.8);
  border-bottom: 3px solid transparent;
  border-left: 3px solid transparent;
  filter: drop-shadow(0 0 16px rgba(178, 34, 34, 0.9));
  animation: morea-ring-spin 3s linear infinite;
  will-change: transform;
}

.morea-orbit-ember {
  position: absolute;
  top: 32px;
  left: 50%;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--morea-primary);
  box-shadow:
    0 0 18px rgba(178, 34, 34, 1),
    0 0 32px rgba(178, 34, 34, 0.9);
  transform-origin: -86px 0;
  animation: morea-ember-orbit 3s linear infinite;
  will-change: transform;
}

.morea-bottle-wrap {
  position: relative;
  width: 110px;
  height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 70px;
}

.morea-bottle {
  position: relative;
  width: 70px;
  height: 210px;
  border-radius: 26px 26px 18px 18px;
  border: 1px solid rgba(232, 228, 213, 0.4);
  background:
    radial-gradient(circle at 20% 0%, rgba(255, 255, 255, 0.18), transparent 55%),
    radial-gradient(circle at 80% 10%, rgba(255, 255, 255, 0.1), transparent 55%);
  box-shadow:
    inset 0 0 18px rgba(0, 0, 0, 0.9),
    0 10px 26px rgba(0, 0, 0, 0.85);
  overflow: hidden;
  backdrop-filter: blur(10px);
}

.morea-bottle-neck {
  position: absolute;
  width: 26px;
  height: 55px;
  top: -45px;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 10px 10px 6px 6px;
  border: 1px solid rgba(232, 228, 213, 0.45);
  background: radial-gradient(circle at 20% 0%, rgba(255, 255, 255, 0.2), transparent 55%);
  box-shadow:
    inset 0 0 10px rgba(0, 0, 0, 0.9),
    0 0 16px rgba(0, 0, 0, 0.9);
}

.morea-bottle-neck::before {
  content: "";
  position: absolute;
  inset: auto 0 -18px 0;
  height: 18px;
  border-radius: 0 0 999px 999px;
  border: 1px solid rgba(232, 228, 213, 0.4);
  background: radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.3), transparent 60%);
}

.morea-bottle-cap {
  position: absolute;
  top: -64px;
  left: 50%;
  transform: translateX(-50%);
  width: 36px;
  height: 16px;
  border-radius: 8px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.25), rgba(120, 120, 120, 0.8), rgba(255, 255, 255, 0.25));
  border: 1px solid rgba(232, 228, 213, 0.35);
  box-shadow:
    inset 0 0 6px rgba(0, 0, 0, 0.7),
    0 0 12px rgba(0, 0, 0, 0.8);
}

.morea-bottle-wine {
  position: absolute;
  inset: auto 4px 0 4px;
  border-radius: 18px 18px 10px 10px;
  height: 0%;
  background: linear-gradient(
    180deg,
    rgba(230, 120, 120, 0.22),
    rgba(200, 60, 60, 0.96),
    rgba(120, 18, 18, 1)
  );
  box-shadow:
    0 -8px 18px rgba(178, 34, 34, 0.95),
    0 0 28px rgba(178, 34, 34, 0.8);
  animation: morea-wine-fill 2.8s cubic-bezier(0.45, 0, 0.2, 1) infinite;
  will-change: height;
}

.morea-bottle-wine::before {
  content: "";
  position: absolute;
  top: -4px;
  left: 0;
  right: 0;
  height: 6px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0));
  opacity: 0.7;
  filter: blur(0.5px);
}

.morea-bottle::before {
  content: "";
  position: absolute;
  top: 20px;
  left: 10px;
  width: 10px;
  height: 110px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.38), rgba(255, 255, 255, 0.02));
  opacity: 0.5;
  filter: blur(0.5px);
}

.morea-bottle::after {
  content: "";
  position: absolute;
  top: 50px;
  right: 10px;
  width: 5px;
  height: 60px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.02));
  opacity: 0.4;
}

.morea-bottle::marker {
  content: "";
}

.morea-bottle-shine {
  position: absolute;
  inset: -10% -20% auto -20%;
  height: 60%;
  background: linear-gradient(120deg, rgba(255,255,255,.2), rgba(255,255,255,0) 45%);
  opacity: .35;
  pointer-events: none;
}

.morea-caption {
  margin-top: 0.15rem;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(232, 228, 213, 0.68);
  text-align: center;
  position: relative;
  overflow: hidden;
  animation: captionPulse 4.8s ease-in-out infinite;
}

.morea-caption::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transform: translateX(-130%);
  animation: captionShine 3.6s ease-in-out infinite;
  will-change: transform, opacity;
}

.morea-caption.caption-flash {
  animation: captionPulse 4.8s ease-in-out infinite, captionFlash 0.8s ease;
}

@keyframes morea-wine-fill {
  0% {
    height: 10%;
  }
  30% {
    height: 88%;
  }
  60% {
    height: 88%;
  }
  100% {
    height: 12%;
  }
}

@keyframes morea-ring-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes morea-ember-orbit {
  0% {
    transform: rotate(0deg) translateX(104px);
  }
  100% {
    transform: rotate(360deg) translateX(104px);
  }
}

@keyframes morea-orbit-light {
  0% {
    transform: translate(-12%, -14%);
  }
  100% {
    transform: translate(14%, 12%);
  }
}

@keyframes morea-streaks {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-18%);
  }
}

@keyframes morea-fade-out {
  to {
    opacity: 0;
    visibility: hidden;
  }
}

@keyframes morea-star-twinkle {
  0% {
    opacity: 0;
    transform: translate3d(0, 0, 0) scale(0.6);
  }
  45% {
    opacity: 0.8;
  }
  100% {
    opacity: 0;
    transform: translate3d(24px, -32px, 0) scale(0.98);
  }
}

@keyframes captionPulse {
  0%,
  100% {
    color: rgba(232, 228, 213, 0.52);
  }
  50% {
    color: rgba(232, 228, 213, 0.9);
  }
}

@keyframes captionFlash {
  0% {
    text-shadow: 0 0 6px rgba(178, 34, 34, 0.3);
  }
  50% {
    text-shadow: 0 0 16px rgba(178, 34, 34, 0.8);
  }
  100% {
    text-shadow: 0 0 6px rgba(178, 34, 34, 0.3);
  }
}

@keyframes captionShine {
  0% {
    transform: translateX(-140%);
  }
  60% {
    transform: translateX(140%);
  }
  100% {
    transform: translateX(140%);
  }
}
