/* styles.css - Giga Power Universe enhanced cosmic theme */

:root {
  --bg-dark: #0a0015;
  --primary: #7c3aed;
  --primary-glow: #a78bfa;
  --accent: #ec4899;
  --cyan: #22d3ee;
  --text: #f3e8ff;
  --text-muted: #c4b5fd;
  --text-light: #e0d4ff;
  --card-bg: rgba(30, 10, 60, 0.52);
  --glow: 0 0 25px rgba(124,58,237,0.55);
  --glow-strong: 0 0 60px rgba(236,72,153,0.7);
}

* { margin:0; padding:0; box-sizing:border-box; }

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-dark);
  color: var(--text);
  line-height: 1.65;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: url('https://images.unsplash.com/photo-1462331940025-496dfbfc7564?auto=format&fit=crop&q=80') center/cover no-repeat;
  opacity: 0.16;
  z-index: -2;
  pointer-events: none;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 15% 85%, rgba(236,72,153,0.14), transparent 60%),
              radial-gradient(circle at 85% 25%, rgba(34,211,238,0.11), transparent 55%);
  z-index: -1;
  pointer-events: none;
}

/* ============================================
   NAVIGATION STYLING
   ============================================ */

nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  background: rgba(10,0,21,0.88);
  backdrop-filter: blur(16px);
  z-index: 1000;
  padding: 1rem;
  border-bottom: 1px solid rgba(124,58,237,0.3);
}

nav ul {
  display: flex;
  justify-content: center;
  gap: 2.2rem;
  list-style: none;
  margin: 0; padding: 0;
  flex-wrap: wrap;
}

nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 1.05rem;
  transition: all 0.3s ease;
}

nav a:hover, nav a.active {
  color: var(--accent);
  text-shadow: 0 0 12px var(--accent);
}

/* ============================================
   HEADER & FIRST-LOAD ANIMATIONS
   ============================================ */

@keyframes titleGlow {
  0% {
    opacity: 0;
    filter: blur(20px) brightness(0.8);
    transform: scale(0.85) translateY(40px);
  }
  50% { filter: blur(5px) brightness(1.1); }
  100% {
    opacity: 1;
    filter: blur(0) brightness(1);
    transform: scale(1) translateY(0);
  }
}

@keyframes taglineReveal {
  0% {
    opacity: 0;
    clip-path: polygon(0% 50%, 100% 50%, 100% 50%, 0% 50%);
  }
  100% {
    opacity: 1;
    clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%);
  }
}

