/* ========================================
   CSS Variables & Base Styles
   ======================================== */
:root {
  --color-bg: #0a0a0f;
  --color-bg-elevated: #12121a;
  --color-bg-card: #1a1a24;
  --color-surface: #22222e;
  --color-border: #2a2a3a;
  --color-border-light: #3a3a4a;

  --color-text: #f0f0f5;
  --color-text-muted: #8888a0;
  --color-text-subtle: #5a5a70;

  --color-primary: #6366f1;
  --color-primary-light: #818cf8;
  --color-primary-dark: #4f46e5;

  --color-accent: #22d3ee;
  --color-accent-alt: #f472b6;

  --color-success: #34d399;
  --color-warning: #fbbf24;

  --gradient-primary: linear-gradient(
    135deg,
    var(--color-primary) 0%,
    var(--color-accent) 100%
  );
  --gradient-accent: linear-gradient(
    135deg,
    var(--color-accent) 0%,
    var(--color-accent-alt) 100%
  );
  --gradient-bg: radial-gradient(
    ellipse at top,
    #1a1a2e 0%,
    var(--color-bg) 70%
  );

  --font-display: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.15);

  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms ease;
}

/* Reset & Base */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-display);
  background: var(--gradient-bg);
  background-attachment: fixed;
  color: var(--color-text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

html {
  overflow-x: hidden;
}

/* Grain Overlay */
.grain-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ========================================
   Navigation
   ======================================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 16px 0;
  background: rgba(10, 10, 15, 0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--color-border);
}

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

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

.logo-icon {
  font-size: 1.5rem;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.logo-img {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  object-fit: cover;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 32px;
}

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

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-primary);
  transition: width var(--transition-base);
}

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

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

/* ========================================
   Hero Section
   ======================================== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 120px 24px 80px;
  max-width: 1200px;
  margin: 0 auto;
  gap: 60px;
  position: relative;
}

.hero::before {
  content: '';
  position: absolute;
  top: 20%;
  left: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(
    circle,
    rgba(99, 102, 241, 0.15) 0%,
    transparent 70%
  );
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: 10%;
  right: -5%;
  width: 400px;
  height: 400px;
  background: radial-gradient(
    circle,
    rgba(34, 211, 238, 0.1) 0%,
    transparent 70%
  );
  pointer-events: none;
}

.hero-content {
  flex: 1;
  max-width: 600px;
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-block;
  padding: 8px 16px;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-text-muted);
  margin-bottom: 24px;
  animation: fadeInUp 0.6s ease forwards;
}

.hero-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 24px;
  animation: fadeInUp 0.6s ease 0.1s forwards;
  opacity: 0;
}

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

.hero-subtitle {
  font-size: 1.2rem;
  color: var(--color-text-muted);
  margin-bottom: 40px;
  max-width: 500px;
  animation: fadeInUp 0.6s ease 0.2s forwards;
  opacity: 0;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  animation: fadeInUp 0.6s ease 0.3s forwards;
  opacity: 0;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-md);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  transition: all var(--transition-base);
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--gradient-primary);
  color: white;
  box-shadow: var(--shadow-md), var(--shadow-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg), 0 0 60px rgba(99, 102, 241, 0.25);
}

.btn-secondary {
  background: var(--color-bg-card);
  color: var(--color-text);
  border: 1px solid var(--color-border);
}

.btn-secondary:hover {
  background: var(--color-surface);
  border-color: var(--color-border-light);
  transform: translateY(-2px);
}

.btn-icon {
  font-size: 1.1rem;
}

/* Hero Visual */
.hero-visual {
  flex: 1;
  position: relative;
  height: 400px;
  display: none;
}

@media (min-width: 900px) {
  .hero-visual {
    display: block;
  }
}

.floating-card {
  position: absolute;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 20px 28px;
  display: flex;
  align-items: center;
  gap: 14px;
  font-weight: 500;
  box-shadow: var(--shadow-md);
  animation: float 6s ease-in-out infinite;
}

.floating-card .card-icon {
  font-size: 1.5rem;
}

.card-1 {
  top: 20%;
  left: 10%;
  animation-delay: 0s;
}

.card-2 {
  top: 45%;
  right: 5%;
  animation-delay: -2s;
  background: linear-gradient(
    135deg,
    var(--color-bg-card) 0%,
    rgba(99, 102, 241, 0.1) 100%
  );
  border-color: rgba(99, 102, 241, 0.3);
}

.card-3 {
  bottom: 15%;
  left: 20%;
  animation-delay: -4s;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-20px);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ========================================
   Sections
   ======================================== */
.section {
  padding: 100px 0;
  position: relative;
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-tag {
  display: inline-block;
  padding: 6px 14px;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-primary-light);
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.section-header h2 {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 700;
}

/* ========================================
   About Section
   ======================================== */
.about-section {
  background: var(--color-bg-elevated);
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.about-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: all var(--transition-base);
}

.about-card:hover {
  transform: translateY(-4px);
  border-color: var(--color-border-light);
  box-shadow: var(--shadow-md);
}

.about-icon {
  font-size: 2.5rem;
  margin-bottom: 20px;
}

.about-card h3 {
  font-size: 1.25rem;
  margin-bottom: 12px;
}

.about-card p {
  color: var(--color-text-muted);
  line-height: 1.7;
}

/* ========================================
   Apps Section
   ======================================== */
.apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}

