/* ===== CSS Variables ===== */
:root {
  --primary: #165DFF;
  --primary-dark: #0F4CD5;
  --primary-light: #4080FF;
  --gray-50: #F5F7FA;
  --gray-100: #E5E9F2;
  --gray-200: #D9D9D9;
  --gray-300: #999999;
  --gray-400: #666666;
  --gray-500: #333333;
  --white: #ffffff;
  --shadow-card: 0 4px 12px rgba(22, 93, 255, 0.08);
  --shadow-hover: 0 8px 24px rgba(22, 93, 255, 0.15);
  --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.1);
  --font-family: 'Microsoft YaHei', 'SimHei', 'PingFang SC', sans-serif;
  --navbar-height: 64px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  color: var(--gray-500);
  background: var(--white);
  letter-spacing: 0.2px;
  line-height: 1.6;
}

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

img {
  max-width: 100%;
  height: auto;
}

ul {
  list-style: none;
}

/* ===== Layout ===== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

@media (min-width: 640px) {
  .container { padding: 0 24px; }
}

@media (min-width: 1024px) {
  .container { padding: 0 32px; }
}

/* ===== Buttons ===== */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: var(--white);
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 500;
  font-size: 16px;
  border: none;
  cursor: pointer;
  transition: all 0.3s;
  text-decoration: none;
  box-shadow: 0 4px 15px rgba(22, 93, 255, 0.3);
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(22, 93, 255, 0.4);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--primary);
  color: var(--primary);
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 500;
  font-size: 16px;
  background: transparent;
  cursor: pointer;
  transition: all 0.3s;
  text-decoration: none;
}

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

/* ===== Card ===== */
.card {
  background: var(--white);
  border-radius: 12px;
  box-shadow: var(--shadow-card);
  padding: 24px;
  transition: all 0.3s;
}

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

/* ===== Icon Box ===== */
.icon-box {
  width: 64px;
  height: 64px;
  border-radius: 8px;
  background: rgba(22, 93, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

/* ===== Section Title ===== */
.section-title {
  font-size: 32px;
  font-weight: bold;
  color: var(--gray-500);
  text-align: center;
  margin-bottom: 48px;
}

@media (min-width: 768px) {
  .section-title { font-size: 36px; }
}

/* ===== Navbar ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  height: var(--navbar-height);
  transition: all 0.3s;
}

.navbar.scrolled {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
}

.navbar-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.navbar-logo img {
  height: 40px;
}

.navbar-logo span {
  font-size: 20px;
  font-weight: bold;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

@media (min-width: 1024px) {
  .nav-links { display: flex; }
}

.nav-link {
  position: relative;
  padding: 8px 0;
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-500);
  transition: color 0.2s;
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
}

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

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--primary), var(--primary-dark));
  transition: width 0.3s;
}

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

.nav-link.active {
  color: var(--primary);
}

.navbar-cta {
  display: none;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: var(--white);
  padding: 10px 24px;
  border-radius: 8px;
  font-weight: 500;
  transition: all 0.3s;
  box-shadow: 0 4px 15px rgba(22, 93, 255, 0.3);
  text-decoration: none;
}

@media (min-width: 1024px) {
  .navbar-cta { display: block; }
}

.navbar-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(22, 93, 255, 0.4);
}

/* More Dropdown */
.more-dropdown {
  position: relative;
}

.more-dropdown .dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 8px;
  background: var(--white);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  border-radius: 8px;
  padding: 8px 0;
  min-width: 180px;
  z-index: 50;
}

.more-dropdown.open .dropdown-menu {
  display: block;
}

.dropdown-menu a {
  display: block;
  padding: 8px 16px;
  font-size: 14px;
  color: var(--gray-400);
  transition: all 0.2s;
  text-decoration: none;
}

.dropdown-menu a:hover {
  color: var(--primary);
  background: var(--gray-50);
}

.dropdown-menu a.active {
  color: var(--primary);
  background: rgba(22, 93, 255, 0.05);
}

/* Mobile Menu */
.mobile-menu-btn {
  display: block;
  padding: 8px;
  border: none;
  background: none;
  cursor: pointer;
  border-radius: 8px;
  transition: background 0.2s;
}

.mobile-menu-btn:hover {
  background: var(--gray-50);
}

@media (min-width: 1024px) {
  .mobile-menu-btn { display: none; }
}

.mobile-menu {
  display: none;
  position: absolute;
  top: var(--navbar-height);
  left: 0;
  right: 0;
  background: var(--white);
  border-top: 1px solid var(--gray-100);
  padding: 16px 0;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  z-index: 40;
}

.mobile-menu.open {
  display: block;
  animation: fadeIn 0.3s ease-out;
}

.mobile-menu a {
  display: block;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-400);
  transition: all 0.2s;
  text-decoration: none;
}

