/* Base Setup & Variables */
:root {
  /* Colors inspired by Unitree / Space */
  --color-bg-deep: #050508;
  --color-bg-dark: #0f111a;
  --color-accent: #00e0ff;
  --color-accent-dark: #0077ff;
  --color-text: #f0f4f8;
  --color-text-muted: #9ba1b0;

  /* Glassmorphism */
  --glass-bg: rgba(20, 24, 40, 0.4);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-border-hover: rgba(0, 224, 255, 0.4);
  --glass-blur: blur(16px);
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5);

  /* Typography */
  --font-main: 'Outfit', sans-serif;

  /* Transitions */
  --trans-smooth: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  background-color: var(--color-bg-deep);
  color: var(--color-text);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

/* Typography Utility */
.accent-text {
  color: var(--color-accent);
  text-shadow: 0 0 10px rgba(0, 224, 255, 0.5);
}

h1,
h2,
h3,
h4 {
  font-weight: 700;
  line-height: 1.2;
}

a {
  text-decoration: none;
  color: inherit;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Space Background Effects */
.space-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -3;
  background: radial-gradient(ellipse at bottom, #101c3a 0%, #050508 100%);
}

/* Spaceship / Planet placeholder (using a subtle radial glow on right) */
.space-bg::after {
  content: '';
  position: absolute;
  top: 20%;
  right: -10%;
  width: 60vw;
  height: 60vw;
  background: radial-gradient(circle, rgba(0, 119, 255, 0.08) 0%, rgba(0, 0, 0, 0) 70%);
  border-radius: 50%;
  z-index: -2;
}

/* Starfield Animation (simplified) */
@keyframes slide {
  0% {
    transform: translateY(0);
  }

  100% {
    transform: translateY(-1000px);
  }
}

.stars,
.stars2,
.stars3 {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 200vh;
  /* double height for scroll illusion */
  z-index: -1;
  pointer-events: none;
  background-image:
    radial-gradient(2px 2px at 20px 30px, #ffffff, rgba(0, 0, 0, 0)),
    radial-gradient(2px 2px at 40px 70px, rgba(255, 255, 255, 0.5), rgba(0, 0, 0, 0)),
    radial-gradient(2px 2px at 50px 160px, #ffffff, rgba(0, 0, 0, 0)),
    radial-gradient(2px 2px at 90px 40px, rgba(255, 255, 255, 0.5), rgba(0, 0, 0, 0)),
    radial-gradient(2px 2px at 130px 80px, #ffffff, rgba(0, 0, 0, 0)),
    radial-gradient(2px 2px at 160px 120px, rgba(255, 255, 255, 0.5), rgba(0, 0, 0, 0));
  background-repeat: repeat;
  background-size: 200px 200px;
}

.stars {
  animation: slide 100s linear infinite;
}

.stars2 {
  background-size: 300px 300px;
  animation: slide 150s linear infinite;
  opacity: 0.7;
}

.stars3 {
  background-size: 400px 400px;
  animation: slide 200s linear infinite;
  opacity: 0.5;
}

/* Glassmorphism Utilities */
.glass {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
}

.glass-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 24px;
  transition: var(--trans-smooth);
}

.glass-card:hover {
  transform: translateY(-5px);
  border-color: var(--glass-border-hover);
  box-shadow: 0 10px 40px 0 rgba(0, 224, 255, 0.15);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--trans-smooth);
  border: none;
  font-family: inherit;
}

/* Accessible focus outlines */
.btn:focus,
.close-btn:focus,
.mobile-menu-btn:focus,
.play-btn:focus,
a:focus {
  outline: 3px solid rgba(0, 224, 255, 0.35);
  outline-offset: 3px;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.9rem;
}

.btn-full {
  width: 100%;
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-accent), var(--color-accent-dark));
  color: #fff;
  box-shadow: 0 4px 15px rgba(0, 224, 255, 0.3);
}

.btn-primary:hover {
  box-shadow: 0 6px 20px rgba(0, 224, 255, 0.5);
  transform: scale(1.02);
}

.btn-outline {
  background: transparent;
  color: var(--color-text);
  border: 1px solid var(--color-accent);
}

