:root {
  --bg: #f3f5fb;
  --card: #ffffff;
  --text: #1f2430;
  --muted: #80869a;
  --line: #e7eaf2;
  --new: #2f72ff;
  --mod: #ef3f37;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: radial-gradient(circle at 20% -10%, #ffffff, var(--bg));
  color: var(--text);
}

.app-shell {
  max-width: 860px;
  margin: 0 auto;
  min-height: 100vh;
  background: #fff;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(5px);
  border-bottom: 1px solid var(--line);
  padding: 14px 16px;
  display: grid;
  grid-template-columns: 32px 1fr 32px;
  gap: 10px;
  align-items: center;
}

.icon-btn {
  border: 0;
  background: transparent;
  color: #56607a;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
}

.icon-btn svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: rgba(15, 23, 38, 0.36);
}

.menu-sheet {
  width: min(320px, calc(100% - 24px));
  height: 100%;
  background: #fff;
  padding: 18px 16px;
  box-shadow: 18px 0 48px rgba(14, 25, 45, 0.16);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.menu-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.menu-head h3 {
  margin: 0;
  font-size: 20px;
}

.menu-head p {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--muted);
}

.menu-close {
  flex-shrink: 0;
}

.menu-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.menu-links a {
  text-decoration: none;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 14px;
  font-weight: 600;
  background: #fff;
}

.menu-note {
  margin-top: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  background: #fafbff;
}

.menu-note strong {
  display: block;
  margin-bottom: 8px;
}

.menu-note p {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  color: #4f5b75;
}

.brand-wrap {
  display: flex;
  gap: 10px;
  align-items: center;
}

.brand-dot,
.brand-logo {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  overflow: hidden;
  flex-shrink: 0;
}

.brand-dot {
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  background: linear-gradient(135deg, #4461ff, #9245ff);
}

.brand-logo img {
  width: 100%;
  height: 100%;
  display: block;
}

h1 {
  margin: 0;
  font-size: 19px;
}

.brand-wrap p {
  margin: 1px 0 0;
  font-size: 11px;
  color: var(--muted);
}

.content {
  padding: 0 16px 30px;
}

.headline {
  margin-top: 0;
}

.headline h2 {
  margin: 0 0 14px;
  font-size: 34px;
  line-height: 1.1;
}

.search-panel {
  margin-bottom: 14px;
}

.search-panel input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  outline: none;
}

.search-panel input:focus {
  border-color: #4a72ff;
  box-shadow: 0 0 0 3px rgba(74, 114, 255, 0.14);
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.loading-note {
  margin: 6px 0;
  color: #6d7690;
  font-size: 14px;
}

.card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  overflow: hidden;
  padding: 8px 8px 10px;
}

.card-link {
  text-decoration: none;
  color: inherit;
}

.thumb {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 36px;
  font-weight: 700;
  overflow: hidden;
}

.thumb-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gradient-1 { background: linear-gradient(140deg, #2472ff, #7f52ff); }
.gradient-2 { background: linear-gradient(140deg, #0b0f1f, #39466f); }
.gradient-3 { background: radial-gradient(circle, #ceff2f, #0f1726); }
.gradient-4 { background: linear-gradient(140deg, #f6c, #ff7d6b); }

.badges {
  position: absolute;
  top: 14px;
  left: 14px;
  display: flex;
  gap: 6px;
}

.badge {
  font-size: 10px;
  color: #fff;
  padding: 3px 8px;
  border-radius: 999px;
  font-weight: 700;
}

.badge.new { background: var(--new); }
.badge.mod { background: var(--mod); }

.card h3 {
  margin: 10px 0 4px;
  font-size: 23px;
  line-height: 1.1;
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 19px;
}

.meta {
  margin-top: 8px;
  display: flex;
  justify-content: space-between;
  color: #5b637b;
  font-size: 17px;
}

.apps-footer-note {
  margin-top: 20px;
  padding: 6px 0 0;
}

.apps-footer-note h3 {
  margin: 0 0 10px;
  font-size: 18px;
  color: #1d2433;
}

.apps-footer-note p {
  margin: 8px 0;
  font-size: 14px;
  color: #4f5b75;
  line-height: 1.65;
}

.footer-links {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
}

.footer-links a {
  text-decoration: none;
  color: #2f72ff;
  padding: 0;
  font-size: 13px;
  font-weight: 600;
}

.footer-links a:hover {
  text-decoration: underline;
}

.site-footer {
  margin-top: 22px;
  padding: 18px 0 10px;
  border-top: 1px solid var(--line);
  text-align: center;
}

.site-footer p {
  margin: 0;
  font-size: 12px;
  color: #6b748b;
}

.site-footer-links {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  justify-content: center;
}

.site-footer-links a {
  text-decoration: none;
  color: #44506b;
  font-size: 12px;
}

.site-footer-links a:hover {
  text-decoration: underline;
}

@media (max-width: 640px) {
  .headline h2 {
    font-size: 28px;
  }

  .card h3 {
    font-size: 19px;
  }

  .card p,
  .meta {
    font-size: 15px;
  }
}
