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

:root {
  --glass-bg: linear-gradient(145deg, rgba(255, 255, 255, 0.16) 0%, rgba(255, 255, 255, 0.04) 52%, rgba(255, 255, 255, 0.09) 100%);
  --glass-border: rgba(255, 255, 255, 0.32);
  --glass-highlight: inset 0 1.5px 1px rgba(255, 255, 255, 0.65), inset 0 -1.5px 2px rgba(0, 0, 0, 0.32);
  --glass-shadow: 0 30px 64px -14px rgba(0, 0, 0, 0.75);
  --ease-spring: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-snappy: cubic-bezier(0.2, 0.9, 0.25, 1);
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #ffffff;
  text-align: center;
  overflow-x: hidden;
  position: relative;
  padding: calc(20px + env(safe-area-inset-top)) calc(16px + env(safe-area-inset-right)) calc(20px + env(safe-area-inset-bottom)) calc(16px + env(safe-area-inset-left));
  background: #06080d;
}

#bg-video {
  position: fixed;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  transform: translate(-50%, -50%) scale(1.03);
  object-fit: cover;
  z-index: -3;
}

video::-webkit-media-controls {
  display: none !important;
}

#overlay-dark {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 50% 35%, rgba(16, 22, 38, 0.36) 0%, rgba(5, 7, 13, 0.86) 100%),
    linear-gradient(180deg, rgba(6, 8, 13, 0.35) 0%, rgba(6, 8, 13, 0.72) 100%);
  z-index: -2;
}

.ambient-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(90px);
  z-index: -1;
  opacity: 0.45;
  pointer-events: none;
  will-change: transform;
}

.orb-1 {
  width: 320px;
  height: 320px;
  background: #4f63ff;
  top: 10%;
  left: 15%;
  animation: driftOrbOne 14s ease-in-out infinite alternate;
}

.orb-2 {
  width: 300px;
  height: 300px;
  background: #10b981;
  bottom: 10%;
  right: 15%;
  animation: driftOrbTwo 16s ease-in-out infinite alternate;
}

.orb-3 {
  width: 220px;
  height: 220px;
  background: #06b6d4;
  top: 55%;
  left: 52%;
  opacity: 0.25;
  animation: driftOrbThree 11s ease-in-out infinite alternate;
}

@keyframes driftOrbOne {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  100% { transform: translate3d(36px, -28px, 0) scale(1.14); }
}

@keyframes driftOrbTwo {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  100% { transform: translate3d(-34px, -24px, 0) scale(1.12); }
}

@keyframes driftOrbThree {
  0% { transform: translate3d(-50%, -50%, 0) scale(0.95); }
  100% { transform: translate3d(-42%, -58%, 0) scale(1.15); }
}

.liquid-card {
  position: relative;
  width: 100%;
  max-width: 412px;
  padding: 36px 28px 26px;
  border-radius: 34px;
  background: var(--glass-bg);
  backdrop-filter: blur(32px) saturate(190%);
  -webkit-backdrop-filter: blur(32px) saturate(190%);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow), var(--glass-highlight);
  overflow: hidden;
  transform-style: preserve-3d;
  transition: transform 0.25s var(--ease-snappy), box-shadow 0.35s var(--ease-spring);
  animation: cardEnter 0.95s var(--ease-spring) both;
}

.liquid-sheen {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    440px circle at var(--mouse-x, 50%) var(--mouse-y, 15%),
    rgba(255, 255, 255, 0.24),
    rgba(255, 255, 255, 0.05) 35%,
    transparent 60%
  );
  pointer-events: none;
  z-index: 0;
  transition: opacity 0.35s ease;
}

