/* ============================================================
   0082 - &#24503;&#24030;&#20043;&#26143; (Texas Star) Space Sci-Fi Theme
   Color: #7c3aed (Starry Purple) + #0a0a1a (Deep Space Black)
   ============================================================ */

/* ---------- CSS Variables ---------- */
:root {
  --purple-primary: #7c3aed;
  --purple-glow: #a78bfa;
  --purple-dark: #5b21b6;
  --purple-light: #c4b5fd;
  --space-black: #0a0a1a;
  --space-dark: #0f0f2a;
  --space-card: rgba(15, 15, 42, 0.7);
  --space-card-border: rgba(124, 58, 237, 0.2);
  --text-primary: #e2e8f0;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --star-color: #ffffff;
  --glow-shadow: 0 0 20px rgba(124, 58, 237, 0.4), 0 0 60px rgba(124, 58, 237, 0.15);
  --glow-shadow-strong: 0 0 30px rgba(124, 58, 237, 0.6), 0 0 80px rgba(124, 58, 237, 0.25);
  --transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background-color: var(--space-black);
  color: var(--text-primary);
  font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', system-ui, -apple-system, sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

/* ---------- Starfield Background ---------- */
#starfield {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* CSS-only animated stars layer */
.stars-layer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.star {
  position: absolute;
  background: var(--star-color);
  border-radius: 50%;
  animation: twinkle var(--twinkle-duration) ease-in-out infinite;
  animation-delay: var(--twinkle-delay);
  opacity: 0;
}

@keyframes twinkle {
  0%, 100% { opacity: 0.2; transform: scale(1); }
  50%      { opacity: 1; transform: scale(1.3); }
}

/* ---------- Shooting Star ---------- */
.shooting-star {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.shooting-star::before {
  content: '';
  position: absolute;
  width: 3px;
  height: 3px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 0 6px 2px rgba(124, 58, 237, 0.8);
  animation: shoot 4s linear infinite;
  opacity: 0;
}

.shooting-star::after {
  content: '';
  position: absolute;
  width: 80px;
  height: 1px;
  background: linear-gradient(90deg, rgba(124, 58, 237, 0.8), transparent);
  animation: shootTrail 4s linear infinite;
  opacity: 0;
}

@keyframes shoot {
  0%   { top: 10%; left: 80%; opacity: 0; }
  5%   { top: 15%; left: 75%; opacity: 1; }
  10%  { top: 25%; left: 65%; opacity: 0; }
  100% { top: 25%; left: 65%; opacity: 0; }
}

@keyframes shootTrail {
  0%   { top: 10%; left: 80%; opacity: 0; }
  5%   { top: 15%; left: 75%; opacity: 0.8; }
  10%  { top: 25%; left: 65%; opacity: 0; }
  100% { top: 25%; left: 65%; opacity: 0; }
}

/* ---------- Planet / Sphere ---------- */
.planet {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.planet-purple {
  width: 120px;
  height: 120px;
  background: radial-gradient(circle at 35% 35%, #a78bfa, #7c3aed 40%, #4c1d95 70%, #1a0533);
  box-shadow: 0 0 40px rgba(124, 58, 237, 0.5), 0 0 80px rgba(124, 58, 237, 0.2), inset 0 -10px 30px rgba(0, 0, 0, 0.5);
  animation: planetFloat 8s ease-in-out infinite, planetGlow 3s ease-in-out infinite;
}

.planet-small {
  width: 60px;
  height: 60px;
  background: radial-gradient(circle at 40% 40%, #c4b5fd, #8b5cf6 50%, #4c1d95 80%);
  box-shadow: 0 0 25px rgba(124, 58, 237, 0.4), 0 0 50px rgba(124, 58, 237, 0.15), inset 0 -5px 15px rgba(0, 0, 0, 0.4);
  animation: planetFloat 6s ease-in-out infinite reverse, planetGlow 2.5s ease-in-out infinite;
}

.planet-ring {
  position: absolute;
  border-radius: 50%;
  border: 2px solid rgba(124, 58, 237, 0.3);
  pointer-events: none;
}

.planet-orbit {
  position: absolute;
  border-radius: 50%;
  border: 1px dashed rgba(124, 58, 237, 0.15);
  pointer-events: none;
  animation: orbitRotate 20s linear infinite;
}

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

@keyframes planetGlow {
  0%, 100% { box-shadow: 0 0 30px rgba(124, 58, 237, 0.4), 0 0 60px rgba(124, 58, 237, 0.1); }
  50%      { box-shadow: 0 0 50px rgba(124, 58, 237, 0.7), 0 0 100px rgba(124, 58, 237, 0.25); }
}

@keyframes orbitRotate {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* ---------- Glow Effects ---------- */
.glow-text {
  text-shadow: 0 0 10px rgba(124, 58, 237, 0.6), 0 0 30px rgba(124, 58, 237, 0.3), 0 0 60px rgba(124, 58, 237, 0.1);
}

.glow-border {
  border-color: var(--purple-primary);
  box-shadow: 0 0 10px rgba(124, 58, 237, 0.3), inset 0 0 10px rgba(124, 58, 237, 0.05);
}

.glow-border:hover {
  box-shadow: 0 0 20px rgba(124, 58, 237, 0.5), 0 0 40px rgba(124, 58, 237, 0.2), inset 0 0 15px rgba(124, 58, 237, 0.08);
}

.glow-divider {
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--purple-primary), var(--purple-glow), var(--purple-primary), transparent);
  border: none;
  margin: 0 auto;
  max-width: 200px;
}

/* ---------- Navbar ---------- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  transition: background var(--transition-smooth), box-shadow var(--transition-smooth);
}

.navbar.transparent {
  background: rgba(10, 10, 26, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(124, 58, 237, 0.15);
}

.navbar.scrolled {
  background: rgba(10, 10, 26, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(124, 58, 237, 0.3);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

.nav-link {
  position: relative;
  color: var(--text-secondary);
  transition: color var(--transition-smooth);
}

.nav-link:hover,
.nav-link.active {
  color: var(--purple-glow);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 20px;
  height: 2px;
  background: var(--purple-primary);
  border-radius: 2px;
  transition: transform var(--transition-smooth);
}

.nav-link:hover::after,
.nav-link.active::after {
  transform: translateX(-50%) scaleX(1);
}

/* Mobile menu */
.mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  right: -300px;
  width: 280px;
  height: 100vh;
  background: rgba(10, 10, 26, 0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-left: 1px solid rgba(124, 58, 237, 0.3);
  z-index: 1100;
  transition: right var(--transition-smooth);
  padding: 80px 30px 30px;
}

.mobile-menu.open {
  right: 0;
}

.mobile-menu-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 1050;
  opacity: 0;
  transition: opacity var(--transition-smooth);
}

.mobile-menu-overlay.open {
  display: block;
  opacity: 1;
}

.hamburger-line {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all var(--transition-smooth);
}

.hamburger.open .hamburger-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger.open .hamburger-line:nth-child(2) {
  opacity: 0;
}

.hamburger.open .hamburger-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ---------- Hero Section ---------- */
.hero-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-bg-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.15;
  filter: hue-rotate(240deg) saturate(1.5);
  z-index: 0;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(ellipse at center, rgba(10, 10, 26, 0.3) 0%, rgba(10, 10, 26, 0.85) 70%);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
}

/* ---------- Feature Cards ---------- */
.feature-card {
  background: var(--space-card);
  border: 1px solid var(--space-card-border);
  border-radius: 16px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: all var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--purple-primary), var(--purple-glow), var(--purple-primary), transparent);
  opacity: 0;
  transition: opacity var(--transition-smooth);
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-card:hover {
  border-color: rgba(124, 58, 237, 0.5);
  box-shadow: 0 0 30px rgba(124, 58, 237, 0.2), 0 10px 40px rgba(0, 0, 0, 0.3);
  transform: translateY(-5px);
}

.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(124, 58, 237, 0.15);
  color: var(--purple-glow);
  font-size: 1.5rem;
  transition: all var(--transition-smooth);
}

