/* ===================== BASE ===================== */
body {
  margin: 0;
  padding: 0;
  width: 100%;
  min-height: 100vh;
  background-color: #060b22;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  overflow-x: hidden;
  font-family: 'Prompt', sans-serif;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
  object-fit: contain;
}

.container {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  width: 420px;
  max-width: 100%;
  min-height: 100vh;
  overflow: hidden;
  background: #0a1233;
}

/* ===================== BACKGROUND (navy geometric) ===================== */
.bg_layer {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(120% 70% at 50% 0%,   #1b2c6e 0%, rgba(27,44,110,0) 60%),
    radial-gradient(100% 60% at 50% 100%, #101c4d 0%, rgba(16,28,77,0) 65%),
    linear-gradient(180deg, #0d1740 0%, #0a1233 45%, #060b22 100%);
}

.bg_shape {
  position: absolute;
  display: block;
}

/* แผ่นเหลี่ยมมุมบนซ้าย */
.bg_shape--1 {
  top: -6%;
  left: -20%;
  width: 90%;
  height: 55%;
  background: linear-gradient(135deg, rgba(38,60,140,.55), rgba(20,34,90,0));
  clip-path: polygon(0 0, 100% 0, 42% 100%, 0 62%);
}

/* แผ่นเหลี่ยมมุมบนขวา */
.bg_shape--2 {
  top: -4%;
  right: -25%;
  width: 85%;
  height: 60%;
  background: linear-gradient(215deg, rgba(30,52,128,.5), rgba(16,28,77,0));
  clip-path: polygon(100% 0, 100% 70%, 30% 100%, 0 0);
}

/* แถบทแยงกลางจอ */
.bg_shape--3 {
  top: 32%;
  left: -30%;
  width: 160%;
  height: 45%;
  background: linear-gradient(100deg, rgba(24,42,112,.55), rgba(10,18,51,0) 70%);
  clip-path: polygon(0 22%, 100% 0, 100% 78%, 0 100%);
}

/* แผ่นเหลี่ยมมุมล่าง */
.bg_shape--4 {
  bottom: -8%;
  left: -18%;
  width: 120%;
  height: 42%;
  background: linear-gradient(20deg, rgba(28,48,124,.45), rgba(8,14,40,0));
  clip-path: polygon(0 38%, 62% 0, 100% 48%, 100% 100%, 0 100%);
}

/* แสงเรืองหลังตัวละคร */
.bg_glow {
  position: absolute;
  top: 34%;
  left: 50%;
  width: 115%;
  height: 46%;
  transform: translateX(-50%);
  background: radial-gradient(50% 50% at 50% 50%, rgba(70,120,255,.28) 0%, rgba(70,120,255,0) 70%);
  animation: bgGlowPulse 6s ease-in-out infinite;
}

@keyframes bgGlowPulse {
  0%, 100% { opacity: .75; transform: translateX(-50%) scale(1); }
  50%      { opacity: 1;   transform: translateX(-50%) scale(1.07); }
}

/* ===================== CONTENT ===================== */
.content {
  position: relative;
  z-index: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 0 24px;
  box-sizing: border-box;
}

/* ===================== LOGO ===================== */
.logo_top {
  width: 74%;
  margin-top: -15%;
  margin-bottom: -16%;
  filter: drop-shadow(0 6px 18px rgba(0, 0, 0, .55))
          drop-shadow(0 0 22px rgba(90, 140, 255, .35));
  animation: logoFloat 4s ease-in-out infinite;
}

@keyframes logoFloat {
  0%, 100% { transform: translateY(0)    scale(1); }
  50%      { transform: translateY(-6px) scale(1.02); }
}

/* ===================== ACTION BUTTONS ===================== */
.action_container {
  display: flex;
  width: 94%;
  gap: 10px;
  justify-content: center;
  align-items: center;
  margin-top: 4px;
}

.pill_btn {
  flex: 1 1 0;
  min-width: 0;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;

  height: clamp(42px, 11.5vw, 50px);
  padding: 0 10px;
  box-sizing: border-box;

  border-radius: 999px;
  border: 3px solid #FFD24A;

  text-decoration: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;

  box-shadow:
    0 0 0 1px rgba(0, 0, 0, .55),
    0 6px 16px rgba(0, 0, 0, .5),
    inset 0 2px 5px rgba(255, 255, 255, .35),
    inset 0 -4px 10px rgba(0, 0, 0, .35);

  transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}

/* ปุ่มเข้าสู่เว็บไซต์ */
.pill_btn--enter {
  background: linear-gradient(180deg, #2bd07a 0%, #12a35c 45%, #0b6f7d 100%);
}

/* ปุ่มสมัครสมาชิก */
.pill_btn--register {
  background: linear-gradient(180deg, #ff5f8a 0%, #e8123f 48%, #a2001f 100%);
  animation: btnPulse 2s ease-in-out infinite;
}

.pill_btn:hover {
  transform: translateY(-2px) scale(1.02);
  filter: brightness(1.08);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, .55),
    0 10px 24px rgba(0, 0, 0, .55),
    0 0 26px rgba(255, 210, 74, .55),
    inset 0 2px 6px rgba(255, 255, 255, .45);
}

.pill_btn:active {
  transform: translateY(0) scale(.97);
}

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

.pill_btn_icon {
  font-size: clamp(16px, 4.6vw, 20px);
  line-height: 1;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .5));
}

.pill_btn_text {
  font-family: 'Prompt', sans-serif;
  font-weight: 800;
  font-size: clamp(14px, 4.4vw, 19px);
  line-height: 1;
  white-space: nowrap;

  color: #ffffff;
  text-shadow:
    -1.5px -1.5px 0 #4a0010,
     1.5px -1.5px 0 #4a0010,
    -1.5px  1.5px 0 #4a0010,
     1.5px  1.5px 0 #4a0010,
     0 2px 4px rgba(0, 0, 0, .6);
}

.pill_btn--enter .pill_btn_text {
  text-shadow:
    -1.5px -1.5px 0 #033524,
     1.5px -1.5px 0 #033524,
    -1.5px  1.5px 0 #033524,
     1.5px  1.5px 0 #033524,
     0 2px 4px rgba(0, 0, 0, .6);
}

/* แสงวิ่งบนปุ่ม */
.pill_btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -160%;
  width: 160%;
  height: 100%;

  background: linear-gradient(
      120deg,
      transparent 0%,
      rgba(255, 255, 255, .55) 50%,
      transparent 100%
  );

  filter: blur(10px);
  transform: skewX(-25deg);
  animation: shineSweep 2.6s linear infinite;

  z-index: 2;
  pointer-events: none;
}

@keyframes shineSweep {
  0%   { left: -160%; }
  60%  { left: 160%; }
  100% { left: 160%; }
}

/* ===================== CHARACTER ===================== */
.character_img {
  width: 95%;
  margin-top: -4%;
  margin-bottom: -12px;
  filter: drop-shadow(0 12px 26px rgba(0, 0, 0, .55));
  animation: floatGlow 4s ease-in-out infinite;
}

@keyframes floatGlow {
  0%, 100% {
    transform: translateY(0);
    filter: drop-shadow(0 12px 26px rgba(0, 0, 0, .55));
  }
  50% {
    transform: translateY(10px);
    filter: drop-shadow(0 8px 30px rgba(120, 170, 255, .45));
  }
}

/* ===================== FOOTER ===================== */
.footer_container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 88%;
  margin-top: 4px;
}

