/* ===== Reset & Base ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --primary: #4F46E5;
  --primary-dark: #3730A3;
  --primary-light: #818CF8;
  --secondary: #7C3AED;
  --accent: #06B6D4;
  --dark: #1E1B4B;
  --gray-900: #111827;
  --gray-700: #374151;
  --gray-500: #6B7280;
  --gray-300: #D1D5DB;
  --gray-100: #F3F4F6;
  --white: #FFFFFF;
  --success: #10B981;
  --warning: #F59E0B;
  --danger: #EF4444;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 4px 24px rgba(79,70,229,0.10);
  --shadow-lg: 0 8px 40px rgba(79,70,229,0.15);
  --gradient: linear-gradient(135deg, #4F46E5, #7C3AED);
  --gradient-light: linear-gradient(135deg, #EEF2FF, #F5F3FF);
  --anim-fast: 0.3s ease;
  --anim-smooth: 0.6s cubic-bezier(0.22, 1, 0.36, 1);
  --anim-bounce: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  --font: 'PingFang SC','Microsoft YaHei','Helvetica Neue',Arial,sans-serif;
}
/* ===== Page Load Animation ===== */
@keyframes pageFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
body { animation: pageFadeIn 0.5s ease-out; }

html { scroll-behavior: smooth; }
body { font-family: var(--font); color: var(--gray-700); background: var(--white); line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
ul { list-style: none; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 28px; border-radius: var(--radius-sm);
  font-size: 15px; font-weight: 600; font-family: var(--font);
  cursor: pointer; border: none; transition: all 0.3s ease;
}
.btn-primary { background: var(--gradient); color: var(--white); box-shadow: 0 4px 14px rgba(79,70,229,0.35); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(79,70,229,0.45); }
.btn-outline { background: transparent; color: var(--primary); border: 2px solid var(--primary); }
.btn-outline:hover { background: var(--primary); color: var(--white); }
.btn-white { background: var(--white); color: var(--primary); }
.btn-white:hover { background: var(--gray-100); }
.btn-lg { padding: 16px 36px; font-size: 17px; }
/* ===== Button Ripple & Micro-interactions ===== */
.btn-primary { position: relative; overflow: hidden; }
.btn-primary::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 0; height: 0;
  border-radius: 50%;
  background: rgba(255,255,255,0.25);
  transform: translate(-50%, -50%);
  transition: width 0.6s ease-out, height 0.6s ease-out;
  pointer-events: none;
}
.btn-primary:hover::after { width: 300px; height: 300px; }
.btn-primary:active { transform: translateY(0) scale(0.98); }
.btn-outline { transition: all var(--anim-fast); }
.btn-outline:hover { background: var(--gradient); color: var(--white); border-color: transparent; transform: translateY(-2px); box-shadow: 0 4px 14px rgba(79,70,229,0.3); }
.btn-white:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(79,70,229,0.2); }
.btn-lg { transition: all var(--anim-smooth); }

.btn-sm { padding: 8px 18px; font-size: 13px; }
.btn-block { width: 100%; justify-content: center; }

/* ===== Header ===== */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: rgba(255,255,255,0.95); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--gray-100); transition: all 0.3s;
}
.header.scrolled { box-shadow: var(--shadow); }
.header .container { display: flex; align-items: center; justify-content: space-between; height: 70px; }
.logo { display: flex; align-items: center; gap: 4px; font-weight: 700; font-size: 18px; color: var(--dark); }
.logo img { height: 36px; width: auto; }
.nav { display: flex; align-items: center; gap: 32px; }
.nav a { font-size: 15px; font-weight: 500; color: var(--gray-700); transition: color 0.2s; position: relative; }
.nav a:hover, .nav a.active { color: var(--primary); }
.nav a.active { font-weight: 700; }
.nav a.active::after { height: 3px; background: var(--gradient); box-shadow: 0 0 8px rgba(79,70,229,0.4); }
.nav a::after {
  content: ''; position: absolute; bottom: -4px; left: 0; right: 0;
  height: 2px; background: var(--gradient); border-radius: 1px;
  transform: scaleX(0); transition: transform 0.2s;
}
.nav a:hover::after, .nav a.active::after { transform: scaleX(1); }
.nav-right { display: flex; align-items: center; gap: 12px; }