.feature-card:hover .feature-icon {
  background: rgba(124, 58, 237, 0.25);
  box-shadow: 0 0 20px rgba(124, 58, 237, 0.4);
  color: #fff;
}

/* ---------- Stats Counter ---------- */
.stat-item {
  text-align: center;
  position: relative;
}

.stat-number {
  font-size: 3rem;
  font-weight: 800;
  color: var(--purple-glow);
  text-shadow: 0 0 15px rgba(124, 58, 237, 0.5), 0 0 40px rgba(124, 58, 237, 0.2);
  font-variant-numeric: tabular-nums;
  font-family: 'Courier New', 'SF Mono', 'Fira Code', monospace;
  letter-spacing: 2px;
}

.stat-label {
  color: var(--text-secondary);
  margin-top: 0.5rem;
  font-size: 0.95rem;
}

.stat-divider {
  width: 40px;
  height: 2px;
  background: var(--purple-primary);
  margin: 8px auto 0;
  border-radius: 2px;
}

/* ---------- Testimonial Cards ---------- */
.testimonial-card {
  background: rgba(15, 15, 42, 0.5);
  border: 1px solid rgba(124, 58, 237, 0.15);
  border-radius: 16px;
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  padding: 30px;
  transition: all var(--transition-smooth);
  position: relative;
}

.testimonial-card:hover {
  border-color: rgba(124, 58, 237, 0.4);
  box-shadow: 0 0 30px rgba(124, 58, 237, 0.15);
}

.testimonial-card::before {
  content: '\201C';
  position: absolute;
  top: 10px;
  left: 20px;
  font-size: 4rem;
  color: rgba(124, 58, 237, 0.15);
  line-height: 1;
  font-family: serif;
}

