:root {
  /* Core Color Palette */
  --bg-deep: #050505; /* Darker for better glass contrast */
  --bg-card: rgba(20, 20, 25, 0.4);
  --accent-primary: #8b5cf6; /* Electric Violet */
  --accent-secondary: #06b6d4; /* Cyan */
  --text-main: #f4f4f5;
  --text-muted: #94a3b8;
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-border-light: rgba(255, 255, 255, 0.2);
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  --gradient-bg: radial-gradient(circle at top left, rgba(139, 92, 246, 0.15), transparent 40%),
                 radial-gradient(circle at bottom right, rgba(6, 182, 212, 0.15), transparent 40%);
  
  /* Typography */
  --font-family: 'Outfit', sans-serif;
}

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

body {
  background-color: var(--bg-deep);
  background-image: var(--gradient-bg);
  background-attachment: fixed;
  color: var(--text-main);
  font-family: var(--font-family);
  overflow-x: hidden;
  line-height: 1.6;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

/* Base Navigation Header Glass */
.glass-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2rem 2rem;
  background: rgba(15, 15, 15, 0.5);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  position: sticky;
  top: 1rem;
  z-index: 1000;
  margin-bottom: 2rem;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
}

.glass-nav .nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.glass-nav .nav-links a {
  color: var(--text-main);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s;
  font-size: 1rem;
}

.glass-nav .nav-links a:hover,
.glass-nav .nav-links a.active {
  color: var(--accent-secondary);
}

/* Glassmorphism Card System */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  box-shadow: var(--glass-shadow);
  padding: 2rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s;
}

.glass-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 40px 0 rgba(139, 92, 246, 0.2);
  border-color: var(--glass-border-light);
}

/* Gradient Text */
.gradient-text {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 800;
}

/* Buttons */
.btn-primary {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  color: white;
  border: 1px solid var(--glass-border);
  padding: 0.8rem 2rem;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.btn-primary:active {
  transform: scale(0.95);
}

.btn-primary:hover {
  opacity: 0.9;
  box-shadow: 0 6px 20px rgba(6, 182, 212, 0.5);
  transform: translateY(-2px);
}

/* Dashboard Grid */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

/* Heatmap Styles */
.heatmap-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.heatmap-labels {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
}

.heatmap-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  grid-template-rows: repeat(5, 1fr); /* 5 rows of time slots */
  gap: 8px;
}

.heatmap-cell {
  aspect-ratio: 1;
  border-radius: 6px;
  background: rgba(139, 92, 246, 0.1);
  transition: transform 0.2s ease;
  cursor: help;
  position: relative;
}

.heatmap-cell:hover {
  transform: scale(1.1);
  z-index: 10;
}

.heatmap-cell.intensity-3 { background: var(--accent-primary); }
.heatmap-cell.intensity-2 { background: rgba(139, 92, 246, 0.8); }
.heatmap-cell.intensity-1 { background: rgba(139, 92, 246, 0.4); }
.heatmap-cell.intensity-0 { background: rgba(139, 92, 246, 0.1); }

/* Video & Content Library */
.video-card {
  overflow: hidden;
  padding: 0 !important;
  display: flex;
  flex-direction: column;
}

.video-card h3, .video-card p, .video-card button {
  padding: 0 1.5rem;
}

.video-card button {
  margin-bottom: 1.5rem;
}

.video-thumbnail {
  width: 100%;
  aspect-ratio: 16/9;
  background-size: cover;
  background-position: center;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.play-overlay {
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: transform 0.3s ease, background 0.3s;
}

.video-card:hover .play-overlay {
  transform: scale(1.2);
  background: var(--accent-primary);
}

/* Payment Buttons */
.btn-payment {
  width: 100%;
  padding: 1rem;
  border-radius: 12px;
  border: none;
  font-weight: 700;
  font-size: 1.1rem;
  cursor: pointer;
  transition: transform 0.2s ease, filter 0.2s ease, box-shadow 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.apple-pay {
  background: white;
  color: black;
}

.google-pay {
  background: #3c4043;
  color: white;
}

.btn-payment:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
  box-shadow: 0 6px 15px rgba(255,255,255,0.1);
}

.btn-payment:active {
  transform: translateY(0);
}

/* Feature Split / Landing Layout */
.feature-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  margin-top: 4rem;
}

