/* ========== 全局重置 & 基础设置 ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background: radial-gradient(ellipse at top, #3a0a2e 0%, #1a0520 45%, #0d0212 100%);
  min-height: 100vh;
  min-height: 100dvh;
  color: #fff;
  overflow-x: hidden;
  position: relative;
}

/* ========== 背景装饰 - 漂浮光点 ========== */
.bg-decoration {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.sparkle {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff9c4 0%, rgba(255, 215, 0, 0.6) 40%, transparent 70%);
  box-shadow: 0 0 12px 3px rgba(255, 215, 0, 0.5);
  animation: floatUp linear infinite;
}

.sparkle::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.9) 0%, transparent 60%);
  animation: twinkle ease-in-out infinite alternate;
}

@keyframes floatUp {
  0%   { transform: translateY(110vh) scale(0.6); opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 0.9; }
  100% { transform: translateY(-10vh) scale(1); opacity: 0; }
}

@keyframes twinkle {
  0%   { opacity: 0.3; transform: scale(0.8); }
  100% { opacity: 1;   transform: scale(1.3); }
}

/* 8个光点随机参数 */
.sparkle-1 { left: 8%;  animation-duration: 9s;  animation-delay: 0s;   width: 5px; height: 5px; }
.sparkle-2 { left: 22%; animation-duration: 12s; animation-delay: 1.5s; width: 8px; height: 8px; }
.sparkle-3 { left: 38%; animation-duration: 7s;  animation-delay: 3s;   width: 4px; height: 4px; }
.sparkle-4 { left: 52%; animation-duration: 10s; animation-delay: 0.8s; width: 7px; height: 7px; }
.sparkle-5 { left: 65%; animation-duration: 13s; animation-delay: 2.2s; width: 5px; height: 5px; }
.sparkle-6 { left: 78%; animation-duration: 8s;  animation-delay: 4s;   width: 6px; height: 6px; }
.sparkle-7 { left: 88%; animation-duration: 11s; animation-delay: 1s;   width: 9px; height: 9px; }
.sparkle-8 { left: 95%; animation-duration: 9.5s;animation-delay: 3.5s;  width: 5px; height: 5px; }

.sparkle-1::after, .sparkle-3::after, .sparkle-6::after { animation-duration: 1.2s; }
.sparkle-2::after, .sparkle-5::after, .sparkle-8::after { animation-duration: 1.8s; }
.sparkle-4::after, .sparkle-7::after { animation-duration: 2.1s; }

/* ========== 主容器布局 ========== */
.container {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-height: 100vh;
  min-height: 100dvh;
  padding: clamp(20px, 5vh, 48px) clamp(16px, 4vw, 32px);
}

/* ========== 标题 ========== */
.header {
  text-align: center;
  margin-bottom: clamp(20px, 4vh, 40px);
}

