/* ============================================
   HHpoker - 德扑圈APP下载官网
   Custom Styles
   ============================================ */

/* --- CSS Variables / Theme --- */
:root {
  --primary: #4f46e5;       /* indigo-600 */
  --primary-dark: #4338ca;  /* indigo-700 */
  --primary-light: #6366f1; /* indigo-500 */
  --primary-bg: #eef2ff;    /* indigo-50 */
  --text-primary: #1e293b;  /* slate-800 */
  --text-secondary: #64748b; /* slate-500 */
  --bg-white: #ffffff;
  --bg-light: #f8fafc;
  --border: #e2e8f0;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 25px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 20px 40px -5px rgba(0, 0, 0, 0.1), 0 8px 16px -6px rgba(0, 0, 0, 0.05);
  --radius-sm: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.25rem;
  --radius-2xl: 1.5rem;
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Base --- */
html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  color: var(--text-primary);
  background: var(--bg-white);
  overflow-x: hidden;
}

/* --- Navbar --- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  transition: all var(--transition);
}

.navbar.scrolled {
  border-bottom-color: var(--border);
  box-shadow: var(--shadow-sm);
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--primary);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.navbar-brand .brand-icon {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.1rem;
}

.nav-link {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.925rem;
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  transition: all var(--transition);
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary);
  background: var(--primary-bg);
}

.nav-cta {
  background: var(--primary);
  color: white;
  font-weight: 600;
  font-size: 0.875rem;
  padding: 0.625rem 1.5rem;
  border-radius: var(--radius-lg);
  text-decoration: none;
  transition: all var(--transition);
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.3);
}

.nav-cta:hover {
  background: var(--primary-dark);
  box-shadow: 0 4px 16px rgba(79, 70, 229, 0.4);
  transform: translateY(-1px);
}

/* Mobile nav */
.mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 999;
  padding: 5rem 2rem 2rem;
  flex-direction: column;
  gap: 0.5rem;
}

.mobile-menu.open {
  display: flex;
}

.mobile-menu .nav-link {
  font-size: 1.125rem;
  padding: 0.875rem 1rem;
  display: block;
}

.mobile-menu .nav-cta {
  display: block;
  text-align: center;
  margin-top: 0.5rem;
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
  z-index: 1001;
}

.hamburger span {
  width: 26px;
  height: 2.5px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all var(--transition);
}

.hamburger.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.open span:nth-child(2) {
  opacity: 0;
}

.hamburger.open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* --- Hero --- */
.hero-section {
  padding: 8rem 0 6rem;
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, var(--primary-bg) 0%, var(--bg-white) 100%);
}

.hero-glow {
  position: absolute;
  top: -200px;
  right: -100px;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.12) 0%, transparent 70%);
  pointer-events: none;
}

.hero-glow-left {
  position: absolute;
  bottom: -150px;
  left: -150px;
  width: 450px;
  height: 450px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(79, 70, 229, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--primary-bg);
  color: var(--primary);
  font-weight: 600;
  font-size: 0.875rem;
  padding: 0.5rem 1.125rem;
  border-radius: 9999px;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(79, 70, 229, 0.15);
}

.hero-badge .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.5); }
}

.hero-title {
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
}

.hero-title .highlight {
  background: linear-gradient(135deg, var(--primary), #818cf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-desc {
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: var(--text-secondary);
  line-height: 1.75;
  max-width: 560px;
  margin-bottom: 2.5rem;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.875rem 2rem;
  border-radius: var(--radius-lg);
  transition: all var(--transition);
  cursor: pointer;
  text-decoration: none;
  border: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 16px rgba(79, 70, 229, 0.35);
}

.btn-primary:hover {
  background: var(--primary-dark);
  box-shadow: 0 6px 24px rgba(79, 70, 229, 0.45);
  transform: translateY(-2px);
}

.btn-outline {
  background: var(--bg-white);
  color: var(--primary);
  border: 1.5px solid var(--primary);
}

.btn-outline:hover {
  background: var(--primary-bg);
  transform: translateY(-2px);
}

.btn-white {
  background: white;
  color: var(--primary);
  box-shadow: var(--shadow-md);
}

.btn-white:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.hero-image-wrapper {
  position: relative;
}

.hero-image-wrapper img {
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-xl);
}

