/* ============================================================
   Street City RP — Enhancements CSS  v3
   Preloader · Logo text · Scroll-reveal · News grid
   Ripple · Hover glow · Beta overlay (v3) · Page entry
   Hide: Hata Online link, Розіграш nav item
   ============================================================ */

/* ----------------------------------------------------------
   0. PRELOADER
   ---------------------------------------------------------- */
#enh-preloader {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: #08080f;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 28px;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}
#enh-preloader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.enh-preloader__logo {
  font-family: 'Gotham Pro', 'Nunito Sans', 'Nunito', sans-serif;
  font-size: 30px;
  font-weight: 900;
  color: #fff;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-align: center;
  line-height: 1;
}
.enh-preloader__logo .rp {
  background: linear-gradient(135deg, #0C6DFE 0%, #01C8E9 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-left: 8px;
}
.enh-preloader__bar {
  width: 180px;
  height: 3px;
  background: rgba(255,255,255,0.08);
  border-radius: 2px;
  overflow: hidden;
}
.enh-preloader__progress {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #0C6DFE, #168FFF, #01C8E9);
  border-radius: 2px;
  animation: pre-progress 1.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
@keyframes pre-progress {
  0%   { width: 0;    opacity: 1; }
  80%  { width: 90%;  opacity: 1; }
  100% { width: 100%; opacity: 0; }
}

/* ----------------------------------------------------------
   1. SITE LOGO TEXT
   ---------------------------------------------------------- */
.site-logo-text {
  display: inline-flex;
  align-items: baseline;
  gap: 0;
  font-family: 'Gotham Pro', 'Nunito Sans', 'Nunito', sans-serif;
  font-size: 19px;
  font-weight: 900;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #ffffff;
  white-space: nowrap;
  line-height: 1;
  text-decoration: none;
}
.site-logo-text .rp-part {
  background: linear-gradient(135deg, #0C6DFE 0%, #168FFF 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-left: 7px;
}
.beta-logo-text {
  font-family: 'Space Grotesk', 'Nunito', sans-serif;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #fff;
  white-space: nowrap;
}
.beta-logo-text .rp-part {
  background: linear-gradient(135deg, #0C6DFE, #01C8E9);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-left: 6px;
}

/* ----------------------------------------------------------
   2. HIDE UNWANTED ELEMENTS
   ─ "Hata Online" footer link
   ─ "Розіграш" nav item (winter-giveaway)
   ─ Any image logo fallbacks in header
   ---------------------------------------------------------- */
/* Hide the Hata Online footer link */
a[href*="hata.online"],
a[href*="hata.online"] + li,
li:has(a[href*="hata.online"]) {
  display: none !important;
}
/* Fallback: hide by href attribute */
.footer__list li a[href*="hata.online"] {
  display: none !important;
}
.footer__list li:has(a[href*="hata.online"]) {
  display: none !important;
}

/* Hide the Розіграш / Giveaway nav menu item */
a[href*="winter-giveaway"],
a[href*="giveaway"][class*="menu__link"],
.menu__item:has(a[href*="winter-giveaway"]),
.menu__item:has(.concurs-img) {
  display: none !important;
}

/* ----------------------------------------------------------
   3. SAFE SCROLL REVEAL
   ---------------------------------------------------------- */
.enh-will-reveal {
  opacity: 0 !important;
  transform: translateY(32px) !important;
  transition: opacity 0.65s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.65s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
}
.enh-will-reveal.from-left  { transform: translateX(-32px) !important; }
.enh-will-reveal.from-right { transform: translateX(32px)  !important; }

.enh-revealed {
  opacity: 1    !important;
  transform: none !important;
}

.enh-reveal-d1 { transition-delay: 0.08s !important; }
.enh-reveal-d2 { transition-delay: 0.16s !important; }
.enh-reveal-d3 { transition-delay: 0.24s !important; }
.enh-reveal-d4 { transition-delay: 0.32s !important; }
.enh-reveal-d5 { transition-delay: 0.40s !important; }

/* ----------------------------------------------------------
   4. RIPPLE EFFECT ON BUTTONS
   ---------------------------------------------------------- */
.button,
.spin-modal__btn,
.sr_modal__register-btn {
  position: relative;
  overflow: hidden;
}
.enh-ripple {
  position: absolute;
  border-radius: 50%;
  width: 120px;
  height: 120px;
  margin-top: -60px;
  margin-left: -60px;
  background: rgba(255, 255, 255, 0.22);
  transform: scale(0);
  animation: enh-ripple-anim 0.65s linear;
  pointer-events: none;
  z-index: 10;
}
@keyframes enh-ripple-anim {
  to { transform: scale(5); opacity: 0; }
}

/* ----------------------------------------------------------
   5. HEADER GLASS
   ---------------------------------------------------------- */
.header {
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  background: rgba(10, 10, 18, 0.84) !important;
  box-shadow: 0 1px 0 rgba(255,255,255,0.055), 0 4px 32px rgba(0,0,0,0.32);
}

/* ----------------------------------------------------------
   6. BUTTON HOVER GLOW
   ---------------------------------------------------------- */
.button--primary {
  transition: transform 0.22s ease, box-shadow 0.22s ease, filter 0.22s ease !important;
}
.button--primary:hover {
  transform: translateY(-2px) scale(1.02) !important;
  box-shadow: 0 0 28px rgba(12, 109, 254, 0.55), 0 6px 22px rgba(0,0,0,0.35) !important;
  filter: brightness(1.08);
}
.button--outlined {
  transition: transform 0.22s ease, box-shadow 0.22s ease !important;
}
.button--outlined:hover {
  transform: translateY(-2px) scale(1.02) !important;
  box-shadow: 0 0 18px rgba(255,255,255,0.15) !important;
}
#download-game {
  animation: enh-pulse-glow 2.6s ease-out infinite;
}
@keyframes enh-pulse-glow {
  0%   { box-shadow: 0 0 0 0 rgba(12, 109, 254, 0.65); }
  70%  { box-shadow: 0 0 0 16px rgba(12, 109, 254, 0); }
  100% { box-shadow: 0 0 0 0 rgba(12, 109, 254, 0); }
}

/* ----------------------------------------------------------
   7. CARD / ITEM HOVER
   ---------------------------------------------------------- */
.why__item {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border-radius: 16px;
}
.why__item:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 44px rgba(12, 109, 254, 0.16);
}
.why__item-image { overflow: hidden; }
.why__item-image img.ibg {
  transition: transform 0.55s ease !important;
}
.why__item:hover .why__item-image img.ibg {
  transform: scale(1.06) !important;
}
.news__item {
  transition: transform 0.3s ease, box-shadow 0.3s ease !important;
}
.news__item:hover {
  transform: translateY(-6px) scale(1.012) !important;
  box-shadow: 0 14px 40px rgba(12, 109, 254, 0.22) !important;
}
.gallery__image {
  transition: transform 0.35s ease, box-shadow 0.35s ease !important;
}
.gallery__image:hover {
  transform: scale(1.035) !important;
  box-shadow: 0 10px 36px rgba(12, 109, 254, 0.28) !important;
}

/* ----------------------------------------------------------
   8. NAV / FOOTER HOVER
   ---------------------------------------------------------- */
.menu__link {
  transition: color 0.22s ease, transform 0.22s ease !important;
}
.menu__link:hover { transform: translateY(-1px); }
.footer__social {
  transition: transform 0.25s ease, opacity 0.25s ease !important;
}
.footer__social:hover { transform: translateY(-4px); opacity: 1 !important; }

/* ----------------------------------------------------------
   9. INSTRUCTION ITEM HOVER
   ---------------------------------------------------------- */
.how__instruction-item {
  transition: transform 0.28s ease, background 0.28s ease, box-shadow 0.28s ease;
  border-radius: 8px;
  padding: 6px 10px;
  margin-left: -10px;
}
.how__instruction-item:hover {
  transform: translateX(8px);
  background: rgba(12, 109, 254, 0.08);
  box-shadow: inset 3px 0 0 rgba(12, 109, 254, 0.6);
}
.why__item-tag {
  transition: transform 0.22s ease, background 0.22s ease !important;
}
.why__item-tag:hover {
  transform: translateY(-2px) scale(1.04) !important;
  background: rgba(12, 109, 254, 0.12) !important;
}

/* ----------------------------------------------------------
   10. TEXT READABILITY
   ---------------------------------------------------------- */
.why__item-description p,
.why__item-description,
.how__description,
.how__instruction-text,
.news__item-text p {
  opacity: 1 !important;
  color: rgba(255,255,255,0.82) !important;
  -webkit-line-clamp: unset !important;
  line-clamp: unset !important;
  max-height: none !important;
  overflow: visible !important;
  display: block !important;
}
.why__item-title,
.how__title2,
.news__item-title {
  color: #fff !important;
}
.why__item-tag span { color: #fff !important; }
.main-block__server-line span {
  box-shadow: 0 0 8px rgba(22, 171, 255, 0.6);
}

/* ----------------------------------------------------------
   11. NEWS — 3 FEATURED GRID + SHOW MORE
   ---------------------------------------------------------- */
.enh-news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 0;
}
@media (max-width: 1000px) { .enh-news-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px)  { .enh-news-grid { grid-template-columns: 1fr; } }
.enh-news-grid .swiper-slide {
  width: 100%   !important;
  transform: none !important;
  flex-shrink: 0;
  flex-grow: 0;
}
.enh-news-more-wrap { text-align: center; margin-top: 28px; }
.enh-news-hidden    { display: none !important; }

/* ----------------------------------------------------------
   12. BETA TRIGGER BUTTON (fixed bottom-right)
   ---------------------------------------------------------- */
.beta-trigger-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9998;
  background: rgba(12, 109, 254, 0.08);
  border: 1px solid rgba(12, 109, 254, 0.22);
  color: rgba(255,255,255,0.45);
  font-family: 'Nunito Sans', 'Segoe UI', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 7px 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: color 0.3s, border-color 0.3s, background 0.3s, box-shadow 0.3s, transform 0.3s;
  user-select: none;
  backdrop-filter: blur(8px);
}
.beta-trigger-btn:hover {
  color: rgba(255,255,255,0.9);
  border-color: rgba(12,109,254,0.55);
  background: rgba(12,109,254,0.16);
  box-shadow: 0 0 18px rgba(12,109,254,0.25);
  transform: translateY(-2px);
}

/* ----------------------------------------------------------
   13. BETA TRANSITION OVERLAY — v3 "Portal" effect
       Inspired by high-end game UI transitions:
       grid dissolve → light burst → portal ring → fade
   ---------------------------------------------------------- */
.beta-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: none;
  overflow: hidden;
  pointer-events: all;
}
.beta-overlay.active { display: block; }

