/* ============================================================
   千代狐徒平台 · Global Styles
   Background: chiyo_backgroud.jpg (3200×1800 anime illustration)
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  color: #fff;
  font-family: 'Inter', 'Noto Sans TC', sans-serif;
  overflow-x: hidden;
  min-height: 100vh;
}

/* ── Background: anime illustration + dark overlay ─────────── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image: url('../chiyo_backgroud.jpg');
  background-size: cover;
  background-position: center top;
  background-attachment: fixed;
}

/* Dark gradient overlay for readability */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    160deg,
    rgba(2, 6, 23, 0.72) 0%,
    rgba(4, 15, 45, 0.78) 40%,
    rgba(8, 20, 55, 0.82) 100%
  );
}

/* ── Scrollbar ── */
::-webkit-scrollbar        { width: 4px; }
::-webkit-scrollbar-track  { background: rgba(2,6,23,0.5); }
::-webkit-scrollbar-thumb  { background: #3b82f6; border-radius: 2px; }

/* ── Glass card ── */
.glass {
  background: rgba(8, 20, 60, 0.62);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(147, 197, 253, 0.20);
}
.glass-hover:hover {
  background: rgba(12, 30, 80, 0.75);
  border-color: rgba(147, 197, 253, 0.40);
  transition: all 0.2s;
}

/* ── Section backgrounds ── */
.section-glass {
  background: rgba(4, 12, 40, 0.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid rgba(147, 197, 253, 0.10);
  border-bottom: 1px solid rgba(147, 197, 253, 0.10);
}

/* ── Glow helpers ── */
.glow-purple { box-shadow: 0 0 20px rgba(59,130,246,0.5); }
.glow-pink   { box-shadow: 0 0 20px rgba(236,72,153,0.45); }
.glow-gold   { box-shadow: 0 0 20px rgba(245,158,11,0.45); }

/* ── Gradient text ── */
.gradient-text {
  background: linear-gradient(135deg, #93c5fd, #38bdf8, #e0f2fe);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.gradient-text-gold {
  background: linear-gradient(135deg, #f59e0b, #fde68a);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.gradient-text-rainbow {
  background: linear-gradient(135deg, #60a5fa, #38bdf8, #f59e0b, #34d399);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Text shadow for headings over background ── */
h1, h2, h3, .heading-shadow {
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);
}

/* ── Blur lock ── */
.blur-locked { filter: blur(8px); pointer-events: none; user-select: none; }

/* ── Shimmer ── */
.shimmer-bg {
  background: linear-gradient(90deg, rgba(59,130,246,0) 0%, rgba(59,130,246,0.18) 50%, rgba(59,130,246,0) 100%);
  background-size: 200% 100%;
  animation: shimmer-move 2s infinite;
}
@keyframes shimmer-move {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── Layout ── */
.bottom-nav-safe { padding-bottom: env(safe-area-inset-bottom, 0px); }
.page-content    { padding-bottom: 80px; }
@media (min-width: 768px) { .page-content { padding-bottom: 20px; } }

/* ── Buttons ── */
.btn-primary {
  background: linear-gradient(135deg, #1e40af, #3b82f6);
  transition: all 0.2s;
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 24px rgba(59,130,246,0.6);
}
.btn-pink {
  background: linear-gradient(135deg, #9d174d, #ec4899);
  transition: all 0.2s;
}
.btn-pink:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(236,72,153,0.5);
}

/* ── CTA glow pulse ── */
@keyframes cta-pulse {
  0%, 100% { box-shadow: 0 0 20px rgba(59,130,246,0.5), 0 0 40px rgba(59,130,246,0.2); }
  50%       { box-shadow: 0 0 35px rgba(59,130,246,0.8), 0 0 70px rgba(59,130,246,0.35); }
}
.btn-cta-glow {
  animation: cta-pulse 2.5s ease-in-out infinite;
}

/* ── Level badges ── */
.level-badge-1 { background: linear-gradient(135deg, #0284c7, #38bdf8); }
.level-badge-2 { background: linear-gradient(135deg, #1d4ed8, #3b82f6); }
.level-badge-3 { background: linear-gradient(135deg, #6d28d9, #a855f7); }
.level-badge-4 { background: linear-gradient(135deg, #b45309, #fbbf24); }
.level-badge-5 { background: linear-gradient(135deg, #c2410c, #fb923c); box-shadow: 0 0 10px rgba(251,146,60,0.5); }

/* ── Fox level colours ── */
.fox-level-3 { color: #93c5fd; text-shadow: 0 0 8px rgba(147,197,253,0.9); }
.fox-level-4 { color: #fcd34d; text-shadow: 0 0 8px rgba(245,158,11,0.8); }
.fox-level-5 { color: #f9a8d4; text-shadow: 0 0 12px rgba(236,72,153,0.9); }

/* ── Progress bar ── */
.progress-bar-inner {
  background: linear-gradient(90deg, #1d4ed8, #3b82f6, #38bdf8);
  border-radius: 999px;
  transition: width 1s ease;
  position: relative;
  overflow: hidden;
}
.progress-bar-inner::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.35) 50%, transparent 100%);
  animation: shimmer-move 1.5s infinite;
}

/* ── Card hover ── */
.card-hover { transition: transform 0.2s, box-shadow 0.2s; }
.card-hover:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 36px rgba(29,78,216,0.4);
}

/* ── Streak day ── */
.streak-day { transition: all 0.2s; }

/* ── Tab active ── */
.tab-active {
  background: linear-gradient(135deg, #1d4ed8, #3b82f6);
  box-shadow: 0 2px 12px rgba(59,130,246,0.45);
}

/* ── Toast ── */
.toast {
  position: fixed;
  bottom: 90px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  animation: toast-in 0.3s ease;
}
@keyframes toast-in {
  from { opacity: 0; transform: translateX(-50%) translateY(20px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ── Top nav ── */
.nav-top {
  background: rgba(2, 8, 30, 0.82);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid rgba(147, 197, 253, 0.15);
}

/* ── Hero glow ── */
.hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
}

/* ── Benefit card lock overlay ── */
.benefit-lock-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  background: rgba(2, 6, 20, 0.42);
  border-radius: inherit;
}

/* ── Featured member frame ── */
.member-frame-gold   { background: linear-gradient(135deg, #f59e0b, #d97706); }
.member-frame-silver { background: linear-gradient(135deg, #9ca3af, #6b7280); }
.member-frame-bronze { background: linear-gradient(135deg, #b45309, #78350f); }

/* ── Divider ── */
.section-divider {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(147,197,253,0.25), transparent);
  margin: 0;
}

/* ── Checkmark ── */
.checkmark-anim { animation: checkmark 0.4s ease forwards; }
@keyframes checkmark {
  from { transform: scale(0); }
  to   { transform: scale(1); }
}

/* ── Avatar upload hover ── */
.avatar-upload-overlay {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s;
  cursor: pointer;
}
.avatar-wrapper:hover .avatar-upload-overlay { opacity: 1; }

/* ── Home logo float ── */
.home-float-btn {
  position: fixed;
  top: 72px;
  left: 16px;
  z-index: 45;
  background: rgba(4, 12, 40, 0.82);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(147, 197, 253, 0.25);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 16px;
}
.home-float-btn:hover {
  background: rgba(29, 78, 216, 0.5);
  border-color: rgba(147, 197, 253, 0.5);
  transform: scale(1.1);
}

/* ── Responsive layout helpers ── */
.landing-container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px;
}
@media (min-width: 768px) {
  .landing-container { padding: 0 32px; }
}
@media (min-width: 1024px) {
  .landing-container { padding: 0 48px; }
}