@keyframes buttonPulse {
  0% {
    opacity: 0;
    transform: scale(0.7) translateY(20px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes floatIn {
  0% { opacity: 0; transform: translateY(60px) scale(0.9); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes orbitParticle {
  0% { transform: rotate(0deg) translateX(120px) rotate(-0deg); opacity: 0; }
  15% { opacity: 1; }
  85% { opacity: 1; }
  100% { transform: rotate(360deg) translateX(120px) rotate(-360deg); opacity: 0; }
}

@keyframes cosmicFadeIn {
  0% { opacity: 0; transform: scale(0.8); }
  100% { opacity: 1; transform: scale(1); }
}

/* ============================================
   HEADER PARTICLE ANIMATION
   ============================================ */

header {
  position: relative;
  overflow: hidden;
}

header::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 600px;
  height: 600px;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(236, 72, 153, 0.25) 0%, transparent 70%);
  animation: cosmicFadeIn 2.2s ease-out forwards;
  z-index: 0;
}

header h1 {
  animation: titleGlow 1.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  position: relative;
  z-index: 2;
}

.tagline {
  animation: taglineReveal 1.2s ease-out 0.4s forwards;
  opacity: 0;
  position: relative;
  z-index: 2;
}

.btn-container {
  display: flex;
  gap: 2rem;
  justify-content: center;
  flex-wrap: wrap;
  position: relative;
  z-index: 2;
}

.btn-container .btn:nth-child(1) {
  animation: buttonPulse 1s cubic-bezier(0.34, 1.56, 0.64, 1) 0.6s forwards;
  opacity: 0;
}

.btn-container .btn:nth-child(2) {
  animation: buttonPulse 1s cubic-bezier(0.34, 1.56, 0.64, 1) 0.8s forwards;
  opacity: 0;
}

.particle-orbit {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  z-index: 1;
  pointer-events: none;
}

.particle {
  position: absolute;
  width: 8px;
  height: 8px;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.6), rgba(236, 72, 153, 0.3));
  border-radius: 50%;
  box-shadow: 0 0 15px rgba(34, 211, 238, 0.5);
}

.particle:nth-child(1) { top: 20%; left: 10%; animation: orbitParticle 12s linear infinite; }
.particle:nth-child(2) { top: 70%; right: 15%; animation: orbitParticle 15s linear infinite 2s; }
.particle:nth-child(3) { top: 40%; right: 10%; animation: orbitParticle 18s linear infinite 4s; }

/* ============================================
   FEATURE CARD ANIMATIONS
   ============================================ */

.feature-card {
  animation: floatIn 0.8s ease-out backwards;
  transition: all 0.5s !important;
}

.feature-card:nth-child(1) { animation-delay: 1s; }
.feature-card:nth-child(2) { animation-delay: 1.15s; }
.feature-card:nth-child(3) { animation-delay: 1.3s; }
.feature-card:nth-child(4) { animation-delay: 1.45s; }

.feature-card:hover {
  box-shadow: 0 0 40px rgba(236, 72, 153, 0.5), inset 0 0 30px rgba(167, 139, 250, 0.1) !important;
  transform: translateY(-8px) scale(1.02) !important;
}

.cta-section {
  animation: floatIn 0.8s ease-out 1.8s backwards;
}

/* ============================================
   HEADINGS & TYPOGRAPHY
   ============================================ */

.page-heading {
  text-align: center;
  font-size: clamp(2.4rem, 7vw, 3.6rem);
  margin: 4rem 0 3rem;
  background: linear-gradient(90deg, var(--primary-glow), var(--accent), var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  position: relative;
  letter-spacing: -0.02em;
}

.page-heading::after {
  content: "";
  position: absolute;
  bottom: -14px;
  left: 50%;
  transform: translateX(-50%);
  width: 140px;
  height: 4px;
  background: linear-gradient(90deg, transparent, var(--cyan), var(--accent), transparent);
  border-radius: 3px;
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
  font-weight: 700;
  padding: 1.1rem 2.8rem;
  border-radius: 999px;
  text-decoration: none;
  box-shadow: 0 0 30px rgba(124,58,237,0.5), inset 0 1px 0 rgba(255,255,255,0.15);
  transition: all 0.38s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: inline-block;
  position: relative;
  overflow: hidden;
  font-size: 1.05rem;
  letter-spacing: 0.5px;
}

.btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transition: left 0.6s ease;
}

.btn:hover {
  transform: scale(1.08) translateY(-4px);
  box-shadow: 0 0 60px rgba(236,72,153,0.8), 0 0 100px rgba(34,211,238,0.4), inset 0 1px 0 rgba(255,255,255,0.25);
  letter-spacing: 1px;
}

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

/* ============================================
   TAGLINE
   ============================================ */

.tagline {
  font-size: clamp(1.3rem, 4.5vw, 2rem);
  max-width: 880px;
  margin: 1.8rem auto 3rem;
  opacity: 0.93;
  text-align: center;
}

/* ============================================
   CONTENT CARDS
   ============================================ */

.content-card {
  background: var(--card-bg);
  border: 1px solid rgba(124,58,237,0.38);
  border-radius: 20px;
  padding: 2.8rem;
  backdrop-filter: blur(14px);
  margin: 3rem 0;
  opacity: 0;
  transform: translateY(50px);
  transition: all 0.6s ease;
}

.content-card.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   SPECS TABLE
   ============================================ */

.specs-table {
  width: 100%;
  border-collapse: collapse;
  margin: 2.2rem 0;
  font-size: 1.05rem;
}

.specs-table th, .specs-table td {
  padding: 1.1rem 1.3rem;
  text-align: left;
  border-bottom: 1px solid rgba(124,58,237,0.22);
}

.specs-table th {
  color: var(--primary-glow);
  width: 35%;
  font-weight: 600;
}

/* ============================================
   HIGHLIGHT BOXES
   ============================================ */

.highlight {
  background: rgba(236,72,153,0.14);
  border-left: 5px solid var(--accent);
  padding: 1.6rem;
  margin: 2.2rem 0;
  border-radius: 0 14px 14px 0;
  font-size: 1.08rem;
}

/* ============================================
   CHECK LISTS
   ============================================ */

ul.check-list {
  list-style: none;
  padding-left: 0;
  font-size: 1.1rem;
}

ul.check-list li {
  margin: 1.1rem 0;
}

ul.check-list i {
  color: var(--cyan);
  margin-right: 0.9rem;
}

/* ============================================
   MACHINES GRID
   ============================================ */

.machines-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 2.4rem;
}