.footer_app {
  width: 78%;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .55));
}

/* ===================== FLOATING LINE BUTTON ===================== */
.line_float_layer {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  justify-content: center;
  pointer-events: none;
}

.line_float_band {
  position: relative;
  width: 100%;
  max-width: 420px;
}

.line_float_btn {
  position: absolute;
  right: 14px;
  bottom: 20px;

  width: 88px;
  height: 88px;

  display: flex;
  align-items: center;
  justify-content: center;

  pointer-events: auto;
  cursor: pointer;
  text-decoration: none;

  animation: lineFloatBob 2.8s ease-in-out infinite;
  transition: transform .25s ease;
}

.line_float_btn:hover  { transform: scale(1.08); }
.line_float_btn:active { transform: scale(0.95); }

.line_float_icon {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  filter:
    drop-shadow(0 0 10px rgba(0, 255, 120, .7))
    drop-shadow(0 4px 10px rgba(0, 0, 0, .5));
}

.line_float_pulse {
  position: absolute;
  z-index: 1;
  top: 16%;
  left: 18%;
  width: 64%;
  height: 64%;
  border-radius: 50%;
  background: rgba(6, 199, 85, .55);
  animation: lineFloatPulse 2.2s ease-out infinite;
}

.line_float_pulse--2 { animation-delay: 1.1s; }

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

@keyframes lineFloatPulse {
  0%   { transform: scale(1);   opacity: .65; }
  100% { transform: scale(1.7); opacity: 0;  }
}

/* ===================== RESPONSIVE ===================== */
@media (max-width: 360px) {
  .pill_btn        { gap: 4px; padding: 0 8px; border-width: 2px; }
  .line_float_btn  { width: 74px; height: 74px; right: 10px; bottom: 14px; }
}