.hero-float-card {
  position: absolute;
  bottom: -20px;
  left: -30px;
  background: white;
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.hero-float-card .icon-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #f0fdf4;
  color: #16a34a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.hero-float-card .card-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.hero-float-card .card-value {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-primary);
}

/* --- Section Common --- */
.section {
  padding: 5rem 0;
}

.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 4rem;
}

.section-badge {
  display: inline-block;
  background: var(--primary-bg);
  color: var(--primary);
  font-weight: 600;
  font-size: 0.8rem;
  padding: 0.35rem 1rem;
  border-radius: 9999px;
  margin-bottom: 1rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.section-title {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.section-desc {
  font-size: 1.0625rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* --- Features --- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.feature-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 2rem;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  opacity: 0;
  transition: opacity var(--transition);
}

.feature-card:hover {
  border-color: transparent;
  box-shadow: var(--shadow-xl);
  transform: translateY(-4px);
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.25rem;
}

.feature-icon.indigo {
  background: #eef2ff;
  color: #4f46e5;
}

.feature-icon.green {
  background: #f0fdf4;
  color: #16a34a;
}

.feature-icon.amber {
  background: #fffbeb;
  color: #d97706;
}

.feature-icon.rose {
  background: #fff1f2;
  color: #e11d48;
}

.feature-icon.cyan {
  background: #ecfeff;
  color: #0891b2;
}

.feature-icon.purple {
  background: #faf5ff;
  color: #7c3aed;
}

.feature-card h3 {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 0.625rem;
  color: var(--text-primary);
}

.feature-card p {
  font-size: 0.925rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* --- Stats --- */
.stats-section {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  padding: 4rem 0;
  border-radius: var(--radius-2xl);
  margin: 3rem 0 5rem;
  position: relative;
  overflow: hidden;
}

.stats-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.stat-item {
  text-align: center;
  color: white;
  position: relative;
  z-index: 1;
}

.stat-number {
  font-size: clamp(1.75rem, 3vw, 2.75rem);
  font-weight: 900;
  letter-spacing: -0.02em;
}

.stat-label {
  font-size: 0.9rem;
  opacity: 0.85;
  margin-top: 0.25rem;
}

/* --- Testimonials --- */
.testimonial-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 2rem;
  transition: all var(--transition);
}

.testimonial-card:hover {
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

.testimonial-stars {
  color: #f59e0b;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.testimonial-text {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: 1.5rem;
  font-style: italic;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.testimonial-author img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
}

.testimonial-author .name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-primary);
}

.testimonial-author .role {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* --- FAQ --- */
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition);
  margin-bottom: 0.75rem;
}

.faq-item:hover {
  border-color: rgba(79, 70, 229, 0.3);
}

.faq-item.active {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.08);
}

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  background: var(--bg-white);
  border: none;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  text-align: left;
  gap: 1rem;
  transition: background var(--transition);
}

.faq-question:hover {
  background: var(--bg-light);
}

.faq-question i {
  font-size: 0.9rem;
  color: var(--text-secondary);
  transition: transform var(--transition);
  flex-shrink: 0;
}

.faq-item.active .faq-question i {
  transform: rotate(180deg);
  color: var(--primary);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease;
}

.faq-item.active .faq-answer {
  max-height: 300px;
}

.faq-answer-inner {
  padding: 0 1.5rem 1.25rem;
  font-size: 0.925rem;
  color: var(--text-secondary);
  line-height: 1.75;
}