/* Dark background that fills the screen */
.beta-overlay__bg {
  position: absolute;
  inset: 0;
  background: #08080f;
  animation: bov3-bg 2.2s ease forwards;
}
@keyframes bov3-bg {
  0%        { opacity: 0; }
  8%        { opacity: 1; }
  100%      { opacity: 1; }
}

/* Grid pattern overlay */
.beta-overlay__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(12,109,254,0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(12,109,254,0.07) 1px, transparent 1px);
  background-size: 48px 48px;
  animation: bov3-grid 2.2s ease forwards;
}
@keyframes bov3-grid {
  0%   { opacity: 0; transform: scale(1.08); }
  15%  { opacity: 1; transform: scale(1); }
  70%  { opacity: 0.6; }
  100% { opacity: 0; }
}

/* Scanlines */
.beta-overlay__scanlines {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0, transparent 3px,
    rgba(0,0,0,0.28) 3px, rgba(0,0,0,0.28) 6px
  );
  animation: bov3-scan 2.2s ease forwards;
  pointer-events: none;
}
@keyframes bov3-scan {
  0%   { opacity: 0; }
  20%  { opacity: 0.7; }
  80%  { opacity: 0.4; }
  100% { opacity: 0; }
}

/* Portal ring — glowing circle that expands */
.beta-overlay__portal {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(0);
  width: 260px; height: 260px;
  border-radius: 50%;
  border: 3px solid rgba(12,109,254,0.9);
  box-shadow:
    0 0 0 6px rgba(12,109,254,0.3),
    0 0 60px 10px rgba(12,109,254,0.55),
    inset 0 0 60px rgba(12,109,254,0.25);
  animation: bov3-portal 2.2s cubic-bezier(0.25,0.46,0.45,0.94) forwards;
}
@keyframes bov3-portal {
  0%    { transform: translate(-50%,-50%) scale(0);   opacity: 0; }
  15%   { transform: translate(-50%,-50%) scale(0.4); opacity: 1; }
  55%   { transform: translate(-50%,-50%) scale(1);   opacity: 1;
          border-color: rgba(1,200,233,0.9);
          box-shadow: 0 0 0 10px rgba(1,200,233,0.25), 0 0 80px 20px rgba(1,200,233,0.6), inset 0 0 80px rgba(1,200,233,0.2); }
  85%   { transform: translate(-50%,-50%) scale(18);  opacity: 0.2; }
  100%  { transform: translate(-50%,-50%) scale(24);  opacity: 0; }
}