/* ===== Mobile Menu ===== */
.menu-toggle { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 4px; background: none; border: none; }
.menu-toggle span { display: block; width: 24px; height: 2px; background: var(--dark); border-radius: 2px; transition: all 0.3s; }
.menu-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px,5px); }
.menu-toggle.active span:nth-child(2) { opacity: 0; }
.menu-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px,-5px); }

/* ===== Hero ===== */
.hero {
  padding: 140px 0 80px; background: linear-gradient(-45deg, #EEF2FF, #F5F3FF, #E0E7FF, #EDE9FE);
  background-size: 400% 400%;
  animation: heroGradient 15s ease infinite;
  position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; top: -50%; right: -20%;
  width: 600px; height: 600px; border-radius: 50%;
  background: rgba(79,70,229,0.05); pointer-events: none;
}
.hero::after {
  content: ''; position: absolute; bottom: -30%; left: -10%;
  width: 400px; height: 400px; border-radius: 50%;
  background: rgba(124,58,237,0.05); pointer-events: none;
}
.hero .container { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; position: relative; z-index: 1; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(79,70,229,0.1); color: var(--primary);
  padding: 6px 16px; border-radius: 20px; font-size: 13px; font-weight: 600;
  margin-bottom: 20px;
}
.hero h1 { font-size: 48px; font-weight: 800; color: var(--dark); line-height: 1.2; margin-bottom: 20px; }
.hero h1 span { background: var(--gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.hero p { font-size: 18px; color: var(--gray-500); margin-bottom: 32px; max-width: 480px; }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }
.hero-image { display: flex; justify-content: center; align-items: center; }
.hero-image-wrap {
  width: 100%; max-width: 400px; aspect-ratio: 1;
  background: var(--gradient); border-radius: 24px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-lg); position: relative;
  overflow: hidden;
}
.hero-image-wrap .usb-icon { font-size: 120px; }
.hero-image-wrap .glow {
    animation: glowPulse 3s ease-in-out infinite;
  position: absolute; width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, transparent 70%);
  animation: pulse 3s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity: 0.5; } 50% { opacity: 1; } }

/* ===== Sections ===== */
.section { padding: 80px 0; }
.section-dark {
  background: linear-gradient(160deg, var(--dark) 0%, #312E81 50%, var(--dark) 100%);
  color: var(--white);
  position: relative;
}
.section-dark::before {
  content: "";
  position: absolute;
  top: -1px; left: 0; right: 0;
  height: 80px;
  background: linear-gradient(to bottom, transparent, rgba(30,27,75,0.08));
  pointer-events: none;
}
.section-light { background: var(--gradient-light); }
.section-header { text-align: center; margin-bottom: 56px; }
.section-header h2 { font-size: 36px; font-weight: 800; color: var(--dark); margin-bottom: 12px; }
.section-dark .section-header h2 { color: var(--white); }
.section-header p { font-size: 17px; color: var(--gray-500); max-width: 560px; margin: 0 auto; }
.section-dark .section-header p { color: rgba(255,255,255,0.6); }
.section-tag {
  display: inline-block; background: rgba(79,70,229,0.1); color: var(--primary);
  padding: 4px 14px; border-radius: 20px; font-size: 12px; font-weight: 600;
  margin-bottom: 12px; text-transform: uppercase; letter-spacing: 1px;
}

/* ===== Features ===== */
.features-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; }
.feature-card {
  background: var(--white); border-radius: var(--radius); padding: 32px;
  box-shadow: var(--shadow); transition: all 0.3s; border: 1px solid rgba(79,70,229,0.06);
}
.feature-card:hover { transform: translateY(-8px); box-shadow: 0 16px 48px rgba(79,70,229,0.18); }
.feature-icon {
  width: 56px; height: 56px; border-radius: 14px;
  background: var(--gradient-light); display: flex;
  align-items: center; justify-content: center; margin-bottom: 20px;
  font-size: 26px;
}
.feature-card h3 { font-size: 18px; font-weight: 700; color: var(--dark); margin-bottom: 8px; }
.feature-card p { font-size: 14px; color: var(--gray-500); line-height: 1.7; }

