html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

:root {
  --brand-1: #6366f1;
  --brand-2: #8b5cf6;
  --brand-3: #ec4899;
  --ink: #0f172a;
  --ink-soft: #475569;
  --surface: rgba(255, 255, 255, 0.7);
  --surface-border: rgba(255, 255, 255, 0.5);
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", Roboto, sans-serif;
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(99, 102, 241, 0.25), transparent 60%),
    radial-gradient(900px 500px at 100% 0%, rgba(236, 72, 153, 0.20), transparent 60%),
    radial-gradient(800px 600px at 50% 100%, rgba(139, 92, 246, 0.18), transparent 60%),
    linear-gradient(180deg, #f8fafc 0%, #eef2ff 100%);
  background-attachment: fixed;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #818cf8;
}

/* Navbar */
.navbar {
  background: rgba(255, 255, 255, 0.65) !important;
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid rgba(15, 23, 42, 0.06) !important;
  box-shadow: none !important;
}

.navbar-brand {
  font-size: 1.15rem;
  letter-spacing: -0.2px;
}

.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--brand-1), var(--brand-2) 50%, var(--brand-3));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.95rem;
  box-shadow: 0 6px 16px rgba(99, 102, 241, 0.35);
}

.gradient-text {
  background: linear-gradient(90deg, var(--brand-1), var(--brand-2) 50%, var(--brand-3));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* Hub header */
.hub-header h1 {
  letter-spacing: -1.2px;
  font-weight: 800;
  font-size: clamp(2.2rem, 4.5vw, 3.5rem);
  line-height: 1.05;
}

.hub-header .lead {
  color: var(--ink-soft);
  max-width: 640px;
  margin-inline: auto;
  font-size: 1.05rem;
}

/* App card */
.app-card {
  color: inherit;
  position: relative;
  border-radius: 20px !important;
  border: 1px solid rgba(15, 23, 42, 0.06);
  background: var(--surface);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.04);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  overflow: hidden;
}

.app-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0), rgba(139, 92, 246, 0), rgba(236, 72, 153, 0));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
  transition: background 0.25s ease;
}

.app-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 14px 40px rgba(99, 102, 241, 0.18), 0 4px 12px rgba(15, 23, 42, 0.05);
  border-color: transparent;
}

.app-card:hover::before {
  background: linear-gradient(135deg, var(--brand-1), var(--brand-2) 50%, var(--brand-3));
}

.app-card.disabled {
  pointer-events: none;
  opacity: 0.6;
}

.app-card .card-body {
  padding: 1.5rem;
}

.app-card .card-title {
  font-size: 1.15rem;
  letter-spacing: -0.3px;
  margin-bottom: 0.4rem;
}

.app-card .card-text {
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--ink-soft);
}

.app-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--brand-1), var(--brand-2) 60%, var(--brand-3));
  color: white;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: 0 10px 22px rgba(99, 102, 241, 0.35);
}

/* Status pill */
.status-pill {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.status-pill::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.6);
}

.status-live {
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
}

.status-live::before {
  animation: live-pulse 1.6s ease-in-out infinite;
}

@keyframes live-pulse {
  0%, 100% {
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.6), 0 0 0 0 rgba(16, 185, 129, 0.7);
  }
  50% {
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.6), 0 0 0 6px rgba(16, 185, 129, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .status-live::before { animation: none; }
}

.status-beta {
  background: rgba(245, 158, 11, 0.15);
  color: #b45309;
}

.status-coming {
  background: rgba(100, 116, 139, 0.15);
  color: #475569;
}

/* Category chip */
.category-chip {
  font-size: 0.72rem;
  font-weight: 500;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  background: rgba(99, 102, 241, 0.08);
  color: #4f46e5;
  border: 1px solid rgba(99, 102, 241, 0.15);
}

/* Footer */
.footer {
  background: transparent;
  border-top: 1px solid rgba(15, 23, 42, 0.06) !important;
}