.liquid-rim {
  position: absolute;
  inset: 0;
  border-radius: 34px;
  padding: 1px;
  background: linear-gradient(
    130deg,
    rgba(255, 255, 255, 0.55) 0%,
    rgba(255, 255, 255, 0.08) 38%,
    rgba(255, 255, 255, 0.04) 65%,
    rgba(255, 255, 255, 0.35) 100%
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  z-index: 2;
}

.liquid-card > *:not(.liquid-sheen):not(.liquid-rim) {
  position: relative;
  z-index: 1;
}

@keyframes cardEnter {
  0% {
    opacity: 0;
    transform: translateY(28px) scale(0.96);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.logo {
  position: relative;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 14px;
  animation: itemStagger 0.8s var(--ease-spring) 0.12s both;
}

.logo-halo {
  position: absolute;
  width: 132px;
  height: 132px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.22) 0%, rgba(79, 99, 255, 0.14) 45%, transparent 72%);
  filter: blur(10px);
  animation: haloPulse 4s ease-in-out infinite;
  pointer-events: none;
}

@keyframes haloPulse {
  0%, 100% { transform: scale(0.94); opacity: 0.7; }
  50% { transform: scale(1.08); opacity: 1; }
}

.logo img {
  position: relative;
  width: clamp(104px, 24vw, 126px);
  height: auto;
  filter: drop-shadow(0 14px 24px rgba(0, 0, 0, 0.5));
  animation: floatLogo 5.5s ease-in-out infinite;
  transition: transform 0.35s var(--ease-spring);
}

.logo:hover img {
  transform: scale(1.06) translateY(-3px);
}

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

.server-title {
  margin-bottom: 20px;
  animation: itemStagger 0.8s var(--ease-spring) 0.2s both;
}

.server-title h1 {
  font-size: 25px;
  font-weight: 800;
  letter-spacing: 2.6px;
  background: linear-gradient(180deg, #ffffff 18%, rgba(255, 255, 255, 0.72) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 7px;
}

.tagline {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.6px;
  padding: 5px 13px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: rgba(255, 255, 255, 0.92);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.glass-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.28), 0 6px 16px rgba(0, 0, 0, 0.22);
  margin-bottom: 14px;
  animation: itemStagger 0.8s var(--ease-spring) 0.28s both;
}

.server-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
  padding-left: 4px;
}

.copy-ip-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  background: rgba(255, 255, 255, 0.13);
  color: #ffffff;
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.38);
  transition: background 0.22s ease, transform 0.22s var(--ease-snappy), border-color 0.22s ease;
}

.copy-ip-btn:hover {
  background: rgba(255, 255, 255, 0.24);
  border-color: rgba(255, 255, 255, 0.42);
  transform: translateY(-1px);
}

.copy-ip-btn:active {
  transform: scale(0.95);
}

.copy-ip-btn.copied {
  background: rgba(16, 185, 129, 0.28);
  border-color: rgba(16, 185, 129, 0.65);
}

.dot, .pulse-dot {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 10px #10b981;
  flex-shrink: 0;
}

.dot::after, .pulse-dot::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1.5px solid currentColor;
  color: #10b981;
  animation: rippleRing 2.2s cubic-bezier(0.16, 1, 0.3, 1) infinite;
}

.pulse-dot {
  background: #f43f5e;
  box-shadow: 0 0 10px #f43f5e;
}

.pulse-dot::after {
  color: #f43f5e;
}

@keyframes rippleRing {
  0% { transform: scale(0.7); opacity: 0.85; }
  100% { transform: scale(2.1); opacity: 0; }
}

.buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  animation: itemStagger 0.8s var(--ease-spring) 0.36s both;
}

.glass-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 20px;
  border-radius: 18px;
  font-family: inherit;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.3px;
  color: #ffffff;
  text-decoration: none;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.38);
  box-shadow: 0 12px 26px -6px rgba(0, 0, 0, 0.48), inset 0 1.5px 1px rgba(255, 255, 255, 0.62);
  transition: transform 0.28s var(--ease-spring), box-shadow 0.28s ease, filter 0.25s ease;
  user-select: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.glass-btn img {
  width: 21px;
  height: 21px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.35));
  transition: transform 0.28s var(--ease-spring);
}

.btn-play {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.86) 0%, rgba(5, 150, 105, 0.58) 100%);
}

.btn-discord {
  background: linear-gradient(135deg, rgba(88, 101, 242, 0.84) 0%, rgba(64, 78, 237, 0.56) 100%);
}

.btn-shine {
  position: absolute;
  top: 0;
  left: -110%;
  width: 65%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.42),
    transparent
  );
  transform: skewX(-22deg);
  transition: left 0.65s var(--ease-spring);
}

.glass-btn:hover .btn-shine {
  left: 155%;
}

.glass-btn:hover {
  transform: translateY(-3px);
  filter: brightness(1.09);
  box-shadow: 0 16px 32px -6px rgba(0, 0, 0, 0.58), inset 0 1.5px 2px rgba(255, 255, 255, 0.8);
}

