* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-color: #667eea;
  --primary-dark: #5a6fd8;
  --secondary-color: #764ba2;
  --accent-color: #f093fb;
  --text-primary: #2d3748;
  --text-secondary: #6b7280;
  --background: #ffffff;
  --background-alt: #f7fafc;
  --border-color: #e2e8f0;
  --shadow: 0 12px 30px -15px rgba(51, 65, 85, 0.5);
  --shadow-lg: 0 30px 50px -20px rgba(79, 70, 229, 0.4);
  --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

body {
  font-family: "Noto Serif SC", "Microsoft YaHei", serif;
  background: var(--background);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  /* 移动端优化 */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* 防止移动端双击缩放 */
  touch-action: manipulation;
}

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid var(--border-color);
  backdrop-filter: blur(12px);
  z-index: 20;
  transition: all 0.3s ease;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 21;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--primary-color);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.nav-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(8px, 8px);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(8px, -8px);
}

.nav-links {
  display: flex;
  gap: 24px;
}

.nav-link {
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 600;
  position: relative;
  transition: color 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary-color);
}

.nav-link.active::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 100%;
  height: 2px;
  background: var(--gradient-primary);
  border-radius: 999px;
}

main {
  margin-top: 72px;
}

.hero-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-primary);
  color: #fff;
  overflow: hidden;
}

.hero-background {
  position: absolute;
  inset: 0;
  opacity: 0.75;
}

.floating-shapes .shape {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  filter: blur(0);
}

.shape-1 {
  width: 120px;
  height: 120px;
  top: 18%;
  left: 12%;
}

.shape-2 {
  width: 160px;
  height: 160px;
  bottom: 20%;
  right: 15%;
}

.shape-3 {
  width: 90px;
  height: 90px;
  top: 60%;
  left: 25%;
}

.hero-content {
  position: relative;
  text-align: center;
  max-width: 840px;
  padding: 40px 24px;
}

.hero-title .title-main {
  font-family: "Ma Shan Zheng", cursive;
  font-size: clamp(2.8rem, 4vw, 4rem);
  letter-spacing: 0.08em;
}

.hero-title .title-sub {
  font-size: 1.4rem;
  font-weight: 500;
  opacity: 0.85;
}

.hero-description {
  margin: 24px auto 36px;
  font-size: 1.1rem;
  opacity: 0.85;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
}

.btn-primary,
.btn-secondary,
.btn-text {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  /* 移动端触摸优化 */
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.btn-primary {
  background: #fff;
  color: var(--primary-color);
  box-shadow: var(--shadow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-secondary {
  background: transparent;
  border: 2px solid rgba(255, 255, 255, 0.6);
  color: #fff;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
}

.btn-text {
  background: none;
  color: var(--primary-color);
  padding: 8px 14px;
  border-radius: 12px;
}

.btn-text:hover {
  background: rgba(102, 126, 234, 0.1);
}

.btn-text.danger {
  color: #ef4444;
}

.tools-section {
  padding: 96px 0;
  background: var(--background-alt);
}

.section-container {
  max-width: 1170px;
  margin: 0 auto;
  padding: 0 24px;
}

.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-header h2 {
  font-size: 2.4rem;
  margin-bottom: 12px;
}

.section-header p {
  color: var(--text-secondary);
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
}

.tool-card {
  position: relative;
  padding: 32px;
  border-radius: 24px;
  background: #fff;
  border: 1px solid rgba(102, 126, 234, 0.12);
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
  overflow: hidden;
}

.tool-card:hover:not(.coming-soon) {
  transform: translateY(-10px);
  box-shadow: var(--shadow-lg);
}

.tool-card.featured {
  border: 1px solid rgba(102, 126, 234, 0.35);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.97), rgba(244, 247, 255, 0.95));
}

.card-badge {
  position: absolute;
  top: 20px;
  right: 28px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
  background: var(--gradient-secondary);
  letter-spacing: 0.08em;
}

.tool-icon {
  text-align: center;
  margin-bottom: 24px;
}

.icon-wrapper {
  width: 90px;
  height: 90px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-primary);
  border-radius: 24px;
  color: #fff;
  font-size: 2.5rem;
  transition: transform 0.3s ease;
  box-shadow: 0 18px 30px -12px rgba(102, 126, 234, 0.5);
}

.tool-card:hover .icon-wrapper {
  transform: scale(1.08) rotate(4deg);
}

.tool-content h3 {
  font-size: 1.45rem;
  margin-bottom: 12px;
}

.tool-content p {
  color: var(--text-secondary);
  margin-bottom: 20px;
  min-height: 90px;
}

.tool-features {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.feature-tag {
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(102, 126, 234, 0.1);
  color: var(--primary-dark);
  font-size: 0.85rem;
}

.card-arrow {
  position: absolute;
  bottom: 24px;
  right: 24px;
  font-size: 1.5rem;
  color: var(--primary-color);
  transition: transform 0.3s ease;
}

.tool-card:hover .card-arrow {
  transform: translateX(6px);
}

.coming-soon {
  opacity: 0.75;
  cursor: default;
}

.coming-soon-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--text-secondary);
  font-size: 1.1rem;
}

.stats-section {
  background: var(--gradient-primary);
  padding: 80px 0;
  color: #fff;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
  text-align: center;
}

.stat-item {
  padding: 24px 16px;
}

.stat-number {
  font-size: 3rem;
  font-weight: 700;
  font-family: "Ma Shan Zheng", cursive;
}

.stat-label {
  opacity: 0.85;
  margin-top: 12px;
}