.feature-split img {
  width: 100%;
  border-radius: 24px;
  box-shadow: var(--glass-shadow);
  border: 1px solid var(--glass-border);
}

.feature-content h3 {
  font-size: 2rem;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.feature-content p {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
}

/* Landing Page Hero & Titles */
.hero {
  position: relative;
  padding: 8rem 2rem;
  text-align: center;
  background-image: linear-gradient(rgba(10, 10, 11, 0.8), rgba(10, 10, 11, 0.9)), url('hero.png');
  background-size: cover;
  background-position: center;
  border-radius: 24px;
  margin-top: 2rem;
  overflow: hidden;
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
}

.hero h1 {
  font-size: 4rem;
  margin-bottom: 1.5rem;
  line-height: 1.1;
}

.hero p {
  font-size: 1.2rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 2.5rem;
}

.section-title {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 3rem;
  margin-top: 6rem;
}

/* Pricing Section */
.pricing-hero {
  text-align: center;
  padding: 6rem 0 4rem;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.pricing-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-radius: 24px;
  padding: 3rem 2rem;
  text-align: center;
  border-top: 4px solid transparent;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid var(--glass-border);
  position: relative;
}

.pricing-card:hover { 
  transform: translateY(-8px);
  box-shadow: 0 12px 40px 0 rgba(139, 92, 246, 0.2);
}

.pricing-card.popular {
  border-top-color: var(--accent-primary);
  transform: scale(1.05);
  box-shadow: 0 12px 40px 0 rgba(139, 92, 246, 0.25);
}

.pricing-card.popular:hover {
  transform: scale(1.05) translateY(-8px);
}

.pricing-card h3 { 
  font-size: 1.5rem; 
  margin-bottom: 1rem; 
}

.pricing-card .price { 
  font-size: 3rem; 
  font-weight: 800; 
  margin-bottom: 2rem; 
}

.pricing-card ul { 
  list-style: none; 
  padding: 0; 
  margin-bottom: 2rem; 
  text-align: left; 
}

.pricing-card ul li { 
  margin-bottom: 1rem; 
  color: var(--text-muted); 
  padding-left: 1.5rem; 
  position: relative; 
}

.pricing-card ul li::before { 
  content: '✓'; 
  color: var(--accent-secondary); 
  position: absolute; 
  left: 0; 
  font-weight: bold; 
}

/* Global Responsive Adjustments */
@media (max-width: 1024px) {
  .dashboard-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
}

@media (max-width: 768px) {
  .container {
    padding: 1rem;
  }
  
  .glass-nav {
    flex-direction: column;
    padding: 1.5rem;
    gap: 1rem;
    border-radius: 15px;
  }
  
  .glass-nav .nav-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
  }
  
  .feature-split {
    grid-template-columns: 1fr !important;
    gap: 2rem;
    text-align: center;
  }
  
  .feature-split > div:first-child {
    order: 2;
  }
  .feature-split > div:nth-child(2) {
    order: 1;
  }
  .feature-split:nth-child(odd) > div:first-child {
      order: 1; /* flip for alternating */
  }


  .feature-split img {
    margin-bottom: 1rem;
  }

  .feature-content {
      text-align: left;
  }

  header h1, .hero h1 {
    font-size: 2.2rem !important;
  }

  header p, .hero p {
    font-size: 1rem !important;
    padding: 0 1rem;
  }
  
  .dashboard-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .dashboard-grid .glass-card {
      padding: 1.5rem;
  }

  .glass-card > div[style*="display: flex; gap: 0.5rem; margin: 1rem 0;"] {
      flex-direction: column;
      gap: 1rem;
  }
  #btn-submit-score {
      font-size: 1rem;
  }
  
  .heatmap-labels span { font-size: 0.6rem; }
  .heatmap-grid { gap: 4px; }
  
  /* Make inline score entry inputs stack on small screens */
  .glass-card > div > div[style*="display: flex; gap: 0.5rem; margin-bottom: 0.5rem;"] {
      flex-direction: column;
  }
  
  .glass-card > div > div > input, .glass-card > div > div > select {
      width: 100% !important;
  }

  .pricing-card {
      padding: 2rem 1rem !important;
  }
}
