:root {
  color-scheme: light;
  --bg: #f6f7fb;
  --surface: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --primary: #c0262f;
  --primary-soft: rgba(192, 38, 47, 0.12);
  --border: rgba(148, 163, 184, 0.2);
  --shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: "Segoe UI", "Inter", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: min(1100px, 92%);
  margin: 0 auto;
}

.site-header {
  background: radial-gradient(circle at top left,
      #c02626, #420044 65%);
  color: #f8fafc;
  padding: 1.8rem 0 2.3rem;
  position: sticky;
  top: 0;
  z-index: 5;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand-mark {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.16);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 1.2rem;
}

.brand-title {
  font-weight: 700;
  font-size: 1.25rem;
}

.brand-subtitle {
  font-size: 0.9rem;
  color: rgba(248, 250, 252, 0.7);
}

.header-pill {
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(148, 163, 184, 0.4);
  padding: 0.5rem 1rem;
  border-radius: 999px;
  font-size: 0.85rem;
}

.site-main {
  margin-top: -1.5rem;
  padding-bottom: 3rem;
}

.hero {
  background: var(--surface);
  border-radius: 20px;
  padding: 2rem;
  box-shadow: var(--shadow);
  display: grid;
  gap: 1.25rem;
}

.hero h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.6rem, 2vw, 2.2rem);
}

.hero p {
  margin: 0;
  color: var(--muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: end;
}

.search {
  flex: 1;
  min-width: 220px;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.search input {
  border-radius: 12px;
  border: 1px solid var(--border);
  padding: 0.9rem 1rem;
  font-size: 1rem;
  background: #fff;
}

.search input:focus {
  outline: 2px solid var(--primary-soft);
  border-color: var(--primary);
}

.ghost-button {
  padding: 0.8rem 1.4rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s ease;
}

.ghost-button:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.content {
  margin-top: 2rem;
  display: grid;
  gap: 1.5rem;
}

.applications-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.2rem;
}

.app-card {
  background: var(--surface);
  border-radius: 18px;
  padding: 1.25rem;
  border: 1px solid transparent;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.app-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 34px rgba(15, 23, 42, 0.12);
}

.app-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1rem;
}

.app-card-header-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.app-card-logo {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #f1f5f9;
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  overflow: hidden;
  flex-shrink: 0;
}

.app-card-logo.has-logo {
  background: transparent;
  border-color: transparent;
}

.app-card-logo img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

.app-card-logo span {
  font-weight: 700;
  color: var(--muted);
  font-size: 0.95rem;
}

.app-card-badge {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
}

.app-card-body h3 {
  margin: 0 0 0.6rem;
  font-size: 1.1rem;
}

.app-card-body p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

.state {
  background: var(--surface);
  border-radius: 18px;
  padding: 2rem;
  display: flex;
  gap: 1rem;
  align-items: center;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
  color: var(--muted);
}

.state strong {
  color: var(--text);
  display: block;
  margin-bottom: 0.25rem;
}

.state.loading .spinner {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 4px solid rgba(148, 163, 184, 0.3);
  border-top-color: var(--primary);
  animation: spin 1s linear infinite;
}

.state.error {
  justify-content: space-between;
}

.primary-button {
  padding: 0.7rem 1.3rem;
  border-radius: 999px;
  border: none;
  background: var(--primary);
  color: white;
  cursor: pointer;
}

.site-footer {
  margin-top: 3rem;
  padding: 1.6rem 0 2.5rem;
  color: var(--muted);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.9rem;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 720px) {
  .site-header {
    padding: 1.6rem 0 2rem;
  }

  .hero {
    padding: 1.7rem 1.4rem;
  }

  .state {
    flex-direction: column;
    align-items: flex-start;
  }
}