:root {
  --primary: #1a237e;
  --primary-light: #3949ab;
  --surface: #fff;
  --bg: #f8f9fa;
  --text: #202124;
  --text-muted: #5f6368;
  --card-shadow: 0 1px 3px rgba(0,0,0,.08);
  --card-shadow-hover: 0 4px 12px rgba(0,0,0,.12);
  --radius: 12px;
  --radius-sm: 8px;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: 'Google Sans', Roboto, system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
}
.header {
  background: var(--surface);
  box-shadow: var(--card-shadow);
  position: sticky;
  top: 0;
  z-index: 10;
}
.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-size: 1.25rem;
}
.logo-icon { color: var(--primary); }
.nav { display: flex; gap: 20px; align-items: center; }
.nav a { color: var(--text-muted); text-decoration: none; font-weight: 500; }
.nav a:hover { color: var(--primary); }
.admin-link { font-size: 0.9rem; color: var(--text-muted); }
.main { max-width: 1200px; margin: 0 auto; padding: 24px 20px 48px; }
.hero { text-align: center; padding: 40px 20px 32px; }
.hero h1 { margin: 0 0 12px; font-size: clamp(1.75rem, 4vw, 2.25rem); font-weight: 700; color: var(--text); }
.hero-sub { margin: 0; font-size: 1.1rem; color: var(--text-muted); max-width: 560px; margin-left: auto; margin-right: auto; }
.tabs { display: flex; gap: 8px; margin-bottom: 24px; border-bottom: 1px solid #e8eaed; }
.tab {
  padding: 12px 20px; border: none; background: none; font-size: 1rem; font-weight: 500;
  color: var(--text-muted); cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -1px; border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.panel { display: none; }
.panel.active { display: block; }
.panel-title { margin: 0 0 8px; font-size: 1.35rem; font-weight: 600; }
.panel-desc { margin: 0 0 20px; color: var(--text-muted); font-size: 0.95rem; }
.category-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.category-chip {
  padding: 8px 16px; border-radius: 20px; border: 1px solid #dadce0; background: var(--surface);
  font-size: 0.9rem; cursor: pointer; color: var(--text);
}
.category-chip:hover { background: #f1f3f4; }
.category-chip.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}
.app-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  padding: 20px;
  transition: box-shadow 0.2s;
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.app-card:hover { box-shadow: var(--card-shadow-hover); }
.app-card-icon {
  width: 56px; height: 56px; border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  display: flex; align-items: center; justify-content: center; color: #c9a227; font-size: 1.5rem; flex-shrink: 0;
  overflow: hidden;
}
.app-card-icon-img { width: 100%; height: 100%; object-fit: contain; }
.app-card-icon-fallback { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; }
.app-card-body { flex: 1; min-width: 0; }
.app-card-name { margin: 0 0 4px; font-weight: 600; font-size: 1.05rem; }
.app-card-meta { margin: 0 0 6px; font-size: 0.8rem; color: var(--text-muted); }
.app-card-desc { margin: 0; font-size: 0.9rem; color: var(--text-muted); line-height: 1.4; }
.app-card-tiers { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 4px; }
.tier-badge { font-size: 0.7rem; padding: 2px 8px; border-radius: 10px; background: #e8f5e9; color: #2e7d32; }
.loading, .empty { padding: 40px 20px; text-align: center; color: var(--text-muted); }
.footer { text-align: center; padding: 24px 20px; color: var(--text-muted); font-size: 0.9rem; border-top: 1px solid #e8eaed; }
.footer a { color: var(--primary); text-decoration: none; }
@media (max-width: 600px) { .app-grid { grid-template-columns: 1fr; } .nav .admin-link { display: none; } }