/* --- CTA --- */
.cta-section {
  background: linear-gradient(135deg, var(--primary-bg) 0%, #f0fdf4 100%);
  border-radius: var(--radius-2xl);
  padding: 4rem 2rem;
  text-align: center;
  margin: 5rem 0;
  position: relative;
  overflow: hidden;
}

.cta-section .cta-title {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.cta-section .cta-desc {
  color: var(--text-secondary);
  max-width: 500px;
  margin: 0 auto 2rem;
  line-height: 1.7;
}

.cta-section .btn {
  font-size: 1rem;
  padding: 1rem 2.5rem;
}

/* --- Footer --- */
.footer {
  background: #0f172a;
  color: rgba(255, 255, 255, 0.7);
  padding: 4rem 0 2rem;
}

.footer-brand {
  font-size: 1.25rem;
  font-weight: 800;
  color: white;
  margin-bottom: 0.75rem;
}

.footer-desc {
  font-size: 0.875rem;
  line-height: 1.7;
  max-width: 280px;
  margin-bottom: 1.5rem;
}

.footer h5 {
  color: white;
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.footer a {
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  font-size: 0.875rem;
  display: block;
  margin-bottom: 0.75rem;
  transition: color var(--transition);
}

.footer a:hover {
  color: white;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 3rem;
  padding-top: 1.5rem;
  font-size: 0.825rem;
  color: rgba(255, 255, 255, 0.5);
}

.footer-social {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.footer-social a {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.95rem;
  transition: all var(--transition);
}

.footer-social a:hover {
  background: var(--primary);
  color: white;
}

/* --- Page Header (for secondary pages) --- */
.page-header {
  padding: 8rem 0 4rem;
  background: linear-gradient(180deg, var(--primary-bg) 0%, var(--bg-white) 100%);
  text-align: center;
}

.page-header h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  margin-bottom: 0.75rem;
}

.page-header p {
  color: var(--text-secondary);
  font-size: 1.0625rem;
  max-width: 500px;
  margin: 0 auto;
}

/* --- Features Page Extra --- */
.feature-detail-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-2xl);
  padding: 2.5rem;
  transition: all var(--transition);
  height: 100%;
}

.feature-detail-card:hover {
  box-shadow: var(--shadow-xl);
  border-color: transparent;
  transform: translateY(-3px);
}

.feature-detail-icon {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  margin-bottom: 1.5rem;
}

/* --- About Page --- */
.about-image-wrapper {
  position: relative;
}

.about-image-wrapper img {
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-xl);
  width: 100%;
}

.about-image-wrapper .experience-badge {
  position: absolute;
  bottom: -15px;
  right: -15px;
  background: var(--primary);
  color: white;
  padding: 1.25rem;
  border-radius: var(--radius-lg);
  text-align: center;
  box-shadow: var(--shadow-lg);
}

.value-card {
  text-align: center;
  padding: 2rem 1.5rem;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  transition: all var(--transition);
}

.value-card:hover {
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

.value-card .value-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  margin: 0 auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}

/* --- Contact Page --- */
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.875rem 1.125rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  transition: all var(--transition);
  outline: none;
  background: var(--bg-white);
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.contact-form label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.375rem;
  display: block;
}

.contact-info-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 1.75rem;
  transition: all var(--transition);
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.contact-info-card:hover {
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

.contact-info-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--primary-bg);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

/* --- Animations --- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .desktop-nav {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .hero-section {
    padding: 6rem 0 3rem;
    text-align: center;
  }

  .hero-desc {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-buttons {
    justify-content: center;
  }

  .hero-float-card {
    display: none;
  }

  .hero-image-wrapper {
    margin-top: 2.5rem;
  }

  .stats-section {
    border-radius: var(--radius-xl);
    margin: 2rem 0 3rem;
  }

  .section {
    padding: 3rem 0;
  }

  .cta-section {
    padding: 3rem 1.5rem;
    margin: 3rem 0;
    border-radius: var(--radius-xl);
  }

  .page-header {
    padding: 6rem 0 3rem;
  }

  .footer {
    padding: 3rem 0 1.5rem;
  }
}

/* --- Toast --- */
.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: #166534;
  color: white;
  padding: 1rem 1.5rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  font-weight: 600;
  font-size: 0.9rem;
  z-index: 9999;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.35s ease;
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* --- Smooth page transitions --- */
body {
  animation: pageIn 0.4s ease;
}

@keyframes pageIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
