/* ========================================
   HHpoker - 德扑圈 Landing Page
   Shared Styles (Tailwind + Custom)
   ======================================== */

/* ---------- Smooth Scroll ---------- */
html {
  scroll-behavior: smooth;
}

/* ---------- Body ---------- */
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  overflow-x: hidden;
}

/* ---------- Navbar ---------- */
.navbar {
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.navbar.scrolled {
  background: rgba(255, 255, 255, 0.98) !important;
  box-shadow: 0 2px 20px rgba(0,0,0,0.08);
}
.nav-link {
  position: relative;
  transition: color 0.3s ease;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 20px;
  height: 2px;
  background: #4f46e5;
  border-radius: 2px;
  transition: transform 0.3s ease;
}
.nav-link:hover::after,
.nav-link.active::after {
  transform: translateX(-50%) scaleX(1);
}
.nav-link.active {
  color: #4f46e5 !important;
}

/* ---------- Mobile Menu ---------- */
#mobile-menu {
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  max-height: 0;
  overflow: hidden;
  opacity: 0;
}
#mobile-menu.open {
  max-height: 400px;
  opacity: 1;
}

/* ---------- Card Hover Effects ---------- */
.hover-card {
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid transparent;
}
.hover-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(79, 70, 229, 0.12), 0 4px 12px rgba(0,0,0,0.06);
  border-color: rgba(79, 70, 229, 0.15);
}
.hover-card:hover .card-icon {
  transform: scale(1.15);
  color: #4338ca;
}
.card-icon {
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), color 0.35s ease;
  display: inline-block;
}

/* ---------- Buttons ---------- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #4f46e5, #6366f1);
  color: #fff;
  padding: 14px 36px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s ease;
  box-shadow: 0 6px 24px rgba(79, 70, 229, 0.3);
  border: none;
  cursor: pointer;
  text-decoration: none;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 32px rgba(79, 70, 229, 0.4);
  background: linear-gradient(135deg, #4338ca, #4f46e5);
}
.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 2px solid #4f46e5;
  color: #4f46e5;
  padding: 14px 36px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s ease;
  background: transparent;
  cursor: pointer;
  text-decoration: none;
}
.btn-outline:hover {
  background: #4f46e5;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(79, 70, 229, 0.25);
}

/* Download Buttons */
.btn-download-android {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, #16a34a, #22c55e);
  color: #fff;
  padding: 16px 40px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1.05rem;
  transition: all 0.3s ease;
  box-shadow: 0 6px 24px rgba(22, 163, 74, 0.35);
  border: none;
  cursor: pointer;
  text-decoration: none;
}
.btn-download-android:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 36px rgba(22, 163, 74, 0.45);
}
.btn-download-ios {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, #374151, #4b5563);
  color: #fff;
  padding: 16px 40px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1.05rem;
  transition: all 0.3s ease;
  box-shadow: 0 6px 24px rgba(55, 65, 81, 0.35);
  border: none;
  cursor: pointer;
  text-decoration: none;
}
.btn-download-ios:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 36px rgba(55, 65, 81, 0.45);
}

/* ---------- Hero ---------- */
.hero-section {
  background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 30%, #c7d2fe 70%, #f0f5ff 100%);
  position: relative;
  overflow: hidden;
}
.hero-section::before {
  content: '';
  position: absolute;
  top: -200px;
  right: -200px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(79,70,229,0.06) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}
.hero-section::after {
  content: '';
  position: absolute;
  bottom: -150px;
  left: -150px;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(99,102,241,0.05) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}
.hero-img-wrapper {
  position: relative;
}
.hero-img-wrapper::after {
  content: '';
  position: absolute;
  inset: -12px;
  border: 3px dashed rgba(79, 70, 229, 0.15);
  border-radius: 24px;
  pointer-events: none;
  animation: dashRotate 20s linear infinite;
}
@keyframes dashRotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ---------- Stats Count-Up ---------- */
.stat-number {
  font-variant-numeric: tabular-nums;
}

/* ---------- FAQ Accordion ---------- */
.faq-item {
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  margin-bottom: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
}
.faq-item.active {
  border-color: rgba(79, 70, 229, 0.3);
  box-shadow: 0 4px 20px rgba(79, 70, 229, 0.08);
}
.faq-question {
  width: 100%;
  text-align: left;
  padding: 20px 24px;
  background: #fff;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  color: #1f2937;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  transition: background 0.25s ease;
}
.faq-question:hover {
  background: #fafafe;
}
.faq-question i.fa-chevron-down {
  transition: transform 0.35s ease;
  font-size: 0.85rem;
  color: #9ca3af;
  flex-shrink: 0;
}
.faq-item.active .faq-question i.fa-chevron-down {
  transform: rotate(180deg);
  color: #4f46e5;
}
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.4s ease;
}
.faq-item.active .faq-answer {
  max-height: 400px;
}
.faq-answer-inner {
  padding: 0 24px 20px;
  color: #6b7280;
  line-height: 1.8;
  font-size: 0.95rem;
}