.app-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex;
  gap: 24px;
  transition: all var(--transition-base);
}

.app-card:hover {
  transform: translateY(-4px);
  border-color: var(--color-border-light);
  box-shadow: var(--shadow-md);
}

.app-icon-wrapper {
  flex-shrink: 0;
}

.app-icon {
  width: 72px;
  height: 72px;
  background: var(--gradient-primary);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
}

.app-icon-img {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-md);
  object-fit: cover;
  box-shadow: var(--shadow-md);
}

.app-info h3 {
  font-size: 1.25rem;
  margin-bottom: 4px;
}

.app-category {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin-bottom: 12px;
}

.app-description {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  margin-bottom: 16px;
  line-height: 1.6;
}

.app-links {
  display: flex;
  gap: 12px;
}

.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-text);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all var(--transition-fast);
}

.store-badge:hover {
  background: var(--color-border);
  transform: translateY(-2px);
}

.store-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.store-badge.app-store .store-icon {
  color: #a2aaad;
}

.store-badge.app-store:hover .store-icon {
  color: #fff;
}

.store-badge.play-store .store-icon {
  color: #34d399;
}

.store-badge.play-store:hover .store-icon {
  color: #6ee7b7;
}

/* ========================================
   Ads Section
   ======================================== */
.ads-section {
  background: var(--color-bg-elevated);
}

.ads-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
}

@media (min-width: 900px) {
  .ads-content {
    grid-template-columns: 1fr 1fr;
    gap: 60px;
  }
}

.ads-info h3 {
  font-size: 1.4rem;
  margin-bottom: 16px;
  margin-top: 32px;
}

.ads-info h3:first-child {
  margin-top: 0;
}

.ads-info p {
  color: var(--color-text-muted);
  line-height: 1.8;
}

.info-box {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 24px;
  margin: 24px 0;
  display: flex;
  gap: 16px;
}

.info-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.info-box strong {
  display: block;
  margin-bottom: 8px;
}

.info-box p {
  font-size: 0.95rem;
  margin-bottom: 12px;
}

.file-link {
  display: inline-block;
  padding: 8px 16px;
  background: var(--color-surface);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--color-accent);
}

.benefits-list {
  list-style: none;
  margin-top: 20px;
}

.benefits-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  color: var(--color-text-muted);
}

.check-icon {
  color: var(--color-success);
  font-weight: bold;
  flex-shrink: 0;
}

/* Code Window */
.ads-preview {
  position: sticky;
  top: 120px;
}

.code-window {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.code-header {
  display: flex;
  align-items: center;
  padding: 14px 20px;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  gap: 16px;
}

.window-dots {
  display: flex;
  gap: 8px;
}

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

.dot.red {
  background: #ff5f57;
}
.dot.yellow {
  background: #febc2e;
}
.dot.green {
  background: #28c840;
}

.file-name {
  flex: 1;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.view-raw {
  font-size: 0.85rem;
  color: var(--color-primary-light);
  text-decoration: none;
  font-weight: 500;
}

.view-raw:hover {
  text-decoration: underline;
}

.code-content {
  padding: 24px;
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  line-height: 1.8;
  color: var(--color-text-muted);
  overflow-x: auto;
}

.code-content code {
  color: var(--color-accent);
}

.code-note {
  margin-top: 20px;
  padding: 16px 20px;
  background: rgba(251, 191, 36, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.2);
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.code-note strong {
  color: var(--color-warning);
}

.code-note code {
  background: var(--color-surface);
  padding: 2px 8px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

/* ========================================
   Contact Section
   ======================================== */
.contact-content {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

.contact-content > p {
  color: var(--color-text-muted);
  font-size: 1.1rem;
  margin-bottom: 32px;
}

.contact-methods {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.contact-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 28px;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--color-text);
  font-weight: 500;
  transition: all var(--transition-base);
}

.contact-card:hover {
  transform: translateY(-2px);
  border-color: var(--color-primary);
  box-shadow: var(--shadow-md), var(--shadow-glow);
}

.contact-icon {
  font-size: 1.5rem;
}

/* ========================================
   Footer
   ======================================== */
.footer {
  background: var(--color-bg);
  border-top: 1px solid var(--color-border);
  padding: 40px 0;
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 1.1rem;
}

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

.footer-links {
  display: flex;
  gap: 24px;
}

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

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

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .logo-text {
    display: none;
  }

  .hero {
    padding-top: 100px;
    text-align: center;
  }

  .hero-content {
    max-width: 100%;
  }

  .hero-subtitle {
    max-width: 100%;
  }

  .hero-actions {
    justify-content: center;
  }

  .app-card {
    flex-direction: column;
    text-align: center;
  }

  .app-links {
    justify-content: center;
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }

  .store-badge {
    width: 100%;
    max-width: 200px;
    justify-content: center;
  }

  .footer-content {
    flex-direction: column;
    text-align: center;
  }
}

/* ========================================
   Scrollbar
   ======================================== */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--color-bg);
}

::-webkit-scrollbar-thumb {
  background: var(--color-border);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-border-light);
}

/* Selection */
::selection {
  background: rgba(99, 102, 241, 0.3);
  color: var(--color-text);
}
