:root {
  --bg-dark: #ffffff; /* renamed logically but keeping variable name */
  --bg-panel: #f8f9fa;
  --primary: #00d280;
  --primary-glow: rgba(0, 210, 128, 0.3);
  --secondary: #8c00ff;
  --text-main: #111111;
  --text-muted: #555555;
  --font-heading: 'Space Grotesk', sans-serif;
  --font-body: 'Outfit', sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body, .ca-webinar-wrapper {
  font-family: var(--font-body);
  background-color: var(--bg-dark);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.1;
  color: var(--text-main);
}

.ca-webinar-wrapper p,
.ca-webinar-wrapper ul,
.ca-webinar-wrapper ol,
.ca-webinar-wrapper li,
.ca-webinar-wrapper div,
.ca-webinar-wrapper span {
  color: inherit;
}

/* Utilities */
.view {
  transition: opacity 0.5s ease;
  min-height: 100vh;
  width: 100%;
}

.view.hidden {
  display: none;
  opacity: 0;
}

.view.active {
  display: block;
  opacity: 1;
  animation: fadeIn 0.8s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.text-gradient {
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.btn-primary {
  background: var(--primary);
  color: #000;
  border: none;
  padding: 12px 32px;
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: 50px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 0 20px var(--primary-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 30px var(--primary-glow);
}

.btn-secondary {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
  padding: 12px 32px;
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-secondary:hover {
  background: rgba(0, 255, 157, 0.1);
}

.btn-link {
  background: none;
  border: none;
  color: var(--text-muted);
  text-decoration: underline;
  cursor: pointer;
  margin-top: 20px;
}

.glass {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 16px;
}

/* Registration View */
.hero {
  padding: 80px 20px;
  text-align: center;
  background: radial-gradient(circle at top center, var(--bg-panel) 0%, var(--bg-dark) 70%);
}

.badge {
  background: rgba(189, 0, 255, 0.2);
  color: var(--secondary);
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 600;
  display: inline-block;
  margin-bottom: 20px;
}

.hero h1 {
  font-size: 3.5rem;
  margin-bottom: 20px;
}

.subtitle {
  font-size: 1.25rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 40px;
}

.video-teaser {
  max-width: 800px;
  aspect-ratio: 16/9;
  margin: 0 auto 40px;
  background: #000;
  border-radius: 16px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
  cursor: pointer;
}

.teaser-placeholder {
  color: #333;
  font-size: 2rem;
  font-weight: 700;
}

.play-button-overlay {
  position: absolute;
  width: 80px;
  height: 80px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(4px);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: transform 0.3s;
}

.video-teaser:hover .play-button-overlay {
  transform: scale(1.1);
  background: rgba(255, 255, 255, 0.2);
}

.details-section {
  padding: 60px 20px;
}

.details-section h2 {
  text-align: center;
  margin-bottom: 50px;
  font-size: 2.5rem;
}

.grid-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
}

.feature-card {
  padding: 30px;
  background: var(--bg-panel);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: transform 0.3s;
}

.feature-card:hover {
  transform: translateY(-5px);
  border-color: var(--primary);
}

.registration-footer {
  padding: 80px 20px;
  background: var(--bg-panel);
}

.form-container {
  max-width: 480px;
  margin: 0 auto;
  padding: 40px;
  background: var(--bg-dark);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.form-group {
  margin-bottom: 20px;
  text-align: left;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.form-group input {
  width: 100%;
  padding: 12px;
  background: rgba(0, 0, 0, 0.02);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  color: var(--text-main);
  font-family: inherit;
}

.form-group input:focus {
  outline: none;
  border-color: var(--primary);
}

.full-width {
  width: 100%;
}

/* Replay View */
.theater-mode {
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: #000;
}

.webinar-header {
  color: #fff;
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.live-indicator {
  color: #ff0055;
  font-weight: 700;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { opacity: 1; }
  50% { opacity: 0.5; }
  100% { opacity: 1; }
}

.video-container {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.player-placeholder {
  width: 90%;
  max-width: 1200px;
  aspect-ratio: 16/9;
  background: #111;
  border: 1px solid #333;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.video-screen {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #444;
}

.player-controls {
  padding: 20px;
  background: #222;
  display: flex;
  align-items: center;
  gap: 20px;
}

.progress-bar {
  flex: 1;
  height: 5px;
  background: #444;
  border-radius: 3px;
  overflow: hidden;
}

.progress-fill {
  width: 0%;
  height: 100%;
  background: var(--primary);
  transition: width 0.1s linear;
}

/* CTA View */
.cta-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  text-align: center;
}

.cta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 50px;
  max-width: 900px;
  width: 100%;
}

.cta-card {
  padding: 40px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: flex-start;
  text-align: left;
}

.cta-card.featured {
  border-color: var(--primary);
  box-shadow: 0 0 30px rgba(0, 255, 157, 0.1);
}

@media (max-width: 768px) {
  .hero h1 { font-size: 2.5rem; }
  .grid-features { grid-template-columns: 1fr; }
  .cta-grid { grid-template-columns: 1fr; }
}

/* HubSpot Popup Overlay */
.ca-popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  animation: fadeIn 0.4s ease-out;
}

.ca-popup-content {
  max-width: 520px;
  width: 90%;
  padding: 40px;
  text-align: center;
  position: relative;
  border: 1px solid rgba(0, 255, 157, 0.3);
  box-shadow: 0 0 60px rgba(0, 255, 157, 0.15);
}

.ca-popup-content h3 {
  font-size: 1.6rem;
  margin-bottom: 12px;
}

.ca-popup-content p {
  color: var(--text-muted);
  font-size: 1.05rem;
}

.ca-popup-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.8rem;
  cursor: pointer;
  transition: color 0.2s;
}

.ca-popup-close:hover {
  color: #fff;
}

/* YouTube Player Container */
#yt-player-container {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

#yt-player-container iframe {
  width: 100%;
  height: 100%;
}