/* ---------- Contact Form ---------- */
.form-input {
  width: 100%;
  padding: 14px 18px;
  border: 1.5px solid #e5e7eb;
  border-radius: 12px;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  background: #f9fafb;
  outline: none;
  color: #1f2937;
}
.form-input:focus {
  border-color: #4f46e5;
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.08);
  background: #fff;
}
.form-input.error {
  border-color: #ef4444;
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.06);
}
textarea.form-input {
  resize: vertical;
  min-height: 140px;
}
.form-label {
  display: block;
  font-weight: 600;
  color: #374151;
  margin-bottom: 6px;
  font-size: 0.9rem;
}
.form-error-msg {
  color: #ef4444;
  font-size: 0.8rem;
  margin-top: 4px;
  display: none;
}
.form-error-msg.visible {
  display: block;
}

/* ---------- Page Hero (Subpages) ---------- */
.page-hero {
  background: linear-gradient(135deg, #1e1b4b, #312e81, #3730a3);
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute;
  top: -100px;
  right: -100px;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(99,102,241,0.2) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}
.page-hero::after {
  content: '';
  position: absolute;
  bottom: -80px;
  left: -80px;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(129,140,248,0.15) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

/* ---------- Back to Top Button ---------- */
#back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4f46e5, #6366f1);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  box-shadow: 0 6px 20px rgba(79, 70, 229, 0.35);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1000;
}
#back-to-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
#back-to-top:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 28px rgba(79, 70, 229, 0.45);
}

/* ---------- Star Rating ---------- */
.star-rating {
  color: #f59e0b;
  letter-spacing: 2px;
}

/* ---------- Testimonial Card ---------- */
.testimonial-card {
  position: relative;
}
.testimonial-card::before {
  content: '\201C';
  position: absolute;
  top: 16px;
  right: 24px;
  font-size: 4rem;
  color: rgba(79, 70, 229, 0.06);
  font-family: serif;
  line-height: 1;
  pointer-events: none;
}

/* ---------- System Requirement Table ---------- */
.req-table th {
  background: #f8fafc;
  font-weight: 600;
  color: #374151;
  text-align: left;
  padding: 12px 16px;
  border-radius: 8px 8px 0 0;
}
.req-table td {
  padding: 12px 16px;
  border-bottom: 1px solid #f3f4f6;
  color: #6b7280;
}

/* ---------- Step Number ---------- */
.step-number {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4f46e5, #6366f1);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.2rem;
  flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(79, 70, 229, 0.3);
}

/* ---------- Club Game Type Card ---------- */
.game-type-card {
  transition: all 0.35s ease;
  border: 2px solid transparent;
}
.game-type-card:hover {
  border-color: rgba(79, 70, 229, 0.2);
  transform: translateY(-6px);
  box-shadow: 0 16px 36px rgba(79, 70, 229, 0.1);
}

/* ---------- QR Code Placeholder ---------- */
.qr-placeholder {
  width: 200px;
  height: 200px;
  background: #fff;
  border: 2px dashed #d1d5db;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9ca3af;
  font-size: 0.9rem;
  text-align: center;
  padding: 16px;
}

/* ---------- Club Stat Counter ---------- */
.club-stat-item {
  transition: transform 0.3s ease;
}
.club-stat-item:hover {
  transform: scale(1.05);
}

/* ---------- FAQ Quick Links ---------- */
.faq-quick-link {
  display: block;
  padding: 10px 16px;
  border-radius: 8px;
  transition: all 0.25s ease;
  color: #4b5563;
  text-decoration: none;
  font-size: 0.95rem;
}
.faq-quick-link:hover {
  background: rgba(79, 70, 229, 0.06);
  color: #4f46e5;
}

/* ---------- Responsive Tweaks ---------- */
@media (max-width: 768px) {
  .hero-section {
    text-align: center;
  }
  .hero-img-wrapper::after {
    display: none;
  }
  #back-to-top {
    bottom: 20px;
    right: 20px;
    width: 42px;
    height: 42px;
    font-size: 1rem;
  }
  .btn-primary,
  .btn-outline {
    padding: 12px 28px;
    font-size: 0.9rem;
  }
}

/* ---------- Animation: Fade Up ---------- */
.fade-up {
  animation: fadeUp 0.7s ease forwards;
}
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---------- Toast Notification ---------- */
.toast {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(-120px);
  background: #1f2937;
  color: #fff;
  padding: 12px 28px;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 500;
  z-index: 9999;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}
.toast.show {
  transform: translateX(-50%) translateY(0);
}
.toast.success {
  background: #059669;
}
.toast.error {
  background: #dc2626;
}