.mobile-menu a:hover,
.mobile-menu a.active {
  color: var(--primary);
  background: rgba(22, 93, 255, 0.05);
}

.mobile-menu .mobile-cta {
  display: block;
  margin: 16px;
  text-align: center;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: var(--white);
  padding: 12px;
  border-radius: 8px;
  font-weight: 500;
}

/* ===== Footer ===== */
.footer {
  background: linear-gradient(180deg, #1a1a2e 0%, #16213e 100%);
  color: var(--white);
  padding: 60px 0 30px;
  position: relative;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(22, 93, 255, 0.5), transparent);
}

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

@media (min-width: 768px) {
  .footer-content { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 1024px) {
  .footer-content { grid-template-columns: repeat(4, 1fr); }
}

.footer-section h4 {
  font-size: 18px;
  margin-bottom: 24px;
  color: var(--white);
  position: relative;
  display: inline-block;
}

.footer-section h4::after {
  content: '';
  display: block;
  width: 50px;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--primary-dark));
  margin: 10px 0 0;
  border-radius: 2px;
}

.footer-section ul li {
  margin-bottom: 12px;
  transition: all 0.3s;
}

.footer-section ul li:hover {
  transform: translateX(5px);
}

.footer-section a {
  color: #ccc;
  text-decoration: none;
  transition: all 0.3s;
  display: inline-block;
}

.footer-section a:hover {
  color: var(--white);
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.footer-company-info p {
  color: #ccc;
  font-size: 14px;
  margin-bottom: 10px;
}

.footer-company-info .email {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #ccc;
  font-size: 14px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 30px;
  text-align: center;
  color: #999;
  font-size: 14px;
}

.footer-bottom a {
  color: #999;
  text-decoration: none;
  transition: color 0.3s;
}

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

/* ===== Floating Contact ===== */
.floating-contact-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 50;
  width: 56px;
  height: 56px;
  background: var(--primary);
  color: var(--white);
  border: none;
  border-radius: 50%;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
}

.floating-contact-btn:hover {
  background: var(--primary-dark);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
  transform: scale(1.1);
}

.floating-contact-btn .pulse-dot {
  position: absolute;
  top: -4px;
  right: 0;
  width: 12px;
  height: 12px;
  background: #22c55e;
  border-radius: 50%;
  border: 2px solid var(--white);
  animation: pulse 2s infinite;
}

.floating-contact-popup {
  display: none;
  position: fixed;
  bottom: 96px;
  right: 24px;
  z-index: 50;
  width: 320px;
  background: var(--white);
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  animation: slideUp 0.3s ease-out;
}

.floating-contact-popup.open {
  display: block;
}

.floating-contact-popup .popup-header {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: var(--white);
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.floating-contact-popup .popup-header h3 {
  font-size: 18px;
  font-weight: bold;
}

.floating-contact-popup .popup-header p {
  font-size: 12px;
  opacity: 0.9;
}

.floating-contact-popup .popup-close {
  background: none;
  border: none;
  color: var(--white);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: background 0.2s;
}

.floating-contact-popup .popup-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.floating-contact-popup .popup-body {
  padding: 24px;
}

.floating-contact-popup .popup-body p {
  font-size: 14px;
  color: var(--gray-400);
  margin-bottom: 16px;
}

.floating-contact-popup .popup-feature {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: var(--gray-400);
  margin-bottom: 12px;
}

.floating-contact-popup .popup-feature .dot {
  width: 8px;
  height: 8px;
  background: #22c55e;
  border-radius: 50%;
  flex-shrink: 0;
}

.floating-contact-popup .popup-footer {
  padding: 12px 24px;
  background: var(--gray-50);
  text-align: center;
}

.floating-contact-popup .popup-footer p {
  font-size: 12px;
  color: var(--gray-300);
}

.floating-contact-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(0, 0, 0, 0.5);
}

.floating-contact-backdrop.open {
  display: block;
}

/* ===== Animations ===== */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

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

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(1.2); }
}

.animate-fade-in {
  animation: fadeIn 0.5s ease-out;
}

.animate-slide-up {
  animation: slideUp 0.6s ease-out;
}

.animate-float {
  animation: float 3s ease-in-out infinite;
}

.animate-pulse {
  animation: pulse 2s infinite;
}

/* ===== Scroll margin for sections ===== */
.scroll-mt {
  scroll-margin-top: calc(var(--navbar-height) + 24px);
}
