/* ===== VARIABLES ===== */
:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #dbeafe;
  --secondary: #7c3aed;
  --dark: #1e293b;
  --dark-light: #334155;
  --light: #f8fafc;
  --gray: #64748b;
  --gray-light: #e2e8f0;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --border-radius: 12px;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s ease;
}

/* ===== RESET & BASE ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--dark);
  background: var(--light);
  line-height: 1.6;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ===== HEADER ===== */
.header {
  background: white;
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.logo i {
  font-size: 32px;
  color: var(--primary);
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.logo-main {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--dark);
}

.logo-sub {
  font-size: 0.875rem;
  color: var(--gray);
  font-weight: 500;
}

.btn-guide {
  background: var(--primary);
  color: white;
  padding: 10px 24px;
  border-radius: var(--border-radius);
  text-decoration: none;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
}

.btn-guide:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* ===== HERO SECTION (COMPACT) ===== */
.hero {
  background: linear-gradient(
    135deg,
    rgba(37, 99, 235, 0.95) 0%,
    rgba(124, 58, 237, 0.95) 100%
  );
  color: white;
  padding: 60px 0 40px; /* Reduced padding */
  position: relative;
  overflow: hidden;
  min-height: 60vh; /* Reduced height */
  display: flex;
  align-items: center;
}

/* Subtle pattern background */
.hero-bg-image {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(
      circle at 15% 20%,
      rgba(255, 255, 255, 0.03) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 85% 80%,
      rgba(255, 255, 255, 0.03) 0%,
      transparent 50%
    );
  opacity: 0.3;
  z-index: 1;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    rgba(37, 99, 235, 0.85) 0%,
    rgba(124, 58, 237, 0.85) 100%
  );
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
  padding: 10px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 8px 16px;
  border-radius: 50px;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 20px;
}

.hero-title {
  font-size: 2.5rem; /* Reduced from 2.8rem */
  font-weight: 700;
  margin-bottom: 16px;
  line-height: 1.2;
}

.hero-title-line {
  display: block;
}

.hero-subtitle {
  font-size: 1.1rem;
  opacity: 0.9;
  margin-bottom: 30px; /* Reduced from 40px */
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.5;
}

/* ===== SEARCH ===== */
.search-container {
  max-width: 700px;
  margin: 0 auto 20px; /* Reduced bottom margin */
}

.search-box {
  position: relative;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--border-radius);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.search-icon {
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.125rem;
  margin-right: 12px;
}

.search-box input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 1rem;
  color: white;
  background: transparent;
  font-weight: 500;
}

.search-box input::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

.btn-clear {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  padding: 4px;
  font-size: 1rem;
  transition: var(--transition);
}

.btn-clear:hover {
  color: white;
}

.search-info {
  margin-top: 12px;
  text-align: center;
  font-size: 0.875rem;
  opacity: 0.8;
}

/* ===== HERO STATS (COMPACT) ===== */
.hero-stats {
  display: flex;
  justify-content: center;
  gap: 20px; /* Reduced from 30px */
  margin-top: 30px; /* Reduced from 50px */
  flex-wrap: wrap;
}

.hero-stat {
  display: flex;
  align-items: center;
  gap: 10px; /* Reduced from 12px */
  text-align: left;
  padding: 12px 16px; /* Reduced padding */
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--border-radius);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
  min-width: 160px; /* Reduced from 180px */
}

.hero-stat i {
  font-size: 1.25rem; /* Reduced from 1.5rem */
  color: white;
  opacity: 0.9;
}

.hero-stat h4 {
  font-size: 1rem; /* Reduced */
  font-weight: 600;
  margin-bottom: 2px;
}

.hero-stat p {
  font-size: 0.75rem; /* Reduced */
  opacity: 0.8;
}

/* ===== SCROLL INDICATOR ===== */
.scroll-indicator {
  position: absolute;
  bottom: 15px; /* Moved up */
  left: 50%;
  transform: translateX(-50%);
  color: white;
  font-size: 1.2rem;
  opacity: 0.6;
  animation: bounce 2s infinite;
  cursor: pointer;
  z-index: 2;
}

@keyframes bounce {
  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateX(-50%) translateY(0);
  }
  40% {
    transform: translateX(-50%) translateY(-5px);
  }
  60% {
    transform: translateX(-50%) translateY(-2px);
  }
}

/* ===== STATS SECTION ===== */
.stats {
  padding: 60px 0; /* Reduced from 80px */
  background: white;
  position: relative;
  z-index: 3;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px; /* Reduced from 24px */
}

.stat-card {
  background: var(--light);
  border-radius: var(--border-radius);
  padding: 20px; /* Reduced from 24px */
  display: flex;
  align-items: center;
  gap: 16px; /* Reduced from 20px */
  transition: var(--transition);
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.stat-icon {
  width: 50px; /* Reduced from 60px */
  height: 50px; /* Reduced from 60px */
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.25rem; /* Reduced from 1.5rem */
}

.stat-content h3 {
  font-size: 1.75rem; /* Reduced from 2rem */
  font-weight: 700;
  color: var(--dark);
  line-height: 1;
  margin-bottom: 4px;
}

.stat-content p {
  color: var(--gray);
  font-size: 0.875rem;
}

/* ===== APPLICATIONS ===== */
.applications {
  padding: 60px 0; /* Reduced from 80px */
  background: var(--light);
}

.section-header {
  text-align: center;
  margin-bottom: 40px; /* Reduced from 48px */
}

.section-header h2 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.section-header p {
  color: var(--gray);
  max-width: 600px;
  margin: 0 auto;
}

/* ===== APPS GRID 4x2 ===== */
.apps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px; /* Reduced from 24px */
  margin-bottom: 40px;
}

