* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  width: 100%;
  min-height: 100%;
  background: #8dc8f4;
  overflow-x: hidden;
}

body {
  font-family: "Mochiy Pop One", "Mali", sans-serif;
}

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  isolation: isolate;
  overflow: hidden;
  background: url("/background.png") center center / cover no-repeat;
}

.overlay {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(circle at 50% 28%, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0) 32%),
    linear-gradient(to bottom, rgba(17, 55, 91, 0.05), rgba(17, 55, 91, 0.03) 45%, rgba(10, 32, 55, 0.14));
}

.light-rays {
  position: absolute;
  inset: -20%;
  z-index: -1;
  pointer-events: none;
  opacity: 0.55;
  background:
    conic-gradient(
      from 180deg at 50% 0%,
      transparent 0deg,
      rgba(255, 255, 255, 0.18) 8deg,
      transparent 18deg,
      transparent 38deg,
      rgba(255, 255, 255, 0.12) 48deg,
      transparent 60deg
    );
  filter: blur(14px);
  animation: rays 12s ease-in-out infinite alternate;
}

@keyframes rays {
  from {
    transform: rotate(-2deg) scale(1.04);
    opacity: 0.38;
  }
  to {
    transform: rotate(2deg) scale(1.1);
    opacity: 0.62;
  }
}

.content {
  width: min(920px, 92vw);
  text-align: center;
  padding: 6vh 18px 8vh;
  transform: translateY(-2vh);
}

.logo-wrap {
  display: inline-block;
  animation: floatLogo 4.8s ease-in-out infinite;
  filter: drop-shadow(0 8px 18px rgba(62, 43, 17, 0.22));
}

@keyframes floatLogo {
  0%,
  100% {
    transform: translateY(0) rotate(-0.15deg);
  }
  50% {
    transform: translateY(-7px) rotate(0.15deg);
  }
}

.logo {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  line-height: 0.84;
  padding: 12px 32px 16px;
  color: #fff8d5;
  text-shadow:
    0 2px 0 #73521d,
    0 4px 8px rgba(71, 46, 13, 0.55),
    0 0 24px rgba(255, 224, 123, 0.7);
  font-family: "Cinzel", Georgia, serif;
  letter-spacing: 0.02em;
}

.logo-small {
  font-size: clamp(28px, 4vw, 58px);
  letter-spacing: 0.12em;
}

.logo-main {
  font-size: clamp(40px, 6.5vw, 92px);
  font-weight: 800;
}

.logo::before,
.logo::after {
  content: "✦";
  position: absolute;
  top: 45%;
  color: #ffe791;
  font-size: clamp(16px, 2vw, 26px);
  text-shadow: 0 0 16px rgba(255, 224, 112, 0.95);
  animation: twinkle 2.2s ease-in-out infinite;
}

.logo::before {
  left: 0;
}

.logo::after {
  right: 0;
  animation-delay: 0.8s;
}

@keyframes twinkle {
  0%,
  100% {
    opacity: 0.35;
    transform: scale(0.8) rotate(0deg);
  }
  50% {
    opacity: 1;
    transform: scale(1.18) rotate(45deg);
  }
}

.shimmer {
  overflow: hidden;
}

.shimmer::after {
  content: "";
  position: absolute;
  top: -40%;
  left: -45%;
  width: 28%;
  height: 190%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.1),
    rgba(255, 255, 255, 0.95),
    rgba(255, 255, 255, 0.18),
    transparent
  );
  transform: skewX(-18deg);
  animation: sweep 5.3s ease-in-out infinite;
}

@keyframes sweep {
  0%,
  58% {
    left: -45%;
    opacity: 0;
  }
  62% {
    opacity: 1;
  }
  82% {
    left: 125%;
    opacity: 1;
  }
  100% {
    left: 125%;
    opacity: 0;
  }
}

.server-name {
  margin: 10px 0 0;
  display: inline-block;
  padding: 8px 24px;
  color: #f7e8b1;
  font-family: "Cinzel", serif;
  font-size: clamp(22px, 3vw, 40px);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-shadow:
    0 2px 4px rgba(44, 31, 16, 0.72),
    0 0 20px rgba(255, 224, 145, 0.36);
  border-top: 1px solid rgba(255, 241, 188, 0.75);
  border-bottom: 1px solid rgba(255, 241, 188, 0.75);
  background: linear-gradient(90deg, transparent, rgba(50, 37, 17, 0.14), transparent);
}

.tagline {
  margin: 18px auto 24px;
  color: #2f2a24;
  text-shadow:
    0 1px 1px rgba(255, 255, 255, 0.8),
    0 0 10px rgba(255, 255, 255, 0.55);
  font-size: clamp(18px, 2vw, 27px);
  font-weight: 600;
}