.server-time-banner {
  margin: 36px auto 0;
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: 520px;
  padding: 18px 24px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow: 0 18px 42px -30px rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(8px);
}

.server-time-icon {
  font-size: 1.8rem;
}

.server-time-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.server-time-label {
  font-weight: 600;
  letter-spacing: 0.04em;
}

.server-time-value {
  font-size: 1.05rem;
  font-family: "Noto Serif SC", "Microsoft YaHei", serif;
}

.about-section {
  padding: 96px 0;
  background: #fff;
}

.about-card {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 24px;
  padding: 48px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(102, 126, 234, 0.15);
}

.about-card h2 {
  font-size: 2.2rem;
  margin-bottom: 24px;
}

.about-card p + p {
  margin-top: 16px;
}

.footer {
  background: var(--text-primary);
  color: #fff;
  padding: 60px 0 30px;
}

.mini-footer {
  padding: 40px 0;
}

.footer-container {
  max-width: 1170px;
  margin: 0 auto;
  padding: 0 24px;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 32px;
  margin-bottom: 30px;
}

.footer-section h4 {
  color: var(--accent-color);
  margin-bottom: 12px;
}

.footer-bottom {
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 20px;
  color: rgba(255, 255, 255, 0.75);
}

.footer-bottom a {
  color: #cbd5f5;
  text-decoration: underline;
  margin: 0 6px;
}

.footer-beian {
  margin-top: 12px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
}

.footer-beian a {
  color: inherit;
  text-decoration: none;
}

.footer-beian a:hover {
  text-decoration: underline;
}

.container {
  max-width: 1170px;
  margin: 0 auto;
  padding: 0 24px;
}

.subpage-header {
  margin-top: 72px;
  padding: 64px 0 40px;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.18), rgba(118, 75, 162, 0.18));
}

.subpage-header h1 {
  font-size: 2.6rem;
  margin-bottom: 12px;
}

.subpage-header p {
  color: var(--text-secondary);
}

.back-link {
  display: inline-block;
  margin-bottom: 16px;
  color: var(--primary-dark);
  text-decoration: none;
  font-weight: 600;
}

.back-link:hover {
  text-decoration: underline;
}

.hidden {
  display: none !important;
}

/* 平板设备 */
@media (max-width: 960px) {
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    flex-direction: column;
    padding: 20px 24px;
    gap: 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.3s ease, opacity 0.3s ease, visibility 0.3s ease;
    z-index: 20;
  }

  .nav-links.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav-links .nav-link {
    padding: 16px 0;
    border-bottom: 1px solid var(--border-color);
  }

  .nav-links .nav-link:last-child {
    border-bottom: none;
  }

  .tools-grid {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  }

  .about-card {
    padding: 32px;
  }

  .section-container {
    padding: 0 20px;
  }

  .hero-content {
    padding: 40px 20px;
  }
}

/* 移动设备 */
@media (max-width: 640px) {
  .nav-container {
    height: 64px;
    padding: 0 16px;
  }

  .nav-logo {
    font-size: 1.2rem;
    gap: 8px;
  }

  .logo-text {
    font-size: 1.1rem;
  }

  main {
    margin-top: 64px;
  }

  .hero-section {
    min-height: 90vh;
    padding: 20px 0;
  }

  .hero-content {
    padding: 30px 16px;
  }

  .hero-title .title-main {
    font-size: 2rem;
    line-height: 1.2;
  }

  .hero-title .title-sub {
    font-size: 1.1rem;
    margin-top: 8px;
  }

  .hero-description {
    font-size: 0.95rem;
    margin: 20px auto 28px;
    line-height: 1.6;
  }

  .hero-actions {
    flex-direction: column;
    width: 100%;
    gap: 12px;
  }

  .btn-primary,
  .btn-secondary {
    width: 100%;
    padding: 14px 24px;
    font-size: 1rem;
  }

  .tools-section {
    padding: 60px 0;
  }

  .section-container {
    padding: 0 16px;
  }

  .section-header {
    margin-bottom: 32px;
  }

  .section-header h2 {
    font-size: 1.8rem;
  }

  .tools-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .tool-card {
    padding: 24px 20px;
  }

  .tool-content p {
    min-height: auto;
    font-size: 0.95rem;
  }

  .tool-content h3 {
    font-size: 1.25rem;
  }

  .stats-section {
    padding: 60px 0;
  }

  .stats-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 0 16px;
  }

  .stat-item {
    padding: 20px 12px;
  }

  .stat-number {
    font-size: 2.5rem;
  }

  .stat-label {
    font-size: 0.9rem;
  }

  .server-time-banner {
    margin: 24px 16px 0;
    padding: 14px 18px;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .server-time-content {
    width: 100%;
  }

  .about-section {
    padding: 60px 0;
  }

  .about-card {
    padding: 24px 20px;
  }

  .about-card h2 {
    font-size: 1.8rem;
  }

  .footer {
    padding: 40px 0 24px;
  }

  .footer-container {
    padding: 0 16px;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .subpage-header {
    padding: 48px 0 32px;
  }

  .subpage-header h1 {
    font-size: 1.8rem;
  }

  .subpage-header p {
    font-size: 0.9rem;
  }
}

/* 小屏手机 */
@media (max-width: 375px) {
  .hero-title .title-main {
    font-size: 1.75rem;
  }

  .section-header h2 {
    font-size: 1.6rem;
  }

  .tool-card {
    padding: 20px 16px;
  }

  .icon-wrapper {
    width: 70px;
    height: 70px;
    font-size: 2rem;
  }
}

