:root {
  --bg-color: #0b0f19;
  --bg-color-glass: rgba(18, 24, 43, 0.6);
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --accent-primary: #3b82f6;
  --accent-secondary: #8b5cf6;
  --border-color: rgba(255, 255, 255, 0.1);
  --gradient-main: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
  --nav-height: 80px;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

/* Background Glowing Orbs */
.glow-blob {
  position: absolute;
  width: 50vw;
  height: 50vw;
  border-radius: 50%;
  filter: blur(100px);
  z-index: -1;
  opacity: 0.4;
  animation: float 20s infinite alternate ease-in-out;
}

.blob-1 {
  background: var(--accent-primary);
  top: -10vw;
  left: -10vw;
}

.blob-2 {
  background: var(--accent-secondary);
  bottom: -20vw;
  right: -10vw;
  animation-duration: 25s;
}

@keyframes float {
  0% {
    transform: translate(0, 0) scale(1);
  }

  100% {
    transform: translate(50px, 100px) scale(1.1);
  }
}

/* Glassmorphism Utilities */
.glass {
  background: var(--bg-color-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

/* Navigation */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  height: var(--nav-height);
  z-index: 1000;
  transition: background-color 0.3s, backdrop-filter 0.3s;
}

.navbar.scrolled {
  background: rgba(11, 15, 25, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
}

.nav-content {
  max-width: 1200px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 2rem;
}

.logo-text {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.logo-text span {
  color: var(--accent-primary);
}

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

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--text-primary);
}

/* Typography & Layout */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 6rem 2rem;
}

.gradient-text {
  background: var(--gradient-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Buttons */
.btn-primary {
  display: inline-block;
  background: var(--gradient-main);
  color: white;
  padding: 0.8rem 1.8rem;
  border-radius: 30px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5);
}

.btn-outline {
  display: inline-block;
  background: transparent;
  color: var(--text-primary);
  padding: 0.6rem 1.4rem;
  border-radius: 30px;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid var(--border-color);
  transition: all 0.2s;
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--text-secondary);
}

/* Hero Section */
.hero {
  padding-top: calc(var(--nav-height) + 6rem);
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.hero-content {
  max-width: 800px;
  padding: 0 2rem;
  animation: fadeIn 1s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-title {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -1px;
  margin-bottom: 1.5rem;
}

.hero-subtitle {
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
  max-width: 600px;
  margin-inline: auto;
}

.hero-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

/* Code Snippet Component */
.code-snippet {
  background: #0f1423;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1rem 1.5rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9rem;
  color: #a5b4fc;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
  display: inline-block;
  text-align: left;
}

/* Features Section */
.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 3rem;
  letter-spacing: -0.5px;
}

.section-subtitle {
  text-align: center;
  color: var(--text-secondary);
  margin-top: -2rem;
  margin-bottom: 4rem;
  font-size: 1.1rem;
}

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

.feature-card {
  background: rgba(18, 24, 43, 0.4);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 2.5rem;
  transition: transform 0.3s, background 0.3s;
}

.feature-card:hover {
  transform: translateY(-5px);
  background: var(--bg-color-glass);
}

.feature-icon {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
  background: var(--gradient-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.feature-card h3 {
  font-size: 1.2rem;
  margin-bottom: 1rem;
}

.feature-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* Demo Section */
.demo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 3rem;
  margin-top: 2rem;
}

.demo-card {
  overflow: hidden;
  transition: transform 0.3s;
}

.demo-card:hover {
  transform: translateY(-10px);
}

.demo-header {
  background: #1a2333;
  padding: 0.8rem 1rem;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
}

.mac-buttons {
  display: flex;
  gap: 6px;
  margin-right: 15px;
}

.mac-buttons span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.close {
  background: #ff5f56;
}

.minimize {
  background: #ffbd2e;
}

.maximize {
  background: #27c93f;
}

.demo-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  color: var(--text-secondary);
  flex-grow: 1;
  text-align: center;
}

.video-container {
  width: 100%;
  aspect-ratio: 16 / 10;
  background: #000;
  position: relative;
}

.video-container video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.demo-footer {
  padding: 1.5rem;
}

.demo-footer p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin: 0;
}

/* Footer */
.footer {
  padding: 2rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 4rem;
  border-radius: 0;
  border-bottom: none;
  border-left: none;
  border-right: none;
}

.footer p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.footer-links a {
  color: var(--accent-primary);
  text-decoration: none;
}

.footer-links a:hover {
  text-decoration: underline;
}

/* Video Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal.show {
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 1;
}

.modal-content {
  width: 90%;
  max-width: 1200px;
  max-height: 90vh;
  box-shadow: 0 0 50px rgba(59, 130, 246, 0.3);
  border-radius: 12px;
  overflow: hidden;
  background: #000;
}

.modal-content video {
  width: 100%;
  height: 100%;
  display: block;
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 35px;
  color: #fff;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  z-index: 2001;
  transition: color 0.2s;
}

.modal-close:hover,
.modal-close:focus {
  color: var(--accent-primary);
  text-decoration: none;
}

.video-container {
  cursor: pointer;
}

.video-container::after {
  content: '▶ Click to enlarge';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.6);
  color: white;
  padding: 10px 20px;
  border-radius: 20px;
  font-size: 0.9rem;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.demo-card:hover .video-container::after {
  opacity: 1;
}

/* Role Modal Styles */
.role-modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  transition: opacity 0.3s ease;
  overflow-y: auto;
  padding: 2rem;
}

.role-modal.show {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  opacity: 1;
}

.role-modal-content {
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  width: 100%;
  max-width: 800px;
  margin: 2rem auto;
  padding: 3rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  position: relative;
  text-align: left;
}

.role-modal-title {
  font-size: 2rem;
  margin-bottom: 1rem;
  padding-right: 2rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1rem;
}

.role-modal-body {
  margin-top: 1.5rem;
}

.role-modal-close {
  position: absolute;
  top: 25px;
  right: 25px;
  color: var(--text-secondary);
  font-size: 30px;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.2s;
  background: rgba(255, 255, 255, 0.1);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.role-modal-close:hover {
  color: white;
  background: var(--accent-primary);
}

/* Responsive */
@media (max-width: 768px) {
  .nav-content {
    flex-direction: column;
    padding: 1rem;
    gap: 1rem;
  }

  .navbar {
    height: auto;
    padding-bottom: 1rem;
  }

  .nav-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    font-size: 0.9rem;
  }

  .hero {
    padding-top: calc(var(--nav-height) + 8rem);
  }

  .hero-title {
    font-size: 2.5rem;
  }
}