/* ---------- FAQ Accordion ---------- */
.faq-item {
  background: rgba(15, 15, 42, 0.5);
  border: 1px solid rgba(124, 58, 237, 0.15);
  border-radius: 12px;
  margin-bottom: 12px;
  overflow: hidden;
  transition: all var(--transition-smooth);
}

.faq-item:hover {
  border-color: rgba(124, 58, 237, 0.3);
}

.faq-item.open {
  border-color: rgba(124, 58, 237, 0.5);
  box-shadow: 0 0 20px rgba(124, 58, 237, 0.15);
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  cursor: pointer;
  font-weight: 600;
  color: var(--text-primary);
  transition: color var(--transition-smooth);
  user-select: none;
}

.faq-question:hover {
  color: var(--purple-glow);
}

.faq-icon {
  font-size: 0.9rem;
  color: var(--purple-glow);
  transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

.faq-item.open .faq-icon {
  transform: rotate(180deg);
}

/* Orbit-style icon rotation on open */
.faq-item.open .faq-icon i {
  animation: orbitSpin 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

@keyframes orbitSpin {
  0%   { transform: rotate(0deg) scale(1); }
  50%  { transform: rotate(200deg) scale(1.3); }
  100% { transform: rotate(180deg) scale(1); }
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1), padding 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-item.open .faq-answer {
  max-height: 300px;
  padding: 0 24px 18px;
}

.faq-answer-content {
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ---------- CTA Banner ---------- */
.cta-section {
  position: relative;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.15) 0%, rgba(10, 10, 26, 0.95) 50%, rgba(124, 58, 237, 0.1) 100%);
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(ellipse at center, rgba(124, 58, 237, 0.08) 0%, transparent 60%);
  animation: ctaPulse 6s ease-in-out infinite;
}

@keyframes ctaPulse {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50%      { opacity: 1; transform: scale(1.05); }
}

.cta-glow-circle {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(124, 58, 237, 0.15);
  pointer-events: none;
}

/* ---------- Footer ---------- */
.footer-section {
  background: rgba(5, 5, 15, 0.95);
  border-top: 1px solid rgba(124, 58, 237, 0.15);
  position: relative;
}

.footer-stars {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
}

/* ---------- Buttons ---------- */
.btn-primary {
  display: inline-block;
  padding: 14px 36px;
  background: linear-gradient(135deg, var(--purple-primary), var(--purple-dark));
  color: #fff;
  border-radius: 50px;
  font-weight: 600;
  text-decoration: none;
  transition: all var(--transition-smooth);
  box-shadow: 0 0 20px rgba(124, 58, 237, 0.3);
  border: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transition: left 0.5s;
}

.btn-primary:hover {
  box-shadow: var(--glow-shadow-strong);
  transform: translateY(-2px);
}

.btn-primary:hover::before {
  left: 100%;
}

.btn-outline {
  display: inline-block;
  padding: 13px 35px;
  background: transparent;
  color: var(--purple-glow);
  border: 2px solid rgba(124, 58, 237, 0.5);
  border-radius: 50px;
  font-weight: 600;
  text-decoration: none;
  transition: all var(--transition-smooth);
  cursor: pointer;
}

.btn-outline:hover {
  background: rgba(124, 58, 237, 0.1);
  border-color: var(--purple-glow);
  box-shadow: 0 0 20px rgba(124, 58, 237, 0.3);
  transform: translateY(-2px);
}

/* ---------- Section Titles ---------- */
.section-badge {
  display: inline-block;
  padding: 6px 20px;
  background: rgba(124, 58, 237, 0.1);
  border: 1px solid rgba(124, 58, 237, 0.25);
  border-radius: 50px;
  color: var(--purple-glow);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 800;
  color: #fff;
  margin-top: 16px;
}

.section-subtitle {
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-top: 8px;
}

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

::-webkit-scrollbar-track {
  background: var(--space-black);
}

::-webkit-scrollbar-thumb {
  background: rgba(124, 58, 237, 0.4);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(124, 58, 237, 0.6);
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .section-title { font-size: 2rem; }
  .stat-number { font-size: 2.3rem; }
}

@media (max-width: 768px) {
  .section-title { font-size: 1.75rem; }
  .stat-number { font-size: 2rem; }
  .hero-section { min-height: 90vh; }
  .planet-purple { width: 80px; height: 80px; }
  .planet-small { width: 40px; height: 40px; }
}

@media (max-width: 640px) {
  .section-title { font-size: 1.5rem; }
  .stat-number { font-size: 1.75rem; }
  .feature-card { padding: 20px; }
}

/* ---------- Particle Canvas ---------- */
#particles-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ---------- Animation Utility ---------- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* ---------- Digit Counter Sci-Fi Effect ---------- */
.stat-number.counting {
  animation: digitPulse 0.3s ease-out;
}

@keyframes digitPulse {
  0%   { transform: scale(1.2); color: #fff; }
  100% { transform: scale(1); color: var(--purple-glow); }
}