.title {
  font-size: clamp(28px, 7vw, 52px);
  font-weight: 900;
  letter-spacing: 4px;
  background: linear-gradient(180deg, #fff4c2 0%, #ffd700 45%, #ff9d00 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow:
    0 0 30px rgba(255, 215, 0, 0.35),
    0 4px 16px rgba(0, 0, 0, 0.6);
  filter: drop-shadow(0 2px 0 rgba(139, 0, 0, 0.6));
  animation: titleGlow 3s ease-in-out infinite alternate;
}

@keyframes titleGlow {
  0%   { filter: drop-shadow(0 2px 0 rgba(139, 0, 0, 0.6)) drop-shadow(0 0 10px rgba(255,215,0,0.3)); }
  100% { filter: drop-shadow(0 2px 0 rgba(139, 0, 0, 0.6)) drop-shadow(0 0 24px rgba(255,215,0,0.65)); }
}

.subtitle {
  margin-top: 8px;
  font-size: clamp(12px, 3vw, 16px);
  color: rgba(255, 215, 0, 0.75);
  letter-spacing: 3px;
  font-weight: 300;
}

/* ========== 转盘外层包装 ========== */
.wheel-section {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.wheel-wrapper {
  position: relative;
  width: clamp(300px, 85vw, 480px);
  height: clamp(300px, 85vw, 480px);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 外发光金边 */
.wheel-wrapper::before {
  content: '';
  position: absolute;
  inset: -14px;
  border-radius: 50%;
  background:
    conic-gradient(from 0deg,
      #ffd700 0deg, #fff4a3 30deg, #ffb800 60deg, #ffe066 90deg,
      #ffd700 120deg, #fff4a3 150deg, #ffb800 180deg, #ffe066 210deg,
      #ffd700 240deg, #fff4a3 270deg, #ffb800 300deg, #ffe066 330deg,
      #ffd700 360deg);
  filter: blur(1px);
  box-shadow:
    0 0 40px 10px rgba(255, 180, 0, 0.45),
    0 0 80px 20px rgba(255, 100, 50, 0.25),
    inset 0 0 20px rgba(255, 255, 255, 0.3);
  animation: ringSpin 20s linear infinite;
}

.wheel-wrapper::after {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  background: linear-gradient(145deg, #8b0000, #5a0015);
  box-shadow:
    0 6px 20px rgba(0, 0, 0, 0.6),
    inset 0 2px 4px rgba(255, 255, 255, 0.15),
    inset 0 -2px 6px rgba(0, 0, 0, 0.5);
}

@keyframes ringSpin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* ========== 转盘本体 ========== */
.wheel {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  /* 8等分扇形 - 起始偏移-90deg使第一个扇形从12点方向开始 */
  background:
    conic-gradient(
      from -90deg,
      #FF4757 0deg 45deg,
      #FFA502 45deg 90deg,
      #FFD700 90deg 135deg,
      #2ED573 135deg 180deg,
      #1E90FF 180deg 225deg,
      #A55EEA 225deg 270deg,
      #FF7F50 270deg 315deg,
      #FF6B81 315deg 360deg
    );
  box-shadow:
    inset 0 0 0 4px rgba(255, 255, 255, 0.85),
    inset 0 0 40px rgba(0, 0, 0, 0.25);
  transition: transform 5.5s cubic-bezier(0.17, 0.67, 0.12, 0.99);
  will-change: transform;
  z-index: 2;
}

/* 8条径向分割线（叠加层） */
.wheel::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    repeating-conic-gradient(
      from -90deg,
      transparent 0deg calc(45deg - 1.5deg),
      rgba(255, 255, 255, 0.9) calc(45deg - 1.5deg) 45deg
    );
  -webkit-mask: radial-gradient(circle, transparent 0%, transparent 12%, #000 13%, #000 100%);
  mask: radial-gradient(circle, transparent 0%, transparent 12%, #000 13%, #000 100%);
  pointer-events: none;
}

/* ========== 奖品标签（转盘转动时跟随转动） ========== */
.wheel-labels {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  /* 防止文字锚点被 clip 掉 */
  overflow: visible;
}

.wheel-label {
  position: absolute;
  left: 50%;
  top: 50%;
  /* 关键：锚点固定为元素中心，与 translate(-50%,-50%) 配合 → 元素中心先对齐圆心
     再 rotate + translateY(-rpx) 沿径向移到扇形中心，无歧义 */
  transform-origin: 50% 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-weight: 700;
  color: #fff;
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.6),
    0 0 6px rgba(0, 0, 0, 0.4);
  line-height: 1.1;
  letter-spacing: 0.3px;
  padding: 0;
  border-radius: 4px;
  /* —— 英文换行策略：优先在空格/单词处换行，只有长单词才在字母中间断开 —— */
  white-space: normal;
  overflow-wrap: anywhere;    /* 超长单词（如 SUPERCALIFRAGILISTIC）也能断，不出界 */
  word-break: normal;        /* 不断单词中间，除非 overflow-wrap 兜底 */
  hyphens: auto;
  /* 尺寸由内容 + max-width 决定，不干扰圆心定位 */
  width: auto;
  max-width: none;
}

/* 文字沿径向放射状自然分布（不再反向旋转，保持底部朝向圆心）
   折行规则：向外的一行在上，向内的一行在下 → 折行后文字堆向圆心，不会穿出外缘 */
.wheel-label span {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;      /* 最多 3 行，保证 3 行内不会穿出扇形内界（中心按钮） */
  max-width: 100%;
  width: 100%;
  /* 英文奖品名：短的一行、长的自动按单词折 2-3 行；行高紧凑，3 行也不会太高 */
  font-size: clamp(11px, 2.95vw, 17px);
  line-height: 1.08;
  font-weight: 800;
  white-space: normal;        /* 关键：取消 nowrap！允许折行 */
  overflow: hidden;           /* 超过 3 行裁剪（配合 line-clamp 显示省略号） */
  text-overflow: ellipsis;
  text-align: center;
}

/* ========== 指针组件（固定不随转盘转） ========== */
.pointer {
  position: absolute;
  top: -2%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.55));
}

.pointer-body {
  width: 0;
  height: 0;
  border-left: clamp(14px, 4vw, 22px) solid transparent;
  border-right: clamp(14px, 4vw, 22px) solid transparent;
  border-top: clamp(38px, 10vw, 60px) solid #ff2d3a;
  position: relative;
  margin-bottom: -6px;
}

/* 指针金边高光 */
.pointer-body::before {
  content: '';
  position: absolute;
  top: calc(clamp(38px, 10vw, 60px) * -1);
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: calc(clamp(14px, 4vw, 22px) - 3px) solid transparent;
  border-right: calc(clamp(14px, 4vw, 22px) - 3px) solid transparent;
  border-top: calc(clamp(38px, 10vw, 60px) - 5px) solid #ff5a66;
}

/* 指针中心亮线 */
.pointer-body::after {
  content: '';
  position: absolute;
  top: calc(clamp(38px, 10vw, 60px) * -1 + 6px);
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: calc(clamp(38px, 10vw, 60px) - 14px);
  background: linear-gradient(180deg, rgba(255,255,255,0.9), rgba(255,255,255,0));
  border-radius: 2px;
}

.pointer-base {
  width: clamp(22px, 6vw, 34px);
  height: clamp(22px, 6vw, 34px);
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 30%, #fff4a3 0%, #ffd700 45%, #b8860b 100%);
  border: 3px solid #8b6914;
  box-shadow:
    inset 0 -2px 4px rgba(0, 0, 0, 0.3),
    0 2px 4px rgba(0, 0, 0, 0.4);
}

/* ========== 中心抽奖按钮 ========== */
.spin-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: clamp(80px, 22vw, 120px);
  height: clamp(80px, 22vw, 120px);
  border-radius: 50%;
  border: 4px solid #8b6914;
  background:
    radial-gradient(circle at 32% 28%,
      #fff6c2 0%,
      #ffd700 32%,
      #ff9d00 62%,
      #c97200 100%);
  color: #8b0000;
  cursor: pointer;
  font-family: inherit;
  font-weight: 900;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0;
  box-shadow:
    0 clamp(6px, 1.6vw, 10px) clamp(16px, 4vw, 24px) rgba(0, 0, 0, 0.55),
    inset 0 3px 6px rgba(255, 255, 255, 0.65),
    inset 0 -4px 8px rgba(139, 69, 0, 0.45);
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
  user-select: none;
  -webkit-user-select: none;
}

.spin-btn::before {
  content: '';
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  border: 2px dashed rgba(139, 0, 0, 0.35);
  animation: btnRing 6s linear infinite;
}

@keyframes btnRing {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.spin-btn-text {
  font-size: clamp(18px, 5vw, 28px);
  letter-spacing: 2px;
  line-height: 1;
  text-shadow:
    0 1px 0 rgba(255, 255, 255, 0.65),
    0 -1px 0 rgba(139, 69, 0, 0.3);
}

.spin-btn-sub {
  margin-top: 2px;
  font-size: clamp(10px, 2.6vw, 13px);
  letter-spacing: 2px;
  opacity: 0.85;
  font-weight: 800;
}

.spin-btn:hover:not(:disabled) {
  transform: translate(-50%, -50%) scale(1.06);
  filter: brightness(1.08);
  box-shadow:
    0 clamp(8px, 2vw, 12px) clamp(22px, 5vw, 30px) rgba(255, 170, 0, 0.55),
    inset 0 3px 6px rgba(255, 255, 255, 0.65),
    inset 0 -4px 8px rgba(139, 69, 0, 0.45);
}

.spin-btn:active:not(:disabled) {
  transform: translate(-50%, calc(-50% + 3px)) scale(0.97);
  box-shadow:
    0 clamp(3px, 0.8vw, 5px) clamp(8px, 2vw, 12px) rgba(0, 0, 0, 0.45),
    inset 0 3px 10px rgba(139, 69, 0, 0.45);
}

.spin-btn:disabled {
  cursor: not-allowed;
  filter: grayscale(0.25) brightness(0.85);
}

/* 转盘旋转时按钮的轻微呼吸提示 */
.wheel.spinning ~ .spin-btn {
  animation: btnPulse 1.1s ease-in-out infinite;
}

@keyframes btnPulse {
  0%, 100% { box-shadow:
    0 clamp(6px, 1.6vw, 10px) clamp(16px, 4vw, 24px) rgba(0, 0, 0, 0.55),
    inset 0 3px 6px rgba(255, 255, 255, 0.65),
    inset 0 -4px 8px rgba(139, 69, 0, 0.45);
  }
  50% { box-shadow:
    0 clamp(6px, 1.6vw, 10px) clamp(24px, 6vw, 34px) rgba(255, 180, 0, 0.65),
    inset 0 3px 6px rgba(255, 255, 255, 0.65),
    inset 0 -4px 8px rgba(139, 69, 0, 0.45);
  }
}

/* ========== 页脚提示 ========== */
.footer-tip {
  margin-top: clamp(20px, 4vh, 36px);
  text-align: center;
  color: rgba(255, 215, 0, 0.7);
  font-size: clamp(12px, 3vw, 15px);
  letter-spacing: 2px;
  animation: tipFloat 2.5s ease-in-out infinite alternate;
}

@keyframes tipFloat {
  from { transform: translateY(0); opacity: 0.6; }
  to   { transform: translateY(-4px); opacity: 1; }
}

/* ========== 中奖弹窗 ========== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 2, 18, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: clamp(16px, 4vw, 32px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.modal {
  position: relative;
  width: 100%;
  max-width: clamp(300px, 80vw, 400px);
  background:
    linear-gradient(160deg, #fff9e6 0%, #ffeabf 50%, #ffd27a 100%);
  border-radius: 24px;
  padding: clamp(28px, 7vw, 40px) clamp(24px, 6vw, 36px) clamp(28px, 7vw, 36px);
  text-align: center;
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.55),
    inset 0 2px 0 rgba(255, 255, 255, 0.85);
  border: 3px solid #d4a017;
  transform: translateY(30px) scale(0.85);
  opacity: 0;
  transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
  overflow: hidden;
}

.modal-overlay.open .modal {
  transform: translateY(0) scale(1);
  opacity: 1;
}

/* 弹窗装饰彩带 */
.modal-decoration {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.confetti {
  position: absolute;
  width: 10px;
  height: 16px;
  border-radius: 2px;
  top: -20px;
  opacity: 0;
  animation: confettiFall linear forwards;
}

.modal-overlay.open .confetti {
  animation-duration: 1.8s;
}

.confetti-1 { left: 10%; background: #FF4757; animation-delay: 0.1s; transform: rotate(-20deg); }
.confetti-2 { left: 28%; background: #FFD700; animation-delay: 0.25s; width: 12px; height: 10px; transform: rotate(30deg); }
.confetti-3 { left: 50%; background: #2ED573; animation-delay: 0.05s; transform: rotate(15deg); }
.confetti-4 { left: 72%; background: #1E90FF; animation-delay: 0.3s;  width: 8px;  height: 18px; transform: rotate(-30deg); }
.confetti-5 { left: 88%; background: #A55EEA; animation-delay: 0.18s; transform: rotate(20deg); }

@keyframes confettiFall {
  0%   { top: -20px; opacity: 0; }
  15%  { opacity: 1; }
  100% { top: 110%; opacity: 0.8; }
}

.modal-icon {
  font-size: clamp(56px, 14vw, 80px);
  line-height: 1;
  margin-bottom: 8px;
  display: inline-block;
  animation: prizeBounce 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) 0.2s both;
}

@keyframes prizeBounce {
  0%   { transform: scale(0) rotate(-30deg); }
  60%  { transform: scale(1.2) rotate(10deg); }
  100% { transform: scale(1) rotate(0deg); }
}

.modal-title {
  font-size: clamp(22px, 5.5vw, 30px);
  font-weight: 900;
  color: #8b0000;
  letter-spacing: 2px;
  margin-bottom: 12px;
  text-shadow: 0 2px 0 rgba(255, 255, 255, 0.7);
}

.modal-prize {
  display: inline-block;
  font-size: clamp(26px, 6.5vw, 40px);
  font-weight: 900;
  padding: clamp(10px, 2.5vw, 16px) clamp(20px, 5vw, 32px);
  margin: 8px 0 14px;
  border-radius: 16px;
  background: linear-gradient(135deg, #ff2d3a, #c91623);
  color: #fff;
  letter-spacing: 3px;
  box-shadow:
    0 4px 0 #8b0000,
    0 8px 20px rgba(201, 22, 35, 0.4),
    inset 0 2px 4px rgba(255, 255, 255, 0.3);
  transform: scale(0);
  animation: prizePop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 0.45s forwards;
}

@keyframes prizePop {
  0%   { transform: scale(0) rotate(-10deg); }
  100% { transform: scale(1) rotate(0deg); }
}

.modal-desc {
  color: #8b6914;
  font-size: clamp(13px, 3.3vw, 15px);
  margin-bottom: 24px;
  letter-spacing: 1px;
}

.modal-btn {
  width: 100%;
  padding: clamp(14px, 3.6vw, 18px);
  border: none;
  border-radius: 14px;
  font-size: clamp(16px, 4vw, 20px);
  font-weight: 900;
  font-family: inherit;
  letter-spacing: 4px;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(180deg, #ffb300 0%, #ff8f00 50%, #e65100 100%);
  box-shadow:
    0 5px 0 #bf360c,
    0 10px 24px rgba(255, 111, 0, 0.45),
    inset 0 2px 4px rgba(255, 255, 255, 0.5);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.modal-btn:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
}

.modal-btn:active {
  transform: translateY(4px);
  box-shadow:
    0 1px 0 #bf360c,
    0 4px 10px rgba(255, 111, 0, 0.35),
    inset 0 2px 4px rgba(255, 255, 255, 0.5);
}

/* ========== 响应式断点 ========== */
/* 平板 */
@media (min-width: 768px) and (max-width: 1023px) {
  html { font-size: 15px; }
}

/* 手机 */
@media (max-width: 767px) {
  html { font-size: clamp(12px, 3.5vw, 15px); }
  .wheel-wrapper {
    width: clamp(280px, 88vw, 420px);
    height: clamp(280px, 88vw, 420px);
  }
}

/* 超大屏 */
@media (min-width: 1440px) {
  .wheel-wrapper {
    width: 520px;
    height: 520px;
  }
}

/* 横屏手机优化 */
@media (max-height: 500px) and (orientation: landscape) {
  .header { margin-bottom: 12px; }
  .title { font-size: 28px; letter-spacing: 3px; }
  .subtitle { display: none; }
  .wheel-wrapper {
    width: min(70vh, 400px);
    height: min(70vh, 400px);
  }
  .footer-tip { display: none; }
}

/* ===================================================== */
/* 【新增】邀请码 + 手机号校验 登录层                     */
/* ===================================================== */
.login-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 2, 20, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}
.login-overlay[hidden],
.login-overlay.done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.login-card {
  width: 100%;
  max-width: 420px;
  background: linear-gradient(160deg, #2a1238 0%, #1a0a28 100%);
  border-radius: 24px;
  padding: clamp(28px, 6vw, 40px) clamp(24px, 5.5vw, 36px);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.08),
    0 20px 60px rgba(255, 71, 87, 0.12),
    0 16px 40px rgba(0, 0, 0, 0.55);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.login-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 15% 10%, rgba(255,71,87,0.22), transparent 55%),
              radial-gradient(circle at 85% 90%, rgba(30,144,255,0.18), transparent 55%);
  pointer-events: none;
}
.login-card > * { position: relative; }

.login-icon {
  font-size: clamp(52px, 12vw, 68px);
  margin-bottom: 8px;
  animation: floatIcon 3s ease-in-out infinite;
}
@keyframes floatIcon {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}

.login-title {
  font-size: clamp(24px, 5.8vw, 30px);
  font-weight: 900;
  letter-spacing: 0.5px;
  background: linear-gradient(135deg, #FFD700, #FF6B81, #A55EEA);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 6px;
}
.login-sub {
  color: rgba(255, 255, 255, 0.6);
  font-size: clamp(12px, 3vw, 14px);
  margin-bottom: 24px;
}

.login-field {
  display: block;
  text-align: left;
  margin-bottom: 16px;
}
.login-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 7px;
  padding-left: 4px;
}
.login-input {
  width: 100%;
  padding: 14px 16px;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  outline: none;
  transition: border 0.2s, background 0.2s, box-shadow 0.2s;
  -webkit-appearance: none;
  appearance: none;
}
.login-input::placeholder {
  color: rgba(255, 255, 255, 0.28);
  font-weight: 500;
}
.login-input:focus {
  border-color: #FFD700;
  background: rgba(255, 215, 0, 0.06);
  box-shadow: 0 0 0 4px rgba(255, 215, 0, 0.1);
}
.login-input.error {
  border-color: #FF4757;
  background: rgba(255, 71, 87, 0.08);
  animation: shakeInput 0.35s ease;
}
@keyframes shakeInput {
  0%, 100% { transform: translateX(0); }
  20%      { transform: translateX(-6px); }
  40%      { transform: translateX(6px); }
  60%      { transform: translateX(-4px); }
  80%      { transform: translateX(4px); }
}

.login-error {
  text-align: left;
  color: #FF6B81;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 4px 10px;
  margin: -6px 0 10px;
}

.login-btn {
  width: 100%;
  margin-top: 8px;
  padding: 16px;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  font-weight: 900;
  letter-spacing: 2px;
  color: #fff;
  background: linear-gradient(135deg, #FF4757 0%, #FFD700 50%, #FF6B81 100%);
  background-size: 200% 200%;
  background-position: 0% 50%;
  box-shadow: 0 12px 30px rgba(255, 71, 87, 0.35);
  transition: transform 0.2s, box-shadow 0.2s, background-position 0.6s;
  position: relative;
  overflow: hidden;
}
.login-btn:hover {
  background-position: 100% 50%;
  transform: translateY(-1px);
  box-shadow: 0 16px 36px rgba(255, 215, 0, 0.3);
}
.login-btn:active {
  transform: translateY(2px) scale(0.98);
  box-shadow: 0 8px 18px rgba(255, 71, 87, 0.3);
}
.login-btn[disabled] {
  opacity: 0.65;
  cursor: not-allowed;
  filter: grayscale(0.2);
  transform: none;
}
.login-btn-text {
  position: relative;
  z-index: 1;
  font-size: clamp(14px, 3.6vw, 16px);
}

.login-btn.loading::after {
  content: "";
  width: 18px;
  height: 18px;
  border: 2.5px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  position: absolute;
  top: 50%;
  right: 18px;
  margin-top: -9px;
  animation: spinBtnLoader 0.7s linear infinite;
}
@keyframes spinBtnLoader { to { transform: rotate(360deg); } }

.login-tip {
  margin-top: 18px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.38);
}