/* ===== Product ===== */
.product-showcase { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.product-image { display: flex; justify-content: center; }
.product-image-content {
  width: 300px; height: 300px; background: var(--gradient);
  border-radius: 24px; display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-lg); position: relative;
}
.product-image-content .usb-icon { font-size: 100px; }
.product-info h2 { font-size: 36px; font-weight: 800; color: var(--dark); margin-bottom: 16px; }
.product-info .price { font-size: 44px; font-weight: 900; color: var(--primary); margin-bottom: 20px; position: relative; display: inline-block; }
.product-info .price::before {
  content: "";
  position: absolute;
  top: -6px; left: -10px; right: -10px; bottom: -6px;
  background: linear-gradient(135deg, rgba(79,70,229,0.08), rgba(124,58,237,0.05));
  border-radius: 12px;
  z-index: -1;
}
.product-info .price small { font-size: 16px; font-weight: 400; color: var(--gray-500); }
.product-info p { font-size: 16px; color: var(--gray-500); margin-bottom: 24px; line-height: 1.8; }
.product-list { margin-bottom: 24px; }
.product-list li {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 0; border-bottom: 1px solid var(--gray-100);
  font-size: 15px; color: var(--gray-700);
}
.product-list li:last-child { border-bottom: none; }
.product-list li::before { content: '✓'; color: var(--success); font-weight: 700; }

/* ===== Tools Grid ===== */
.tools-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 20px; }
.tool-card {
  background: var(--white); border-radius: var(--radius); padding: 24px;
  text-align: center; box-shadow: var(--shadow); border: 1px solid rgba(79,70,229,0.06);
  transition: all 0.3s;
}
.tool-card:hover { transform: translateY(-8px); box-shadow: 0 16px 40px rgba(79,70,229,0.15); }
.tool-card .tool-icon { font-size: 40px; margin-bottom: 12px; }
.tool-card h4 { font-size: 16px; font-weight: 700; color: var(--dark); margin-bottom: 4px; }
.tool-card p { font-size: 13px; color: var(--gray-500); }

/* ===== Pricing / CTA ===== */
.cta-box {
  background: var(--gradient); border-radius: 24px; padding: 64px;
  text-align: center; position: relative; overflow: hidden;
}
.cta-box::before {
  content: ''; position: absolute; top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: radial-gradient(circle at 30% 50%, rgba(255,255,255,0.08) 0%, transparent 50%);
}
.cta-box h2 { font-size: 36px; font-weight: 800; color: var(--white); margin-bottom: 12px; position: relative; }
.cta-box p { font-size: 17px; color: rgba(255,255,255,0.8); margin-bottom: 32px; position: relative; }
.cta-box .btn-white:hover { background: rgba(255,255,255,0.9); }

/* ===== Testimonials ===== */
.testimonials-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; }
.testimonial-card {
  background: var(--white); border-radius: var(--radius); padding: 32px;
  box-shadow: var(--shadow); border: 1px solid rgba(79,70,229,0.06);
}
.testimonial-card .stars { color: var(--warning); font-size: 14px; margin-bottom: 12px; }
.testimonial-card p { font-size: 14px; color: var(--gray-500); line-height: 1.7; margin-bottom: 16px; font-style: italic; }
.testimonial-card .author { display: flex; align-items: center; gap: 12px; }
.testimonial-card .author-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--gradient-light); display: flex;
  align-items: center; justify-content: center;
  font-size: 16px; font-weight: 700; color: var(--primary);
}
.testimonial-card .author-name { font-size: 14px; font-weight: 600; color: var(--dark); }
.testimonial-card .author-title { font-size: 12px; color: var(--gray-500); }

/* ===== Tutorials ===== */
.tutorials-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; }
.tutorial-card {
  background: var(--white); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); transition: all 0.3s; border: 1px solid rgba(79,70,229,0.06);
}
.tutorial-card:hover { transform: translateY(-8px); box-shadow: 0 16px 40px rgba(79,70,229,0.15); }
.tutorial-card .tutorial-thumb {
  height: 180px; background: var(--gradient-light);
  display: flex; align-items: center; justify-content: center;
  font-size: 40px; position: relative;
}
.tutorial-card .tutorial-thumb .play-btn {
  width: 50px; height: 50px; border-radius: 50%;
  background: rgba(255,255,255,0.9); display: flex;
  align-items: center; justify-content: center; font-size: 20px;
  color: var(--primary); transition: all 0.3s;
}
.tutorial-card:hover .play-btn { transform: scale(1.1); }
.tutorial-card .tutorial-body { padding: 20px; }
.tutorial-card h4 { font-size: 16px; font-weight: 700; color: var(--dark); margin-bottom: 6px; }
.tutorial-card p { font-size: 14px; color: var(--gray-500); margin-bottom: 12px; }
.tutorial-card .tutorial-meta { font-size: 12px; color: var(--gray-300); display: flex; gap: 16px; }