.tagline p {
  margin: 7px 0;
}

.tagline .game-name {
  margin-bottom: 11px;
  font-family: "Cinzel", serif;
  font-size: 0.72em;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tagline .secondary {
  font-size: 0.78em;
  font-weight: 500;
}

.discord-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-width: min(340px, 84vw);
  padding: 16px 28px;
  color: #fff;
  text-decoration: none;
  font-family: "Cinzel", serif;
  font-size: clamp(16px, 2vw, 22px);
  font-weight: 700;
  letter-spacing: 0.04em;
  border: 1px solid rgba(255, 235, 168, 0.95);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(110, 125, 255, 0.96), rgba(67, 68, 199, 0.97));
  box-shadow:
    0 0 0 3px rgba(45, 49, 127, 0.3),
    0 12px 28px rgba(35, 45, 120, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
  transition: transform 0.22s ease, box-shadow 0.22s ease, filter 0.22s ease;
  overflow: hidden;
}

/* REGISTER / Log in under the Discord button (account portal). */
.account-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
}

.discord-btn.account-btn {
  color: #2a1d05;
  background: linear-gradient(180deg, rgba(255, 233, 160, 0.98), rgba(227, 180, 83, 0.98));
}

.account-link {
  color: rgba(255, 255, 255, 0.88);
  font-family: "Cinzel", serif;
  font-size: 14px;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.45);
}

.discord-btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 28%, rgba(255, 255, 255, 0.48) 48%, transparent 68%);
  transform: translateX(-120%);
  animation: buttonSweep 4.6s ease-in-out infinite;
}

@keyframes buttonSweep {
  0%,
  68% {
    transform: translateX(-120%);
  }
  88%,
  100% {
    transform: translateX(120%);
  }
}

.discord-btn:hover {
  transform: translateY(-3px) scale(1.025);
  filter: brightness(1.08);
  box-shadow:
    0 0 0 4px rgba(255, 232, 159, 0.25),
    0 16px 36px rgba(35, 45, 120, 0.4),
    0 0 30px rgba(126, 139, 255, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.discord-btn:active {
  transform: translateY(0) scale(0.99);
}

.discord-icon,
.discord-btn span {
  position: relative;
  z-index: 1;
}

.particle {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 244, 185, 0.9);
  box-shadow: 0 0 10px rgba(255, 235, 157, 0.95);
  animation: drift linear infinite;
  pointer-events: none;
}

@keyframes drift {
  from {
    transform: translate3d(0, 12vh, 0) scale(0.6);
    opacity: 0;
  }
  15% {
    opacity: 0.9;
  }
  85% {
    opacity: 0.65;
  }
  to {
    transform: translate3d(var(--dx), -110vh, 0) scale(1.15);
    opacity: 0;
  }
}

/* มีจริงใน DOM เพื่อ SEO แต่ลดความเด่น ไม่ให้ทำลายหน้า Hero */
.seo-copy {
  max-width: 720px;
  margin: 18px auto 0;
  color: rgba(255, 255, 255, 0.76);
  font: 500 12px/1.55 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.45);
}

.corner-note {
  position: absolute;
  right: 18px;
  bottom: 12px;
  color: rgba(255, 255, 255, 0.72);
  font-family: "Cinzel", serif;
  font-size: 10px;
  letter-spacing: 0.13em;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
}

@media (max-width: 720px) {
  .hero {
    background-position: 54% center;
  }

  .content {
    width: 96vw;
    padding-top: 10vh;
    transform: translateY(-1vh);
  }

  .logo {
    padding-inline: 18px;
  }

  .server-name {
    margin-top: 12px;
  }

  .tagline {
    width: 90%;
    padding: 9px 12px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.26);
    backdrop-filter: blur(2px);
  }

  .seo-copy {
    width: 88%;
    font-size: 11px;
  }

  .corner-note {
    display: none;
  }
}

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

/* หน้าแรกแบบน่ารักแบบเกมญี่ปุ่น (ผู้ใช้เลือก 2026-11-01 จากหน้าเทียบตัวอักษร: ตัวกลม ขอบขาวหนา ไส้สีพีชไล่เฉด
   ตามรูปตัวอย่าง ECO VR; ไม่เอาแผ่นกระจก ไม่เอาขอบดำ). ตัวอักษร Mochiy Pop One มีน้ำหนักเดียว
   จึงตั้ง font-weight: 400 ทุกที่ ไม่ให้เบราว์เซอร์ทำตัวหนาปลอม */