.machine-card {
  background: var(--card-bg);
  border: 1px solid rgba(124,58,237,0.38);
  border-radius: 20px;
  overflow: hidden;
  backdrop-filter: blur(14px);
  transition: all 0.5s cubic-bezier(0.23,1,0.32,1);
  text-decoration: none;
  color: var(--text);
  display: block;
  opacity: 0;
  transform: translateY(60px);
}

.machine-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.machine-card:hover {
  transform: translateY(-16px) scale(1.04);
  box-shadow: var(--glow-strong);
}

.card-img {
  height: 240px;
  background: linear-gradient(135deg, rgba(124,57,237,0.08) 0%, rgba(34,211,238,0.08) 100%) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  position: relative;
  overflow: hidden;
}

.machine-svg {
  width: 85%;
  height: 85%;
  max-width: 180px;
  max-height: 180px;
  filter: drop-shadow(0 0 20px rgba(34, 211, 238, 0.3));
  transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.machine-card:hover .machine-svg {
  filter: drop-shadow(0 0 40px rgba(236, 72, 153, 0.6)) !important;
  transform: scale(1.08) rotate(2deg) !important;
}

.card-body {
  padding: 2rem 1.9rem;
}

.badge {
  background: rgba(236,72,153,0.32);
  color: var(--accent);
  padding: 0.45rem 1.15rem;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 700;
  display: inline-block;
  margin-bottom: 1.1rem;
}

.price {
  font-size: 2.6rem;
  font-weight: 900;
  background: linear-gradient(90deg, var(--accent), var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin: 0.6rem 0 1.3rem;
}

/* ============================================
   SVG DISPLAY CONTAINERS
   ============================================ */

.machine-display {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 2rem;
  position: relative;
  z-index: 2;
}

/* SVG Animation on Detail Pages */
.machine-display .machine-svg {
  width: 280px;
  height: 280px;
  filter: drop-shadow(0 0 40px rgba(34, 211, 238, 0.4));
  animation: float 3s ease-in-out infinite;
}

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

/* ============================================
   EDUCATION PAGE
   ============================================ */

.edu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 2.5rem;
}

.edu-card {
  background: var(--card-bg);
  border: 1px solid rgba(124,58,237,0.35);
  border-radius: 18px;
  padding: 2.4rem;
  backdrop-filter: blur(12px);
  transition: all 0.5s;
  opacity: 0;
  transform: translateY(50px);
}

.edu-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.edu-card:hover {
  box-shadow: 0 0 40px rgba(236, 72, 153, 0.5), inset 0 0 30px rgba(167, 139, 250, 0.1);
  transform: translateY(-8px) scale(1.02);
}

.edu-card i {
  font-size: 3.2rem;
  color: var(--accent);
  margin-bottom: 1.4rem;
  display: block;
}

.edu-card h3 {
  color: var(--primary-glow);
  margin-bottom: 1.2rem;
}

/* ============================================
   ADDITIONAL ANIMATIONS
   ============================================ */

@keyframes shimmer {
  0% { background-position: -1000px 0; }
  100% { background-position: 1000px 0; }
}

@keyframes softGlow {
  0%, 100% { box-shadow: 0 0 15px rgba(124,58,237,0.3); }
  50% { box-shadow: 0 0 30px rgba(124,58,237,0.6); }
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 1024px) {
  .page-heading { font-size: clamp(2.2rem, 6vw, 3.2rem); }
  nav ul { gap: 1.5rem; font-size: 0.95rem; }
  .machines-grid { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
  .edu-grid { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
}

@media (max-width: 768px) {
  nav ul { gap: 1.8rem; font-size: 1rem; }
  .page-heading { font-size: 2.8rem; margin: 3rem 0 2.5rem; }
  .btn { padding: 0.95rem 2rem; font-size: 1rem; }
  .machines-grid { grid-template-columns: 1fr; gap: 1.8rem; }
  .edu-grid { grid-template-columns: 1fr; gap: 1.8rem; }
  .btn-container { flex-direction: column; gap: 1.2rem; }
  .btn-container .btn { width: 100%; }
  .card-img { height: 200px; }
  .content-card { padding: 2rem; margin: 2rem 0; }
  .specs-table { font-size: 0.95rem; }
  .specs-table th, .specs-table td { padding: 0.8rem 1rem; }
}

@media (max-width: 640px) {
  nav ul { flex-direction: column; gap: 1.2rem; }
  nav a { font-size: 1rem; }
  .page-heading { font-size: 2rem; margin: 2.5rem 0 2rem; }
  .tagline { font-size: 1.1rem; margin: 1.5rem auto 2rem; }
  .btn { padding: 0.9rem 1.8rem; font-size: 0.95rem; }
  .machines-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .edu-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .card-img { height: 180px; }
  .machine-svg { max-width: 150px; max-height: 150px; }
  .badge { font-size: 0.85rem; padding: 0.4rem 1rem; }
  .price { font-size: 2rem; }
  .content-card { padding: 1.5rem; margin: 1.5rem 0; }
  .highlight { padding: 1.2rem; border-radius: 0 8px 8px 0; }
  .specs-table { font-size: 0.9rem; }
  .specs-table th { width: 40%; }
  .specs-table th, .specs-table td { padding: 0.7rem 0.8rem; }
  ul.check-list { font-size: 1rem; }
  ul.check-list li { margin: 0.8rem 0; }
  .machine-display .machine-svg { width: 220px; height: 220px; }
}

@media (max-width: 480px) {
  nav { padding: 0.8rem; }
  nav ul { gap: 1rem; font-size: 0.9rem; }
  nav a { font-size: 0.9rem; }
  .page-heading { font-size: 1.8rem; margin: 2rem 0 1.5rem; }
  .page-heading::after { width: 100px; bottom: -10px; }
  .tagline { font-size: 1rem; margin: 1rem auto 1.5rem; line-height: 1.5; }
  .btn { padding: 0.8rem 1.5rem; font-size: 0.9rem; }
  .btn-container { gap: 1rem; }
  .machines-grid { grid-template-columns: 1fr; gap: 1.2rem; padding: 0 0.5rem; }
  .edu-grid { grid-template-columns: 1fr; gap: 1.2rem; padding: 0 0.5rem; }
  .machine-card { margin: 0 -0.5rem; border-radius: 16px; }
  .card-img { height: 160px; }
  .card-body { padding: 1.5rem 1.2rem; }
  .machine-svg { max-width: 120px; max-height: 120px; }
  .badge { font-size: 0.8rem; padding: 0.35rem 0.9rem; margin-bottom: 0.8rem; }
  .price { font-size: 1.8rem; margin: 0.5rem 0 1rem; }
  h3 { font-size: 1.2rem; }
  .content-card { padding: 1.2rem; margin: 1.2rem 0 1.5rem; border-radius: 16px; }
  .highlight { padding: 1rem; margin: 1.5rem 0; font-size: 1rem; }
  .specs-table { margin: 1.5rem 0; }
  .specs-table th, .specs-table td { padding: 0.6rem 0.7rem; }
  .specs-table th { font-size: 0.9rem; }
  .specs-table td { font-size: 0.9rem; }
  ul.check-list { font-size: 0.95rem; }
  ul.check-list li { margin: 0.7rem 0; }
  ul.check-list i { margin-right: 0.6rem; }
  .machine-display .machine-svg { width: 180px; height: 180px; }
  main { padding: 2.5rem 1rem 4rem; }
  body { font-size: 0.95rem; line-height: 1.6; }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================
   DARK MODE & CONTRAST IMPROVEMENTS
   ============================================ */

@media (prefers-color-scheme: dark) {
  body {
    background: var(--bg-dark);
    color: var(--text);
  }
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
  nav { display: none; }
  body::before, body::after { display: none; }
  .btn { box-shadow: none; border: 1px solid var(--primary-glow); }
  .particle-orbit { display: none; }
}