.btn-outline:hover {
  background: rgba(0, 224, 255, 0.1);
  box-shadow: 0 0 15px rgba(0, 224, 255, 0.2);
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  padding: 15px 0;
  border-radius: 0 0 20px 20px;
  border-top: none;
  border-left: none;
  border-right: none;
}

.nav-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: 1px;
}

.nav-links a {
  margin: 0 15px;
  font-weight: 500;
  position: relative;
  transition: var(--trans-smooth);
}

.nav-links a:hover {
  color: var(--color-accent);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0%;
  height: 2px;
  background: var(--color-accent);
  transition: var(--trans-smooth);
}

.nav-links a:hover::after {
  width: 100%;
}

.mobile-menu-btn {
  display: none;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
}

/* Section Common */
.section {
  padding: 100px 0;
}

.section-title {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 50px;
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 80px;
  /* Offset for nav */
}

.hero-content {
  display: flex;
  align-items: center;
}

.hero-text-block {
  max-width: 600px;
  animation: fadeIn 1s ease-out forwards;
}

.hero-title {
  font-size: 4rem;
  margin-bottom: 20px;
}

.hero-subtitle {
  font-size: 1.2rem;
  color: var(--color-text-muted);
  margin-bottom: 40px;
}

.hero-buttons {
  display: flex;
  gap: 20px;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Events Grid */
.events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
}

.event-card {
  text-align: center;
}

.event-icon {
  font-size: 3rem;
  color: var(--color-accent);
  margin-bottom: 20px;
  filter: drop-shadow(0 0 10px rgba(0, 224, 255, 0.4));
}

.event-card h3 {
  margin-bottom: 10px;
  font-size: 1.3rem;
}

.event-card p {
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

/* Advantages Section */
.advantages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  position: relative;
}

.advantage-card {
  position: relative;
  overflow: hidden;
  padding: 40px 30px;
  text-align: left;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  z-index: 1;
}

.advantage-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at top right, rgba(0, 224, 255, 0.08) 0%, transparent 60%);
  z-index: -1;
  transition: opacity 0.5s ease;
  opacity: 0;
}

.advantage-card:hover::before {
  opacity: 1;
}

.ad-icon-wrapper {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  background: rgba(0, 224, 255, 0.1);
  border: 1px solid rgba(0, 224, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 25px;
  box-shadow: 0 0 20px rgba(0, 224, 255, 0.1);
  transition: var(--trans-smooth);
}

.advantage-card:hover .ad-icon-wrapper {
  background: var(--color-accent);
  box-shadow: 0 0 30px rgba(0, 224, 255, 0.4);
  transform: translateY(-5px);
}

.ad-icon {
  font-size: 1.8rem;
  color: var(--color-accent);
  transition: var(--trans-smooth);
}

.advantage-card:hover .ad-icon {
  color: #fff;
}

.advantage-card h3 {
  font-size: 1.4rem;
  margin-bottom: 15px;
  color: #fff;
}

.advantage-card p {
  color: var(--color-text-muted);
  font-size: 1rem;
  line-height: 1.6;
}

/* Product Cards */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 40px;
}

.product-card {
  padding: 0;
  /* Remove padding for edge-to-edge media */
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.product-media {
  position: relative;
  width: 100%;
  height: 250px;
  cursor: pointer;
  background: #000;
}

.product-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.3s ease;
}

.product-media video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Prevent default inline gap on video elements and ensure black background */
.product-media video {
  background: #000;
  margin: 0;
  padding: 0;
  display: block;
}

/* Ensure the media container overlays the media area so the video can fully cover */
.media-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: transparent;
}

.play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60px;
  height: 60px;
  background: rgba(0, 0, 0, 0.6);
  border: 2px solid var(--color-accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--color-accent);
  transition: var(--trans-smooth);
  z-index: 2;
  box-shadow: 0 0 20px rgba(0, 224, 255, 0.4);
}

.product-media:hover .play-btn {
  transform: translate(-50%, -50%) scale(1.1);
  background: var(--color-accent);
  color: #fff;
  box-shadow: 0 0 30px rgba(0, 224, 255, 0.8);
}