/* ===== Stats ===== */
.stats-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 24px; text-align: center; }
.stat-item h3 { font-size: 42px; font-weight: 800; color: var(--white); }
.stat-item p { font-size: 15px; color: rgba(255,255,255,0.6); margin-top: 4px; }

/* ===== Footer ===== */
.footer { background: var(--gray-900); color: rgba(255,255,255,0.6); padding: 60px 0 30px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer-brand .logo { color: var(--white); margin-bottom: 12px; }
.footer-brand p { font-size: 14px; line-height: 1.8; max-width: 300px; }
.footer-col h4 { color: var(--white); font-size: 15px; font-weight: 700; margin-bottom: 16px; }
.footer-col a { display: block; font-size: 14px; padding: 6px 0; transition: color 0.2s; }
.footer-col a:hover { color: var(--primary-light); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 20px; text-align: center; font-size: 13px; }

/* ===== Auth Pages (Login / Register) ===== */
.auth-section { padding: 120px 0 60px; min-height: 100vh; display: flex; align-items: center; background: var(--gradient-light); }
.auth-box {
  max-width: 420px; margin: 0 auto; background: var(--white);
  border-radius: var(--radius); padding: 40px; box-shadow: var(--shadow-lg);
  width: 100%;
}
.auth-box h2 { text-align: center; font-size: 24px; font-weight: 800; color: var(--dark); margin-bottom: 8px; }
.auth-box .auth-subtitle { text-align: center; font-size: 14px; color: var(--gray-500); margin-bottom: 28px; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: 14px; font-weight: 600; color: var(--gray-700); margin-bottom: 6px; }
.form-group input {
  width: 100%; padding: 12px 16px; border: 2px solid var(--gray-100);
  border-radius: var(--radius-sm); font-size: 15px; font-family: var(--font);
  transition: border-color 0.2s; outline: none;
}
.form-group input:focus { border-color: var(--primary); }
.form-group .input-error { border-color: var(--danger); }
.form-error { color: var(--danger); font-size: 13px; margin-top: 4px; display: none; }
.form-success { color: var(--success); font-size: 13px; margin-top: 4px; display: none; }
.auth-link { text-align: center; font-size: 14px; color: var(--gray-500); margin-top: 20px; }
.auth-link a { color: var(--primary); font-weight: 600; }
.auth-link a:hover { text-decoration: underline; }

/* ===== Download Page ===== */
.download-section { padding: 120px 0 60px; background: var(--gradient-light); min-height: 100vh; }
.download-card {
  max-width: 600px; margin: 0 auto; background: var(--white);
  border-radius: var(--radius); padding: 48px; box-shadow: var(--shadow);
  text-align: center;
}
.download-card .dl-icon { font-size: 64px; margin-bottom: 20px; }
.download-card h2 { font-size: 28px; font-weight: 800; color: var(--dark); margin-bottom: 12px; }
.download-card p { font-size: 15px; color: var(--gray-500); margin-bottom: 28px; }
.download-card .btn { margin-bottom: 16px; }
.download-card .dl-info { font-size: 13px; color: var(--gray-300); margin-top: 20px; }

/* ===== Order Page ===== */
.order-section { padding: 120px 0 60px; background: var(--gradient-light); min-height: 100vh; }
.order-box {
  max-width: 640px; margin: 0 auto; background: var(--white);
  border-radius: var(--radius); padding: 40px; box-shadow: var(--shadow);
}
.order-box h2 { font-size: 24px; font-weight: 800; color: var(--dark); margin-bottom: 24px; }
.order-summary { background: var(--gradient-light); border-radius: var(--radius-sm); padding: 24px; margin-bottom: 24px; }
.order-summary .row { display: flex; justify-content: space-between; padding: 8px 0; font-size: 15px; }
.order-summary .row.total { border-top: 2px solid var(--gray-300); margin-top: 8px; padding-top: 16px; font-weight: 700; font-size: 18px; color: var(--dark); }
.order-summary .row.total .amount { color: var(--primary); }

/* ===== Toast / Messages ===== */
.toast {
  position: fixed; top: 80px; right: 20px; z-index: 9999;
  padding: 16px 24px; border-radius: var(--radius-sm);
  color: var(--white); font-size: 14px; font-weight: 500;
  box-shadow: var(--shadow-lg); transform: translateX(120%);
  transition: transform 0.3s ease; max-width: 360px;
}
.toast.show { transform: translateX(0); }
.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }
.toast.info { background: var(--primary); }

