/* ===== Variables ===== */
:root {
  --primary: #1a7a4c;
  --primary-dark: #145c3a;
  --primary-light: #2ecc71;
  --accent: #f4a024;
  --accent-dark: #d4880f;
  --court-blue: #2c5282;
  --bg: #fafbfc;
  --bg-dark: #0f1419;
  --text: #1a202c;
  --text-muted: #64748b;
  --white: #ffffff;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 12px 48px rgba(0, 0, 0, 0.12);
  --radius: 12px;
  --radius-lg: 20px;
  --transition: 0.3s ease;
  --font: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
}

/* ===== Reset ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

ul {
  list-style: none;
}

.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== Header ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  transition: var(--transition);
}

.header.scrolled {
  box-shadow: var(--shadow);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--primary);
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 1.1rem;
}

.nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav a {
  font-size: 0.95rem;
  color: var(--text-muted);
  transition: var(--transition);
  position: relative;
}

.nav a:hover,
.nav a.active {
  color: var(--primary);
}

.nav a.active::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--primary);
  border-radius: 1px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 50px;
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: var(--transition);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: var(--white);
  box-shadow: 0 4px 16px rgba(26, 122, 76, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(26, 122, 76, 0.45);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: var(--white);
}

.btn-accent {
  background: linear-gradient(135deg, var(--accent), #ffc857);
  color: var(--text);
  box-shadow: 0 4px 16px rgba(244, 160, 36, 0.35);
}

.btn-accent:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(244, 160, 36, 0.45);
}

.btn-lg {
  padding: 16px 36px;
  font-size: 1.05rem;
}

.mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.mobile-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: var(--transition);
}

/* ===== Hero ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 72px;
  overflow: hidden;
  background: linear-gradient(160deg, #e8f5ee 0%, #fafbfc 50%, #fff8eb 100%);
}

.hero-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.hero-bg::before {
  content: "";
  position: absolute;
  top: -20%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(26, 122, 76, 0.12) 0%, transparent 70%);
  border-radius: 50%;
}

.hero-bg::after {
  content: "";
  position: absolute;
  bottom: -10%;
  left: -5%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(244, 160, 36, 0.1) 0%, transparent 70%);
  border-radius: 50%;
}

.hero-content {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  padding: 80px 0;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(26, 122, 76, 0.1);
  color: var(--primary);
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 24px;
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 20px;
  color: var(--text);
}

.hero h1 span {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-desc {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin-bottom: 36px;
  max-width: 520px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.court-card {
  position: relative;
  width: 100%;
  max-width: 420px;
  aspect-ratio: 1;
  background: linear-gradient(145deg, #1a7a4c, #2ecc71);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.court-lines {
  position: absolute;
  inset: 12%;
  border: 3px solid rgba(255, 255, 255, 0.6);
  border-radius: 8px;
}

.court-lines::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 2px;
  background: rgba(255, 255, 255, 0.5);
}

.court-lines::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  background: rgba(255, 255, 255, 0.5);
}

.pickleball {
  width: 80px;
  height: 80px;
  background: radial-gradient(circle at 30% 30%, #ffc857, var(--accent));
  border-radius: 50%;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  animation: float 3s ease-in-out infinite;
  position: relative;
  z-index: 2;
}

.pickleball::before {
  content: "";
  position: absolute;
  inset: 15%;
  border-radius: 50%;
  background: repeating-conic-gradient(
    from 0deg,
    transparent 0deg 30deg,
    rgba(0, 0, 0, 0.08) 30deg 60deg
  );
}

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-16px) rotate(10deg); }
}

.floating-tag {
  position: absolute;
  background: var(--white);
  padding: 12px 20px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  font-size: 0.9rem;
  font-weight: 600;
  animation: float 4s ease-in-out infinite;
}

.floating-tag.tag-1 {
  top: 10%;
  right: -5%;
  animation-delay: -1s;
}

.floating-tag.tag-2 {
  bottom: 15%;
  left: -8%;
  animation-delay: -2s;
}

/* ===== Sections ===== */
section {
  padding: 100px 0;
}

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

.section-label {
  display: inline-block;
  color: var(--primary);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 12px;
}

.section-header h2 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 800;
  margin-bottom: 16px;
}

.section-header p {
  color: var(--text-muted);
  font-size: 1.05rem;
}