.app-card {
  background: white;
  border-radius: var(--border-radius);
  padding: 20px; /* Reduced from 24px */
  box-shadow: var(--shadow);
  transition: var(--transition);
  border: 1px solid transparent;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.app-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-light);
}

.app-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px; /* Reduced from 20px */
}

.app-icon {
  width: 48px; /* Reduced from 56px */
  height: 48px; /* Reduced from 56px */
  border-radius: 10px; /* Reduced from 12px */
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem; /* Reduced from 1.5rem */
  color: white;
}

.app-code {
  padding: 5px 10px; /* Reduced */
  border-radius: 15px; /* Reduced from 20px */
  font-size: 0.7rem; /* Reduced from 0.75rem */
  font-weight: 600;
  letter-spacing: 0.5px;
}

.app-body {
  flex: 1;
  margin-bottom: 20px; /* Reduced from 24px */
}

.app-title {
  font-size: 1.1rem; /* Reduced from 1.25rem */
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 8px;
  line-height: 1.3;
}

.app-desc {
  color: var(--gray);
  font-size: 0.8rem; /* Reduced from 0.875rem */
  margin-bottom: 12px; /* Reduced from 16px */
  line-height: 1.5;
}

.app-url {
  display: flex;
  align-items: center;
  gap: 6px; /* Reduced from 8px */
  color: var(--primary);
  font-size: 0.8rem; /* Reduced from 0.875rem */
}

.app-url i {
  font-size: 0.7rem; /* Reduced from 0.75rem */
}

.app-footer {
  display: flex;
  gap: 10px; /* Reduced from 12px */
  margin-top: auto;
}

.btn-primary,
.btn-secondary {
  flex: 1;
  padding: 8px 14px; /* Reduced from 10px 16px */
  border-radius: 8px;
  text-decoration: none;
  font-size: 0.8rem; /* Reduced from 0.875rem */
  font-weight: 500;
  text-align: center;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn-primary {
  background: var(--primary);
  color: white;
  border: 2px solid var(--primary);
}

.btn-primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  transform: translateY(-2px);
}

.btn-secondary {
  background: white;
  color: var(--primary);
  border: 2px solid var(--gray-light);
}

.btn-secondary:hover {
  background: var(--primary-light);
  border-color: var(--primary);
  transform: translateY(-2px);
}

/* ===== EMPTY STATE ===== */
.empty-state {
  text-align: center;
  padding: 50px 20px; /* Reduced from 60px */
}

.empty-state i {
  font-size: 56px; /* Reduced from 64px */
  color: var(--gray-light);
  margin-bottom: 20px;
}

.empty-state h3 {
  font-size: 1.5rem;
  color: var(--dark);
  margin-bottom: 8px;
}

.empty-state p {
  color: var(--gray);
  margin-bottom: 20px; /* Reduced from 24px */
}

.btn-reset {
  background: var(--primary);
  color: white;
  border: none;
  padding: 10px 20px; /* Reduced from 12px 24px */
  border-radius: var(--border-radius);
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
}

.btn-reset:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
}

/* ===== FOOTER ===== */
.footer {
  background: var(--dark);
  color: white;
  padding: 50px 0 25px; /* Reduced from 60px 0 30px */
}

.footer-content {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 50px; /* Reduced from 60px */
  margin-bottom: 30px; /* Reduced from 40px */
}

.footer-info {
  max-width: 300px;
}

.footer-desc {
  color: rgba(255, 255, 255, 0.7);
  margin-top: 16px;
  font-size: 0.875rem;
  line-height: 1.6;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px; /* Reduced from 40px */
}

.link-group h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 16px; /* Reduced from 20px */
  display: flex;
  align-items: center;
  gap: 8px;
}

.link-group a {
  display: flex;
  align-items: center;
  gap: 8px; /* Reduced from 10px */
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-size: 0.875rem;
  margin-bottom: 10px; /* Reduced from 12px */
  transition: var(--transition);
}

.link-group a:hover {
  color: white;
  transform: translateX(4px);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 25px; /* Reduced from 30px */
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.875rem;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .apps-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-title {
    font-size: 2.2rem;
  }
}

@media (max-width: 768px) {
  .hero {
    padding: 50px 0 30px;
    min-height: 55vh; /* More compact on mobile */
  }

  .hero-title {
    font-size: 1.8rem;
  }

  .hero-subtitle {
    font-size: 1rem;
    margin-bottom: 25px;
  }

  .apps-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .footer-links {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }

  .hero-stats {
    gap: 15px;
    margin-top: 25px;
  }

  .hero-stat {
    min-width: 140px;
    padding: 10px 14px;
  }
}

@media (max-width: 480px) {
  .hero {
    padding: 40px 0 20px;
    min-height: 50vh; /* Very compact on small screens */
  }

  .hero-title {
    font-size: 1.5rem;
  }

  .hero-badge {
    font-size: 0.75rem;
    padding: 6px 12px;
  }

  .apps-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .stats-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .app-footer {
    flex-direction: column;
    gap: 8px;
  }

  .section-header h2 {
    font-size: 1.5rem;
  }

  .scroll-indicator {
    bottom: 10px;
    font-size: 1rem;
  }
}
