﻿/* ===================================================
   HHPoker - 德扑圈 Landing Page
   Premium SaaS-Style Theme
   =================================================== */

/* --- CSS Variables / Design Tokens --- */
:root {
  --primary: #4f46e5;
  --primary-dark: #4338ca;
  --primary-light: #6366f1;
  --accent: #f59e0b;
  --bg-dark: #0f172a;
  --bg-section: #f8fafc;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --text-light: #94a3b8;
  --white: #ffffff;
  --border: #e2e8f0;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --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.1), 0 4px 10px -4px rgba(0,0,0,0.06);
  --shadow-xl: 0 20px 40px -5px rgba(0,0,0,0.12), 0 8px 16px -6px rgba(0,0,0,0.08);
  --radius-sm: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.25rem;
  --radius-2xl: 1.5rem;
  --radius-3xl: 2rem;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* --- Base Typography --- */
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  color: var(--text-primary);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* --- Selection Color --- */
::selection {
  background: rgba(79, 70, 229, 0.2);
  color: var(--primary);
}

/* --- Navbar --- */
#navbar {
  transition: var(--transition);
  z-index: 1000;
}

#navbar.scrolled {
  background: rgba(255, 255, 255, 0.92) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: var(--shadow-md);
}

.nav-link {
  position: relative;
  transition: var(--transition);
}

.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 2px;
  background: var(--primary);
  border-radius: 2px;
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

.nav-link:hover {
  color: var(--primary) !important;
}

/* --- Mobile Menu --- */
#mobile-menu {
  transition: max-height 0.4s ease, opacity 0.3s ease;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
}

#mobile-menu.open {
  max-height: 500px;
  opacity: 1;
}

/* --- Hero Section --- */
#hero {
  background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 40%, #ede9fe 100%);
  position: relative;
  overflow: hidden;
}

#hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.08) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

#hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.06) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.hero-image-wrapper {
  position: relative;
  transition: var(--transition);
}

.hero-image-wrapper:hover {
  transform: translateY(-8px);
}

.hero-image-wrapper::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: var(--radius-2xl);
  background: linear-gradient(135deg, var(--primary-light), var(--accent));
  z-index: -1;
  opacity: 0;
  filter: blur(20px);
  transition: opacity 0.5s ease;
}

.hero-image-wrapper:hover::after {
  opacity: 0.3;
}

/* --- Buttons --- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  background: var(--primary);
  color: var(--white);
  border-radius: var(--radius-lg);
  font-weight: 600;
  font-size: 1rem;
  transition: var(--transition);
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.35);
  cursor: pointer;
  border: none;
  text-decoration: none;
  white-space: nowrap;
}

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

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

.btn-secondary:hover {
  background: rgba(79, 70, 229, 0.05);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* --- Feature Cards --- */
.feature-card {
  transition: var(--transition);
  cursor: default;
}

.feature-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: var(--shadow-xl) !important;
}

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

.feature-card:hover .feature-icon {
  transform: scale(1.1);
}

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

.stat-item {
  transition: var(--transition);
}

.stat-item:hover {
  transform: translateY(-4px);
}

/* --- Testimonials --- */
.testimonial-card {
  transition: var(--transition);
}

.testimonial-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-xl) !important;
}

.testimonial-stars {
  color: var(--accent);
  letter-spacing: 2px;
}

/* --- FAQ Accordion --- */
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
  background: var(--white);
}

.faq-item:hover {
  border-color: var(--primary-light);
}

.faq-item summary {
  cursor: pointer;
  outline: none;
  list-style: none;
  transition: var(--transition);
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::marker {
  display: none;
  content: '';
}

.faq-arrow {
  transition: transform 0.3s ease;
}

.faq-item[open] .faq-arrow {
  transform: rotate(180deg);
}

.faq-item[open] {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
}

.faq-item[open] summary {
  color: var(--primary);
}

.faq-content {
  animation: faqSlideDown 0.35s ease;
}

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

/* --- CTA Section --- */
#cta {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 50%, #312e81 100%);
  position: relative;
  overflow: hidden;
}

#cta::before {
  content: '';
  position: absolute;
  top: -100px;
  right: -100px;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

#cta::after {
  content: '';
  position: absolute;
  bottom: -80px;
  left: -80px;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(255,255,255,0.06) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

/* --- Footer --- */
.footer-link {
  transition: var(--transition);
}

.footer-link:hover {
  color: var(--primary) !important;
  padding-left: 4px;
}

/* --- Scroll Reveal --- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* --- Pulse ring for CTA button --- */
@keyframes pulseRing {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.5);
  }
  70% {
    box-shadow: 0 0 0 20px rgba(255, 255, 255, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
  }
}

.btn-cta-pulse {
  animation: pulseRing 2s infinite;
}
@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-12px);
  }
}

.hero-float {
  animation: float 5s ease-in-out infinite;
}

/* --- Gradient text for hero heading --- */
.gradient-text {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 50%, #7c3aed 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* --- Responsive Tweaks --- */
@media (max-width: 768px) {
  .btn-primary,
  .btn-secondary {
    padding: 0.75rem 1.5rem;
    font-size: 0.9375rem;
  }

  .feature-card:hover {
    transform: translateY(-4px) scale(1.01);
  }

  .hero-float {
    animation: none;
  }
}

/* --- Custom Scrollbar --- */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-section);
}

::-webkit-scrollbar-thumb {
  background: var(--text-light);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-secondary);
}

/* --- Focus styles --- */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 4px;
}

/* --- Prefers Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .hero-float {
    animation: none;
  }

  .reveal {
    transition: none;
  }

  .btn-cta-pulse {
    animation: none;
  }
}