/* ===== User Menu ===== */
.user-menu { position: relative; }
.user-menu .user-trigger {
  display: flex; align-items: center; gap: 8px; cursor: pointer;
  padding: 6px 12px; border-radius: var(--radius-sm);
  background: var(--gradient-light); font-size: 14px; font-weight: 600; color: var(--primary);
}
.user-dropdown {
  position: absolute; top: 100%; right: 0; margin-top: 8px;
  background: var(--white); border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg); min-width: 160px;
  padding: 8px; display: none; z-index: 100;
}
.user-dropdown.show { display: block; }
.user-dropdown a {
  display: block; padding: 10px 14px; font-size: 14px;
  border-radius: 6px; transition: background 0.2s;
}
.user-dropdown a:hover { background: var(--gray-100); }
.user-dropdown .logout-btn { color: var(--danger); }

/* ===== Responsive ===== */
@media (max-width: 992px) {
  .hero .container { grid-template-columns: 1fr; text-align: center; }
  .hero p { margin: 0 auto 32px; }
  .hero-actions { justify-content: center; }
  .hero h1 { font-size: 36px; }
  .features-grid { grid-template-columns: repeat(2,1fr); }
  .product-showcase { grid-template-columns: 1fr; text-align: center; }
  .product-info .product-list { text-align: left; }
  .tools-grid { grid-template-columns: repeat(2,1fr); }
  .testimonials-grid { grid-template-columns: 1fr; }
  .tutorials-grid { grid-template-columns: repeat(2,1fr); }
  .stats-grid { grid-template-columns: repeat(2,1fr); }
  .footer-grid { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 768px) {
  .nav { display: none; }
  .nav.mobile-open { display: flex; flex-direction: column; position: fixed; top: 70px; left: 0; right: 0; background: var(--white); padding: 20px; box-shadow: var(--shadow-lg); gap: 16px; }
  .menu-toggle { display: flex; }
  .hero { padding: 100px 0 60px; }
  .hero h1 { font-size: 28px; }
  .hero p { font-size: 16px; }
  .hero-image-wrap { max-width: 280px; }
  .hero-image-wrap .usb-icon { font-size: 80px; }
  .section { padding: 60px 0; }
  .section-header h2 { font-size: 28px; }
  .features-grid { grid-template-columns: 1fr; }
  .tools-grid { grid-template-columns: 2fr; }
  .tutorials-grid { grid-template-columns: 1fr; }
  .cta-box { padding: 40px 24px; }
  .cta-box h2 { font-size: 24px; }
  .product-info h2 { font-size: 28px; }
  .product-info .price { font-size: 32px; }
  .footer-grid { grid-template-columns: 1fr; }
  .auth-box { padding: 24px; }
  .nav-right .btn-sm { padding: 6px 14px; font-size: 12px; }
  .order-box { padding: 24px; }
}
@media (max-width: 480px) {
  .hero h1 { font-size: 24px; }
  .tools-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 2fr; }
  .hero-actions { flex-direction: column; align-items: center; }
}

/* ===== Animations ===== */
@keyframes heroGradient {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
@keyframes glowPulse {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.08); }
}
@keyframes ctaShimmer {
  0%, 100% { transform: translateX(-10%) translateY(-10%); }
  50% { transform: translateX(10%) translateY(10%); }
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}
.section, .hero, .order-section, .download-section, .auth-section, .footer {
  animation: fadeInUp 0.6s ease both;
}
.hero-text { animation-delay: 0.1s; }
.hero-image { animation-delay: 0.3s; }
.features-grid .feature-card:nth-child(-n+3) { animation-delay: 0.1s; }
.features-grid .feature-card:nth-child(n+4) { animation-delay: 0.2s; }
.footer { animation-delay: 0.3s; }