/* Inner portal glow core */
.beta-overlay__core {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(0);
  width: 80px; height: 80px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.95) 0%, rgba(12,109,254,0.9) 40%, transparent 75%);
  animation: bov3-core 2.2s ease forwards;
}
@keyframes bov3-core {
  0%   { transform: translate(-50%,-50%) scale(0); opacity: 0; }
  20%  { transform: translate(-50%,-50%) scale(0.5); opacity: 1; }
  55%  { transform: translate(-50%,-50%) scale(1.2); opacity: 1;
         background: radial-gradient(circle, rgba(255,255,255,1) 0%, rgba(1,200,233,0.9) 35%, transparent 70%); }
  80%  { transform: translate(-50%,-50%) scale(0.3); opacity: 0.5; }
  100% { transform: translate(-50%,-50%) scale(0); opacity: 0; }
}

/* Floating particles */
.beta-overlay__particles {
  position: absolute;
  inset: 0;
  animation: bov3-ptshow 2.2s ease forwards;
}
@keyframes bov3-ptshow { 0%{opacity:0;} 25%{opacity:1;} 80%{opacity:0.6;} 100%{opacity:0;} }

.beta-particle {
  position: absolute;
  border-radius: 50%;
  background: rgba(12,109,254,0.8);
  animation: bov3-particle var(--dur,1.2s) ease var(--delay,0s) forwards;
}
@keyframes bov3-particle {
  0%   { transform: translate(0,0) scale(1); opacity: 1; }
  100% { transform: translate(var(--tx,0px), var(--ty,-80px)) scale(0); opacity: 0; }
}