.product-media.playing img,
.product-media.playing .play-btn {
  display: none;
}

.product-info {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.product-title {
  font-size: 1.5rem;
  margin-bottom: 10px;
}

.product-desc {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  margin-bottom: 20px;
  flex-grow: 1;
}

.product-actions {
  display: flex;
  gap: 15px;
  justify-content: space-between;
}

.product-actions .btn {
  flex: 1;
}

/* Product card price block */
.product-price {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 18px;
  background: linear-gradient(90deg, rgba(0,0,0,0.12), rgba(255,255,255,0.02));
  border-radius: 10px;
  margin: 18px 24px 12px 24px;
  border: 1px solid rgba(255,255,255,0.03);
}
.product-price .price-label {
  color: var(--color-text-muted);
  font-size: 0.95rem;
}
.product-price .price-value {
  color: var(--color-accent);
  font-weight: 700;
  font-size: 1.05rem;
}

/* Modals */
.modal {
  display: none;
  /* Hidden by default */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
}

.modal-content {
  position: relative;
  width: 90%;
  max-width: 1000px;
  max-height: 90vh;
  overflow-y: auto;
  border-radius: 20px;
  padding: 40px;
  z-index: 1001;
  transform: scale(0.95);
  transition: transform 0.3s ease;
}

.modal.active .modal-content {
  transform: scale(1);
}

.mini-modal {
  max-width: 400px;
  padding: 30px;
}

.close-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  background: transparent;
  border: none;
  color: var(--color-text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  transition: color 0.2s;
}

.close-btn:hover {
  color: #fff;
}

/* Detail Content Inside Modal */
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

.detail-image img {
  width: 100%;
  border-radius: 12px;
}

.detail-features ul {
  list-style: none;
  margin-top: 15px;
}

.detail-features li {
  margin-bottom: 10px;
  padding-left: 25px;
  position: relative;
  color: var(--color-text-muted);
}

.detail-features li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--color-accent);
  font-weight: bold;
}

.conditions-block {
  margin-top: 30px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 12px;
  border-left: 3px solid var(--color-accent);
}

.conditions-block h4 {
  margin-bottom: 10px;
}

.conditions-block p {
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

/* Forms */
.form-title {
  font-size: 1.8rem;
  margin-bottom: 10px;
  text-align: center;
}

.form-subtitle {
  color: var(--color-text-muted);
  text-align: center;
  margin-bottom: 25px;
  font-size: 0.9rem;
}

.form-group {
  margin-bottom: 20px;
}

.form-group input {
  width: 100%;
  padding: 15px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: #fff;
  font-family: inherit;
  font-size: 1rem;
  transition: var(--trans-smooth);
}

.form-group input:focus {
  outline: none;
  border-color: var(--color-accent);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 10px rgba(0, 224, 255, 0.2);
}

/* Footer */
.footer {
  border-top: 1px solid var(--glass-border);
  padding: 30px 0;
  margin-top: 50px;
  background: rgba(0, 0, 0, 0.5);
  text-align: center;
}

.footer-content p {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  margin-top: 10px;
}

/* Responsive Design */
@media (max-width: 768px) {
  .desktop-only {
    display: none;
  }

  .mobile-menu-btn {
    display: block;
  }

  .hero-title {
    font-size: 2.8rem;
  }

  .hero-buttons {
    flex-direction: column;
  }

  .detail-grid {
    grid-template-columns: 1fr;
  }

  .modal-content {
    padding: 25px 20px;
  }
}

/* Mobile Menu Styles */
.mobile-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: rgba(5, 5, 8, 0.95);
  backdrop-filter: blur(10px);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.mobile-menu-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.mobile-menu-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
  transform: translateY(-20px);
  transition: transform 0.3s ease;
}

.mobile-menu-overlay.active .mobile-menu-content {
  transform: translateY(0);
}

.mobile-menu-content a {
  font-size: 1.5rem;
  font-weight: 500;
  transition: color 0.3s ease;
}

.mobile-menu-content a:hover {
  color: var(--color-accent);
}

.close-mobile-menu {
  position: absolute;
  top: 20px;
  right: 20px;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
}