:root {
  --bg-primary: #03060a;
  --bg-secondary: #0b1220;
  --card-bg: rgba(255, 255, 255, 0.03);
  --card-border: rgba(6, 182, 212, 0.15);
  --blue: #3b82f6;
  --cyan: #06b6d4;
  --green: #10b981;
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --grad-main: linear-gradient(135deg, var(--blue), var(--cyan));
  --grad-glow: linear-gradient(135deg, var(--cyan), var(--green));
  --font-main: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-primary);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Typography */
h1, h2, h3, h4 {
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h1 { font-size: 3.5rem; margin-bottom: 1rem; }
h2 { font-size: 2.5rem; margin-bottom: 1.5rem; }
h3 { font-size: 1.5rem; margin-bottom: 1rem; }
p { color: var(--text-muted); margin-bottom: 1rem; }

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

.text-glow {
  text-shadow: 0 0 20px rgba(6, 182, 212, 0.4);
}

/* Utilities */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.section {
  padding: 6rem 0;
  position: relative;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 1.8rem;
  border-radius: 30px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
  font-size: 1rem;
}

.btn-primary {
  background: var(--grad-main);
  color: #fff;
  box-shadow: 0 4px 15px rgba(6, 182, 212, 0.3);
}

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

.btn-outline {
  background: transparent;
  color: var(--cyan);
  border: 1px solid var(--cyan);
}

.btn-outline:hover {
  background: rgba(6, 182, 212, 0.1);
  box-shadow: 0 0 15px rgba(6, 182, 212, 0.2);
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(3, 6, 10, 0.7);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--card-border);
  transition: all 0.3s ease;
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  text-decoration: none;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
}

.logo svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: var(--cyan);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.3s ease;
  position: relative;
}

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

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--grad-main);
  transition: width 0.3s ease;
  box-shadow: 0 0 8px rgba(6, 182, 212, 0.5);
}

.nav-links a:hover::after {
  width: 100%;
}

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-main);
  font-size: 1.5rem;
  cursor: pointer;
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  padding-top: 80px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background: radial-gradient(circle at right center, rgba(6, 182, 212, 0.1) 0%, rgba(3, 6, 10, 1) 60%);
}

.hero-particles {
  position: absolute;
  right: -10%;
  top: 20%;
  width: 60%;
  height: 80%;
  background-image: radial-gradient(var(--blue) 1px, transparent 1px);
  background-size: 40px 40px;
  opacity: 0.15;
  transform: perspective(500px) rotateY(-30deg);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.hero-content {
  max-width: 600px;
}

.hero-badge {
  display: inline-block;
  padding: 0.4rem 1rem;
  background: rgba(6, 182, 212, 0.1);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  color: var(--cyan);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.hero-visual {
  position: relative;
  height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ecg-line {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 0 10px rgba(16, 185, 129, 0.5));
}

.ecg-line path {
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  animation: dash 4s linear infinite;
}

@keyframes dash {
  to { stroke-dashoffset: 0; }
}

/* Medical System Section */
.system-dashboard {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 3rem;
}

.system-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 2.5rem 2rem;
  backdrop-filter: blur(10px);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
}

.system-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--grad-main);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.system-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.system-card:hover::before {
  opacity: 1;
}

.system-icon {
  width: 48px;
  height: 48px;
  background: rgba(6, 182, 212, 0.1);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.system-icon svg {
  width: 24px;
  height: 24px;
  stroke: var(--cyan);
}

/* Game Section */
.game-section {
  background: var(--bg-secondary);
  border-top: 1px solid var(--card-border);
  border-bottom: 1px solid var(--card-border);
  text-align: center;
}

.game-container {
  max-width: 1200px;
  margin: 3rem auto 0;
  border-radius: 20px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--card-border);
  box-shadow: 0 0 40px rgba(6, 182, 212, 0.1);
  position: relative;
}

.game-container::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 21px;
  background: var(--grad-main);
  z-index: -1;
  opacity: 0.3;
  filter: blur(10px);
}

.game-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
  border-radius: 16px;
  overflow: hidden;
  background: #000;
}

.game-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* Features Section */
.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  margin-top: 4rem;
}

.feature-item {
  display: flex;
  gap: 1.5rem;
  padding: 2rem;
  background: var(--card-bg);
  border-radius: 16px;
  border: 1px solid transparent;
  transition: border-color 0.3s ease;
}

.feature-item:hover {
  border-color: rgba(6, 182, 212, 0.3);
}

/* Data Visual Section */
.data-visual {
  position: relative;
  padding: 6rem 0;
  overflow: hidden;
}

.chart-container {
  height: 300px;
  width: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
  margin-top: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--card-border);
  position: relative;
}

.chart-bar {
  flex: 1;
  background: linear-gradient(to top, rgba(6, 182, 212, 0.1), rgba(6, 182, 212, 0.6));
  border-radius: 4px 4px 0 0;
  transform-origin: bottom;
  transform: scaleY(0);
}

.chart-line-svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* Trust & Legal Section */
.trust-section {
  background: var(--bg-secondary);
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  text-align: center;
}

.trust-card {
  padding: 2rem 1rem;
  background: var(--bg-primary);
  border: 1px solid var(--card-border);
  border-radius: 12px;
}

.trust-icon {
  width: 40px;
  height: 40px;
  margin: 0 auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.1);
  color: var(--green);
}

.trust-card h4 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
  color: var(--text-main);
}

.trust-card p {
  font-size: 0.85rem;
  margin: 0;
}

/* Footer */
.footer {
  background: #010306;
  padding: 4rem 0 2rem;
  border-top: 1px solid rgba(255,255,255,0.05);
}

.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 4rem;
  margin-bottom: 3rem;
}

.footer-brand p {
  margin-top: 1rem;
  font-size: 0.9rem;
}

.footer-links h4 {
  color: var(--text-main);
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
}

.footer-links ul {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.8rem;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: var(--cyan);
}

.legal-notice {
  background: rgba(255,255,255,0.02);
  padding: 1.5rem;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.05);
  margin-bottom: 2rem;
  font-size: 0.85rem;
  color: #64748b;
  text-align: justify;
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.05);
  font-size: 0.85rem;
  color: #64748b;
}

/* Inner Pages General */
.page-header {
  padding: 10rem 0 4rem;
  text-align: center;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--card-border);
}

.page-content {
  padding: 4rem 0;
  max-width: 800px;
  margin: 0 auto;
}

.page-content h2 {
  margin-top: 2rem;
  color: var(--cyan);
}

/* Contact Form */
.contact-form {
  display: grid;
  gap: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-size: 0.9rem;
  color: var(--text-main);
}

.form-group input,
.form-group textarea {
  padding: 1rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  color: var(--text-main);
  font-family: var(--font-main);
  transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--cyan);
}

/* Responsive */
@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-content {
    margin: 0 auto;
  }
  .system-dashboard {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-content {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  h1 { font-size: 2.5rem; }
  .nav-links {
    position: fixed;
    top: 80px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 80px);
    background: var(--bg-primary);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: left 0.3s ease;
  }
  .nav-links.active {
    left: 0;
  }
  .mobile-toggle {
    display: block;
  }
  .system-dashboard,
  .features-grid {
    grid-template-columns: 1fr;
  }
  .trust-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-content {
    grid-template-columns: 1fr;
  }
  .game-container {
    width: 95%;
  }
}

@media (max-width: 480px) {
  .trust-grid {
    grid-template-columns: 1fr;
  }
  .game-container {
    width: 100%;
    border-radius: 0;
    border-left: none;
    border-right: none;
  }
}