/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* CSS Variables */
:root {
  /* Light mode colors */
  --bg-gradient-start: #f8fafc;
  --bg-gradient-end: #e2e8f0;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --card-bg-start: rgba(255, 255, 255, 0.9);
  --card-bg-end: rgba(255, 255, 255, 0.7);
  --card-title: #1e293b;
  --card-text: #64748b;
  --link-color: #3b82f6;
  --link-hover: #2563eb;
  --footer-text: rgba(100, 116, 139, 0.7);
  --border-color: rgba(59, 130, 246, 0.15);
  --particle-color: rgba(59, 130, 246, 0.4);
  --connection-color: rgba(59, 130, 246, 0.12);
  --card-shadow: rgba(0, 0, 0, 0.05);
  --card-before-bg: rgba(59, 130, 246, 0.08);
  --hero-gradient-start: #3b82f6;
  --hero-gradient-end: #1d4ed8;
  --success-color: #10b981;
}

.dark {
  /* Dark mode colors */
  --bg-gradient-start: #212121;
  --bg-gradient-end: #1a1a1a;
  --text-primary: #e2e8f0;
  --text-secondary: #94a3b8;
  --card-bg-start: rgba(45, 45, 45, 0.9);
  --card-bg-end: rgba(35, 35, 35, 0.8);
  --card-title: #f1f5f9;
  --card-text: #94a3b8;
  --link-color: #60a5fa;
  --link-hover: #93c5fd;
  --footer-text: rgba(148, 163, 184, 0.7);
  --border-color: rgba(59, 130, 246, 0.2);
  --particle-color: rgba(59, 130, 246, 0.5);
  --connection-color: rgba(59, 130, 246, 0.15);
  --card-shadow: rgba(0, 0, 0, 0.2);
  --card-before-bg: rgba(59, 130, 246, 0.12);
  --hero-gradient-start: #60a5fa;
  --hero-gradient-end: #3b82f6;
}

/* Base elements */
html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Segoe UI', sans-serif;
  background: linear-gradient(135deg, var(--bg-gradient-start), var(--bg-gradient-end));
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--text-primary);
  transition: all 0.3s ease;
  background-attachment: fixed;
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

/* Background Canvas */
.background-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background: transparent;
}

/* Theme Toggle Component */
.theme-toggle {
  position: fixed;
  top: 2rem;
  right: 2rem;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 50px;
  padding: 0.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
  z-index: 100;
}

.theme-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-color: rgba(255, 255, 255, 0.2);
}

.dark .theme-toggle:hover {
  background: rgba(0, 0, 0, 0.2);
  border-color: rgba(255, 255, 255, 0.1);
}

.theme-toggle__icon {
  font-size: 1.2rem;
  padding: 0.5rem;
  border-radius: 50%;
  transition: all 0.3s ease;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-secondary);
  opacity: 0.6;
}

.theme-toggle__icon:hover {
  opacity: 1;
  background: rgba(59, 130, 246, 0.1);
}

.theme-toggle__icon--active {
  opacity: 1;
  color: var(--text-primary);
  background: transparent;
}

/* Logo Brand - Top Left */
.logo-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 0 1.25rem 0;
  max-width: 800px;
  margin: 0 auto;
}

.logo-brand__icon {
  width: 3rem;
  height: 3rem;
  object-fit: contain;
  flex-shrink: 0;
}

.logo-brand__text {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.logo-brand__name {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.025em;
}

.logo-brand__tagline {
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Main Content */
.main-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 1rem 1.5rem 2.5rem;
  min-height: calc(100vh - 120px);
}

/* Hero Section - BravoGen Chat */
.hero-section {
  margin-bottom: 2rem;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 1.5rem;
  align-items: start;
}

.hero-card {
  display: block;
  background: linear-gradient(145deg, var(--card-bg-start), var(--card-bg-end));
  border: 2px solid var(--border-color);
  border-radius: 1.5rem;
  padding: 1.75rem 1.5rem;
  text-decoration: none;
  color: inherit;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(15px);
  transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
  box-shadow: 0 8px 32px var(--card-shadow);
  height: 100%;
}

.hero-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(90deg, var(--hero-gradient-start), var(--hero-gradient-end));
}

.hero-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 16px 48px rgba(59, 130, 246, 0.25);
  border-color: var(--link-color);
}

