:root {
  --bg-dark: #0b1020;
  --bg-card: #111827;
  --bg-card-hover: #1f2937;
  --primary: #38bdf8;
  --primary-glow: rgba(56, 189, 248, 0.5);
  --text-main: #e5e7eb;
  --text-muted: #9ca3af;
  --border-color: rgba(56, 189, 248, 0.2);
  --font-main: "Inter", sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-dark);
  background-image: linear-gradient(rgba(11, 16, 32, 0.75), rgba(11, 16, 32, 0.85)), url('../../../../img/bg/bg.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: auto;
}

/* Typography */
h1, h2, h3 {
  color: #fff;
  font-weight: 700;
}

h1 {
  font-size: 3.5rem;
  line-height: 1.1;
  margin-bottom: 1.5rem;
}

h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

p {
  color: var(--text-muted);
  font-size: 1.1rem;
}

.text-gradient {
  background: linear-gradient(90deg, #38bdf8, #818cf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-highlight {
  color: var(--primary);
}

/* Header */
.header {
  position: sticky;
  top: 0;
  background: rgba(11, 16, 32, 0.85);
  backdrop-filter: blur(12px);
  z-index: 1000;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2rem 0;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo-img {
  height: 28px;
  width: auto;
  display: inline-block;
}

.logo-icon {
  animation: pulse-glow 3s infinite;
}

.mobile-menu-toggle {
  display: none;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  color: #fff;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 18px;
  line-height: 1;
}
.header .mobile-menu-toggle { display: none !important; }

nav a {
  margin-left: 2rem;
  text-decoration: none;
  color: var(--text-main);
  font-weight: 500;
  transition: color 0.3s;
  font-size: 0.95rem;
}

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

.login-btn {
  padding: 0.6rem 1.2rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  transition: all 0.3s;
}

.login-btn:hover {
  background: rgba(56, 189, 248, 0.1);
  border-color: var(--primary);
}

/* Buttons */
.btn-primary, .btn-secondary, .btn-outline {
  display: inline-block;
  padding: 0.8rem 1.5rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  cursor: pointer;
}

.btn-primary {
  background: var(--primary);
  color: #020617;
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.3);
}

.btn-primary:hover {
  background: #7dd3fc;
  transform: translateY(-2px);
  box-shadow: 0 0 25px rgba(56, 189, 248, 0.5);
}

.btn-secondary {
  background: transparent;
  color: var(--text-main);
  border: 1px solid var(--border-color);
  margin-left: 1rem;
}

.btn-secondary:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.btn-outline {
  border: 1px solid var(--border-color);
  color: var(--primary);
  width: 100%;
  text-align: center;
}

.btn-outline:hover {
  background: rgba(56, 189, 248, 0.1);
}

.full-width {
  width: 100%;
  text-align: center;
}

/* Hero Section */
.hero {
  padding: 8rem 0 6rem;
  position: relative;
  overflow: hidden;
  background-image: url('../../../../img/headerbg/headerbg.png');
  background-repeat: no-repeat;
  background-position: right center;
  background-size: min(55vw, 900px);
}

/* Background elements */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  background: linear-gradient(90deg, rgba(11, 16, 32, 0.55) 0%, rgba(11, 16, 32, 0.40) 35%, rgba(11, 16, 32, 0.20) 60%, rgba(11, 16, 32, 0.00) 85%);
  mask-image: radial-gradient(120% 90% at 25% 50%, rgba(0,0,0,1) 30%, rgba(0,0,0,0) 70%);
  pointer-events: none;
  z-index: 0;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -10%;
  right: -5%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(129, 140, 248, 0.15) 0%, transparent 70%);
  filter: blur(60px);
  z-index: -1;
}

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

.hero-actions {
  margin-top: 2.5rem;
}

/* Hero Card */
.hero-card {
  position: relative;
  display: flex;
  justify-content: center;
}

.card {
  background: linear-gradient(160deg, rgba(70, 71, 74, 0.07), rgba(67, 67, 67, 0.07));
  padding: 2.5rem;
  border-radius: 20px;
  box-shadow: 0 25px 50px -12px rgba(42, 42, 42, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  width: 100%;
  max-width: 400px;
  position: relative;
  z-index: 2;
  backdrop-filter: blur(8px);
}

.floating-card {
  animation: float 6s ease-in-out infinite;
}

.card-header {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1.5rem;
}

.card-title {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text-main);
}

.score-display {
  display: flex;
  align-items: baseline;
  margin-bottom: 1.5rem;
}

.score-display h2 {
  font-size: 4rem;
  margin-bottom: 0;
  background: linear-gradient(to bottom, #fff, #9ca3af);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.score-total {
  font-size: 1.5rem;
  color: var(--text-muted);
  margin-left: 0.5rem;
}

.check-list {
  list-style: none;
}

.check-list li {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.8rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
}

.check-list li:last-child {
  border-bottom: none;
}

.check-icon {
  color: #10b981; /* Green check */
  font-weight: bold;
}

/* Features Section */
.section {
  padding: 6rem 0;
}

.section-title {
  text-align: center;
  margin-bottom: 4rem;
}

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

.feature-card {
  background: rgba(17, 24, 39, 0.6);
  padding: 2rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-8px);
  background: rgba(31, 41, 55, 0.8);
  border-color: var(--border-color);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.feature-icon {
  width: 50px;
  height: 50px;
  background: rgba(56, 189, 248, 0.1);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  color: var(--primary);
}

.feature-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.8rem;
}