.overlay {
  background:
    radial-gradient(ellipse 60% 58% at 50% 52%, rgba(12, 16, 30, 0.6), rgba(12, 16, 30, 0.3) 55%, rgba(12, 16, 30, 0) 84%),
    linear-gradient(to bottom, rgba(12, 16, 30, 0) 60%, rgba(12, 16, 30, 0.32) 100%);
}

.logo,
.logo-main,
.server-name,
.tagline,
.tagline p,
.discord-btn,
.account-link,
.corner-note {
  font-family: "Mochiy Pop One", "Mali", sans-serif;
  font-weight: 400;
}

.logo {
  line-height: 1;
  padding: 12px 32px 22px;
  color: #fff;
  letter-spacing: 0;
  text-shadow: none;
}

.logo-small {
  font-size: clamp(24px, 3.4vw, 44px);
  letter-spacing: 0.08em;
}

.logo-main {
  font-size: clamp(36px, 5.8vw, 76px);
}

/* ตัวเองเป็นชั้นขอบขาว + เงา, ::after เป็นไส้สีไล่เฉดวางทับตรงกัน (data-text ต้องตรงกับข้อความ) */
.pop {
  position: relative;
  color: #fff;
  -webkit-text-stroke: 0.18em #fff;
  filter: drop-shadow(0 4px 0 #eaa46a) drop-shadow(0 8px 10px rgba(110, 55, 20, 0.35));
}

.pop::after {
  content: attr(data-text);
  content: attr(data-text) / "";  /* โปรแกรมอ่านหน้าจอไม่อ่านซ้ำ */
  position: absolute;
  inset: 0;
  -webkit-text-stroke: 0;
  color: transparent;
  background: linear-gradient(180deg, #ffe2b0 0%, #ffb56e 55%, #f2874a 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

/* บรรทัดของตัวเองเสมอ (โลโก้แบบนี้แคบ ถ้าเป็น inline-block จะขึ้นไปอยู่ข้างโลโก้) */
.server-name {
  display: block;
  width: fit-content;
  margin: 16px auto 0;
  padding: 6px 30px;
  color: #6b3d1e;
  font-size: clamp(20px, 2.6vw, 30px);
  letter-spacing: 0.04em;
  text-shadow: none;
  border: 3px solid #fff;
  border-radius: 999px;
  background: #fff4c4;
  box-shadow: 0 4px 0 #e6c461, 0 8px 14px rgba(0, 0, 0, 0.22);
}

.tagline {
  width: auto;
  padding: 0;
  margin: 20px auto 28px;
  color: #fff;
  font-size: clamp(18px, 2vw, 24px);
  text-shadow: 0 2px 0 rgba(107, 61, 30, 0.6), 0 3px 10px rgba(0, 0, 0, 0.35);
  background: none;
  backdrop-filter: none;
}

.tagline .game-name {
  font-size: 0.72em;
  letter-spacing: 0.14em;
}

.tagline .secondary {
  color: #fffaf0;
  font-size: 0.74em;
  letter-spacing: 0;
}

.discord-btn {
  border: 3px solid #fff;
  font-size: clamp(16px, 1.8vw, 20px);
  letter-spacing: 0.06em;
  box-shadow: 0 4px 0 #3b3fae, 0 8px 14px rgba(0, 0, 0, 0.22);
}

.discord-btn.account-btn {
  color: #6b3d1e;
  background: #fff4c4;
  box-shadow: 0 4px 0 #e6c461, 0 8px 14px rgba(0, 0, 0, 0.22);
}

.discord-btn:hover {
  box-shadow: 0 7px 0 #3b3fae, 0 12px 20px rgba(0, 0, 0, 0.25);
}

.discord-btn.account-btn:hover {
  box-shadow: 0 7px 0 #e6c461, 0 12px 20px rgba(0, 0, 0, 0.25);
}

.account-link {
  color: #fff;
  font-size: 14px;
  text-underline-offset: 4px;
  text-decoration-color: rgba(255, 244, 196, 0.8);
  text-shadow: 0 2px 0 rgba(107, 61, 30, 0.55), 0 2px 8px rgba(0, 0, 0, 0.35);
}

.seo-copy {
  padding: 0;
  color: #fff;
  font: 600 15px/1.6 "Mali", sans-serif;
  text-shadow: 0 2px 0 rgba(107, 61, 30, 0.55), 0 2px 8px rgba(0, 0, 0, 0.4);
  background: none;
}

.corner-note {
  color: rgba(255, 255, 255, 0.85);
  letter-spacing: 0.1em;
  text-shadow: 0 1px 0 rgba(107, 61, 30, 0.55), 0 1px 4px rgba(0, 0, 0, 0.4);
}