.hero-card__badge {
  display: inline-block;
  background: linear-gradient(135deg, var(--success-color), #059669);
  color: white;
  padding: 0.4rem 0.85rem;
  border-radius: 1rem;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 1rem;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.hero-card__title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  letter-spacing: -0.025em;
}

.hero-card__description {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
  line-height: 1.5;
}

.hero-card__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 2rem;
  background: linear-gradient(135deg, var(--hero-gradient-start), var(--hero-gradient-end));
  color: white;
  border-radius: 0.75rem;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.hero-card:hover .hero-card__cta {
  transform: translateX(4px);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

.hero-card__cta svg {
  transition: transform 0.3s ease;
}

.hero-card:hover .hero-card__cta svg {
  transform: translateX(4px);
}

/* Legacy Cards */
.legacy-cards {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.legacy-card {
  display: block;
  background: linear-gradient(145deg, var(--card-bg-start), var(--card-bg-end));
  border: 1px dashed var(--border-color);
  border-radius: 1rem;
  padding: 1.25rem;
  backdrop-filter: blur(15px);
  transition: all 0.3s ease;
  opacity: 0.85;
  position: relative;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.legacy-card:hover {
  opacity: 1;
  box-shadow: 0 4px 12px var(--card-shadow);
  transform: translateY(-2px);
}

.legacy-card__badge {
  display: inline-block;
  background: var(--text-secondary);
  color: white;
  padding: 0.3rem 0.7rem;
  border-radius: 0.5rem;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.75rem;
  opacity: 0.8;
}

.legacy-card__header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.legacy-card__icon {
  width: 2rem;
  height: 2rem;
  object-fit: contain;
  flex-shrink: 0;
  opacity: 0.7;
}

.legacy-card__title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.legacy-card__description {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 0;
  line-height: 1.4;
}

/* Divider */
.divider {
  text-align: center;
  margin: 2rem 0;
  position: relative;
}

.divider::before,
.divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: calc(50% - 100px);
  height: 1px;
  background: linear-gradient(to right, transparent, var(--border-color), transparent);
}

.divider::before {
  left: 0;
}

.divider::after {
  right: 0;
}

.divider__text {
  display: inline-block;
  padding: 0 1rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  background: var(--bg-gradient-start);
  position: relative;
}

/* Products List */
.products-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Product Card */
.product-card {
  display: block;
  background: linear-gradient(145deg, var(--card-bg-start), var(--card-bg-end));
  border: 1px solid var(--border-color);
  border-radius: 1rem;
  padding: 1.25rem 1.5rem;
  text-decoration: none;
  color: inherit;
  backdrop-filter: blur(15px);
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px var(--card-shadow);
  position: relative;
}

.product-card:hover {
  transform: translateX(8px);
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.15);
  border-color: var(--link-color);
}

.product-card--disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.product-card--disabled:hover {
  transform: none;
  box-shadow: 0 2px 8px var(--card-shadow);
  border-color: var(--border-color);
}

.product-card__header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.product-card__icon {
  width: 2.5rem;
  height: 2.5rem;
  object-fit: contain;
  flex-shrink: 0;
}

.product-card__info {
  flex: 1;
}

.product-card__title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--card-title);
  margin-bottom: 0.25rem;
}

.product-card__description {
  font-size: 0.85rem;
  color: var(--card-text);
  line-height: 1.4;
}

.product-card__badge {
  display: inline-block;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
  padding: 0.35rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.7rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.product-card__badge--soon {
  background: linear-gradient(135deg, var(--text-secondary), #475569);
}

.product-card__action {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--link-color);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

.product-card:hover .product-card__action {
  gap: 0.75rem;
}

.product-card__action svg {
  transition: transform 0.3s ease;
}

.product-card:hover .product-card__action svg {
  transform: translateX(4px);
}

/* Footer */
.footer {
  text-align: center;
  padding: 2rem 0;
  font-size: 0.9rem;
  color: var(--footer-text);
  transition: color 0.3s ease;
  margin-top: auto;
}

/* Responsive Design */
@media (max-width: 768px) {
  .main-content {
    padding: 0.75rem 1rem 2rem;
  }

  .theme-toggle {
    top: 1rem;
    right: 1rem;
  }

  .logo-brand {
    padding: 0.75rem 0 1rem 0;
  }

  .logo-brand__icon {
    width: 2.5rem;
    height: 2.5rem;
  }

  .logo-brand__name {
    font-size: 1.1rem;
  }

  .logo-brand__tagline {
    font-size: 0.7rem;
  }

  .hero-section {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .hero-card {
    padding: 1.5rem 1.25rem;
  }

  .hero-card__title {
    font-size: 1.5rem;
  }

  .hero-card__description {
    font-size: 0.95rem;
  }

  .hero-card__cta {
    width: 100%;
    justify-content: center;
  }

  .legacy-cards {
    gap: 0.75rem;
  }

  .divider::before,
  .divider::after {
    width: calc(50% - 80px);
  }

  .product-card {
    padding: 1rem 1.25rem;
  }

  .product-card:hover {
    transform: translateY(-4px);
  }
}

@media (max-width: 480px) {
  .hero-card__title {
    font-size: 1.35rem;
  }

  .hero-card__description {
    font-size: 0.9rem;
  }
}

/* Animations */
@keyframes float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}