/* API Section */
.alt-bg {
  background: linear-gradient(180deg, var(--bg-dark) 0%, rgba(17, 24, 39, 0.8) 50%, var(--bg-dark) 100%);
}

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

.api-list {
  list-style: none;
  margin-top: 2rem;
}

.api-list li {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1rem;
  color: var(--text-main);
}

.check-icon-small {
  color: var(--primary);
  font-size: 0.9rem;
}

.code-wrapper {
  background: #0f172a;
  border-radius: 12px;
  border: 1px solid rgba(56, 189, 248, 0.2);
  box-shadow: 0 0 40px rgba(56, 189, 248, 0.05);
  overflow: hidden;
}

.code-header {
  background: rgba(255, 255, 255, 0.03);
  padding: 12px 16px;
  display: flex;
  gap: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.red { background: #ef4444; }
.yellow { background: #eab308; }
.green { background: #22c55e; }

.code-box {
  padding: 1.5rem;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.95rem;
  color: #e5e7eb;
  line-height: 1.6;
}

.method { color: #f472b6; font-weight: bold; }
.endpoint { color: #a5f3fc; }
.header-key { color: #9ca3af; }
.header-value { color: #fdba74; }
.json-key { color: #38bdf8; }
.json-string { color: #86efac; }

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

.price-card {
  background: var(--bg-card);
  padding: 2.5rem;
  border-radius: 16px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: transform 0.3s;
  position: relative;
}

.price-card:hover {
  transform: translateY(-5px);
}

.price-card.highlight {
  border: 2px solid var(--primary);
  background: linear-gradient(145deg, rgba(56, 189, 248, 0.05), rgba(17, 24, 39, 0.9));
  box-shadow: 0 0 30px rgba(56, 189, 248, 0.1);
}

.badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: #000;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
}

.price {
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
  margin: 1.5rem 0;
}

.period {
  font-size: 1rem;
  color: var(--text-muted);
  font-weight: 400;
}

.price-features {
  list-style: none;
  text-align: left;
  margin: 2rem 0;
}

.price-features li {
  margin-bottom: 0.8rem;
  color: var(--text-muted);
}

/* Footer */
.footer {
  text-align: center;
  padding: 3rem 0;
  color: var(--text-muted);
  font-size: 0.9rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  margin-top: 4rem;
}

/* Animations */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-15px); }
}

@keyframes pulse-glow {
  0%, 100% { filter: drop-shadow(0 0 2px rgba(56, 189, 248, 0.5)); }
  50% { filter: drop-shadow(0 0 8px rgba(56, 189, 248, 0.8)); }
}

/* Scroll Fade In */
.fade-in-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in-up.visible {
  opacity: 1;
  transform: translateY(0);
}

.delay-100 { transition-delay: 0.1s; }
.delay-200 { transition-delay: 0.2s; }

.mobile-nav {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.6);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  z-index: 1200;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
  display: none;
}
.mobile-nav.open {
  opacity: 1;
  pointer-events: auto;
}
.mobile-nav-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(86vw, 360px);
  height: 100%;
  background: #0b1020;
  border-left: 1px solid rgba(255,255,255,0.06);
  box-shadow: -20px 0 50px rgba(0,0,0,0.35);
  transform: translateX(100%);
  transition: transform .25s ease;
  padding: 16px;
}
.mobile-nav.open .mobile-nav-panel {
  transform: translateX(0);
}
.mobile-nav-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.mobile-nav-close {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  color: #fff;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 18px;
}
.mobile-nav-link {
  display: block;
  padding: 14px 6px;
  color: var(--text-main);
  text-decoration: none;
  font-weight: 600;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.mobile-nav-link.login {
  margin-top: 8px;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  text-align: center;
}
.mobile-nav-link:hover {
  color: var(--primary);
}

/* Responsive */
@media (max-width: 768px) {
  .hero-grid, .api-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  
  .hero {
    background-size: 95vw;
    background-position: center 40px;
    min-height: 560px;
  }
  
  .hero::before {
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    background: linear-gradient(180deg, rgba(11, 16, 32, 0.55) 0%, rgba(11, 16, 32, 0.35) 55%, rgba(11, 16, 32, 0.00) 95%);
    mask-image: radial-gradient(130% 85% at 50% 35%, rgba(0,0,0,1) 25%, rgba(0,0,0,0) 65%);
  }

  h1 {
    font-size: 2.5rem;
  }

  .nav nav {
    display: none;
  }
  .header .mobile-menu-toggle { display: inline-block !important; }
  .mobile-nav { display: block; }

  .hero {
    padding-top: 4rem;
    text-align: center;
  }
  
  .hero-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
  }
  
  .btn-secondary {
    margin-left: 0;
  }
  
  .hero-card {
    margin-top: 2rem;
  }
}

@media (max-width: 480px) {
  .hero {
    background-size: 120vw;
    background-position: center 20px;
    min-height: 520px;
  }
  
  .hero::before {
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    background: linear-gradient(180deg, rgba(11, 16, 32, 0.58) 0%, rgba(11, 16, 32, 0.38) 50%, rgba(11, 16, 32, 0.00) 92%);
    mask-image: radial-gradient(150% 90% at 50% 32%, rgba(0,0,0,1) 28%, rgba(0,0,0,0) 62%);
  }
}