/* Text reveal */
.beta-overlay__text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 12px;
  animation: bov3-text 2.2s ease forwards;
}
@keyframes bov3-text {
  0%,25% { opacity: 0; }
  40%    { opacity: 1; }
  70%    { opacity: 1; }
  90%    { opacity: 0; }
  100%   { opacity: 0; }
}
.beta-overlay__label {
  font-family: 'Space Grotesk', 'Nunito Sans', sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  animation: bov3-label 2.2s ease forwards;
}
@keyframes bov3-label {
  0%,30% { opacity: 0; transform: translateY(12px); }
  45%    { opacity: 1; transform: none; }
  75%    { opacity: 1; }
  100%   { opacity: 0; }
}
.beta-overlay__bigtext {
  font-family: 'Space Grotesk', 'Nunito Sans', sans-serif;
  font-size: clamp(52px, 10vw, 88px);
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: linear-gradient(135deg, #fff 0%, #0C6DFE 40%, #01C8E9 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: bov3-bigtext 2.2s ease forwards;
}
@keyframes bov3-bigtext {
  0%,28% { opacity: 0; transform: scale(0.7) translateY(20px); }
  42%    { opacity: 1; transform: scale(1.05); }
  55%    { transform: scale(1); }
  75%    { opacity: 1; }
  100%   { opacity: 0; transform: scale(1.15); }
}

/* White flash at the end */
.beta-overlay__flash {
  position: absolute;
  inset: 0;
  background: #fff;
  opacity: 0;
  animation: bov3-flash 0.5s ease forwards;
  animation-delay: 1.85s;
}
@keyframes bov3-flash {
  0%   { opacity: 0; }
  35%  { opacity: 1; }
  100% { opacity: 0; }
}

/* ----------------------------------------------------------
   14. SMOOTH PAGE ENTRY
   ---------------------------------------------------------- */
@keyframes enh-page-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}
.wrapper {
  animation: enh-page-in 0.45s ease forwards;
  animation-delay: 0.05s;
  opacity: 0;
}