/* ===== About ===== */
.about {
  background: var(--white);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.about-info h3 {
  font-size: 1.5rem;
  margin-bottom: 20px;
  color: var(--primary);
}

.about-info p {
  color: var(--text-muted);
  margin-bottom: 16px;
  font-size: 1.05rem;
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 32px;
}

.stat-item {
  text-align: center;
  padding: 24px 16px;
  background: var(--bg);
  border-radius: var(--radius);
}

.stat-item strong {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 4px;
}

.stat-item span {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.about-card {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: var(--white);
  padding: 48px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.about-card h4 {
  font-size: 1.3rem;
  margin-bottom: 24px;
}

.about-card ul li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
  font-size: 0.95rem;
  opacity: 0.95;
}

.about-card ul li::before {
  content: "✓";
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
}

/* ===== Services ===== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.service-card {
  background: var(--white);
  padding: 36px 28px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  transition: var(--transition);
  border: 1px solid rgba(0, 0, 0, 0.04);
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.service-icon {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, rgba(26, 122, 76, 0.1), rgba(46, 204, 113, 0.15));
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 20px;
}

.service-card h3 {
  font-size: 1.15rem;
  margin-bottom: 12px;
}

.service-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ===== CTA Banner ===== */
.cta-banner {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: var(--white);
  padding: 80px 0;
  text-align: center;
}

.cta-banner h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin-bottom: 16px;
}

.cta-banner p {
  opacity: 0.9;
  margin-bottom: 32px;
  font-size: 1.05rem;
}

/* ===== Download Page ===== */
.download-hero {
  padding-top: 120px;
  padding-bottom: 80px;
  background: linear-gradient(160deg, #e8f5ee 0%, #fafbfc 100%);
  text-align: center;
}

.download-hero h1 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 800;
  margin-bottom: 16px;
}

.download-hero p {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 560px;
  margin: 0 auto 40px;
}

.download-card {
  max-width: 480px;
  margin: 0 auto;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 48px 40px;
}

.app-icon {
  width: 96px;
  height: 96px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: 22px;
  margin: 0 auto 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: var(--white);
  box-shadow: 0 8px 24px rgba(26, 122, 76, 0.3);
}

.download-card h2 {
  font-size: 1.5rem;
  margin-bottom: 8px;
}

.download-card .version {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 32px;
}

.download-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 18px 32px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: var(--white);
  border-radius: 50px;
  font-size: 1.1rem;
  font-weight: 700;
  transition: var(--transition);
  margin-bottom: 24px;
}

.download-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(26, 122, 76, 0.4);
}

.download-btn svg {
  width: 24px;
  height: 24px;
}

.download-info {
  text-align: left;
  padding-top: 24px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.download-info li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.download-info li::before {
  content: "•";
  color: var(--primary);
  font-weight: bold;
}

.download-steps {
  padding: 80px 0;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  max-width: 900px;
  margin: 0 auto;
}

.step-item {
  text-align: center;
}

.step-num {
  width: 48px;
  height: 48px;
  background: var(--primary);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.2rem;
  margin: 0 auto 16px;
}

.step-item h3 {
  font-size: 1.05rem;
  margin-bottom: 8px;
}

.step-item p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.qrcode-section {
  background: var(--white);
  padding: 60px 0;
  text-align: center;
}

.qrcode-box {
  display: inline-block;
  padding: 24px;
  background: var(--white);
  border: 2px solid rgba(0, 0, 0, 0.06);
  border-radius: var(--radius);
  margin-top: 24px;
}

.qrcode-placeholder {
  width: 180px;
  height: 180px;
  background: var(--bg);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  margin: 0 auto;
}

/* ===== Contact ===== */
.contact {
  background: var(--white);
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.contact-item {
  text-align: center;
  padding: 36px 24px;
  background: var(--bg);
  border-radius: var(--radius-lg);
  transition: var(--transition);
}

.contact-item:hover {
  box-shadow: var(--shadow);
}

.contact-icon {
  width: 52px;
  height: 52px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  margin: 0 auto 16px;
}

.contact-item h3 {
  font-size: 1rem;
  margin-bottom: 8px;
}

.contact-item p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ===== Footer ===== */
.footer {
  background: var(--bg-dark);
  color: rgba(255, 255, 255, 0.7);
  padding: 60px 0 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-brand .logo {
  color: var(--white);
  margin-bottom: 16px;
}

.footer-brand p {
  font-size: 0.9rem;
  line-height: 1.8;
}

.footer-col h4 {
  color: var(--white);
  font-size: 0.95rem;
  margin-bottom: 20px;
}

.footer-col a {
  display: block;
  font-size: 0.9rem;
  padding: 6px 0;
  transition: var(--transition);
}

.footer-col a:hover {
  color: var(--primary-light);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.85rem;
}

.footer-bottom a {
  color: rgba(255, 255, 255, 0.5);
  transition: var(--transition);
}

.footer-bottom a:hover {
  color: var(--primary-light);
}

/* ===== Responsive ===== */
@media (max-width: 968px) {
  .hero-content,
  .about-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

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

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

  .hero-visual {
    order: -1;
  }

  .court-card {
    max-width: 300px;
  }

  .floating-tag {
    display: none;
  }

  .services-grid,
  .contact-grid,
  .steps-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
  }

  .about-stats {
    grid-template-columns: repeat(3, 1fr);
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

@media (max-width: 768px) {
  .header-inner > .btn-primary {
    display: none;
  }

  .nav {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    padding: 24px;
    gap: 20px;
    box-shadow: var(--shadow);
    transform: translateY(-120%);
    opacity: 0;
    transition: var(--transition);
  }

  .nav.open {
    transform: translateY(0);
    opacity: 1;
  }

  .mobile-toggle {
    display: flex;
  }

  .about-stats {
    grid-template-columns: 1fr;
  }

  section {
    padding: 64px 0;
  }
}