.glass-btn:hover img {
  transform: scale(1.12);
}

.glass-btn:active {
  transform: translateY(0) scale(0.97);
}

.discord-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 14px;
  font-size: 12.5px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.footer {
  margin-top: 20px;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 10px 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.35), 0 8px 20px rgba(0, 0, 0, 0.25);
  animation: itemStagger 0.8s var(--ease-spring) 0.44s both;
}

.social-glass {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
  transition: transform 0.28s var(--ease-spring), background 0.25s ease, border-color 0.25s ease;
}

.social-glass img {
  width: 22px;
  height: 22px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4));
}

.social-glass:hover {
  transform: translateY(-4px) scale(1.1);
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.35);
}

.social-glass:active {
  transform: scale(0.95);
}

.credits {
  margin-top: 18px;
  font-size: 9.5px;
  color: rgba(255, 255, 255, 0.52);
  line-height: 1.5;
  letter-spacing: 0.3px;
  animation: itemStagger 0.8s var(--ease-spring) 0.5s both;
}

@keyframes itemStagger {
  0% {
    opacity: 0;
    transform: translateY(14px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.glass-surface {
  position: fixed;
  top: calc(16px + env(safe-area-inset-top));
  right: calc(16px + env(safe-area-inset-right));
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(22px) saturate(180%);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.32);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.38), inset 0 1.5px 1px rgba(255, 255, 255, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 100;
  transition: transform 0.25s var(--ease-spring), background 0.22s ease;
}

.glass-surface:hover {
  background: rgba(255, 255, 255, 0.24);
  transform: scale(1.07);
}

.glass-surface:active {
  transform: scale(0.95);
}

#preloader {
  position: fixed;
  inset: 0;
  background: rgba(6, 8, 13, 0.9);
  backdrop-filter: blur(26px);
  -webkit-backdrop-filter: blur(26px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.45s ease;
}

.glass-pill {
  padding: 28px 36px;
  border-radius: 28px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow), var(--glass-highlight);
  text-align: center;
}

.glass-pill img {
  width: 72px;
  animation: pulse 1.6s ease-in-out infinite;
}

.loading-bar {
  width: 124px;
  height: 4px;
  background: rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  margin: 14px auto 9px;
  overflow: hidden;
}

.loading-progress {
  width: 55%;
  height: 100%;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.4), #ffffff);
  border-radius: 999px;
  animation: slideLoad 1.25s var(--ease-snappy) infinite;
}

.glass-pill p {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.82);
  letter-spacing: 0.4px;
}

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

@keyframes slideLoad {
  0% { transform: translateX(-110%); }
  100% { transform: translateX(210%); }
}

.toast-glass {
  position: fixed;
  bottom: calc(24px + env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%) translateY(22px);
  padding: 11px 22px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  background: rgba(18, 24, 38, 0.82);
  backdrop-filter: blur(22px) saturate(180%);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.32);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.35s var(--ease-spring), opacity 0.25s ease;
  z-index: 200;
}

.toast-glass.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(5, 7, 13, 0.74);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 300;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.modal-backdrop.open {
  opacity: 1;
}

.modal-glass {
  width: 100%;
  max-width: 360px;
  padding: 26px 24px;
  border-radius: 28px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.18) 0%, rgba(255, 255, 255, 0.06) 100%);
  backdrop-filter: blur(32px) saturate(190%);
  -webkit-backdrop-filter: blur(32px) saturate(190%);
  border: 1px solid rgba(255, 255, 255, 0.34);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.65), inset 0 1.5px 1px rgba(255, 255, 255, 0.6);
  text-align: center;
  transform: translateY(14px) scale(0.97);
  transition: transform 0.32s var(--ease-spring);
}

.modal-backdrop.open .modal-glass {
  transform: translateY(0) scale(1);
}

.modal-glass h3 {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 8px;
}

.modal-glass p {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.5;
  margin-bottom: 14px;
}

.modal-steps {
  text-align: left;
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 16px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.modal-ip-box {
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.25);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.5px;
  color: #10b981;
  user-select: all;
}

@media (max-width: 480px) {
  .liquid-card {
    padding: 30px 20px 22px;
    border-radius: 28px;
  }
  .liquid-rim {
    border-radius: 28px;
  }
  .server-title h1 {
    font-size: 22px;
  }
  .glass-btn {
    min-height: 50px;
    font-size: 15px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
