/* SS PREMIUM SHOP — gold-on-black theme, echoing the </> circuit + shield mark of the logo */

:root {
  --ink: #0a0a0b;
  --panel: #141416;
  --panel-2: #1c1c1f;
  --line: #2a2a2e;
  --gold: #d4af37;
  --gold-light: #f3d874;
  --gold-dim: #8a6f22;
  --text: #f2efe6;
  --muted: #a8a49a;
  --radius: 14px;
  --maxw: 1180px;
  font-size: 16px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  line-height: 1.5;
  background-image:
    radial-gradient(circle at 15% 0%, rgba(212,175,55,0.07), transparent 40%),
    radial-gradient(circle at 100% 20%, rgba(212,175,55,0.05), transparent 35%);
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

h1, h2, h3 {
  font-family: 'Poppins', 'Segoe UI', sans-serif;
  letter-spacing: 0.2px;
  margin: 0 0 10px;
}

/* code-motif accent used sparingly as the page's signature */
.code-tag { color: var(--gold-dim); font-family: 'JetBrains Mono', monospace; font-size: 0.85em; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10,10,11,0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 18px; padding: 12px 0; }
.brand { display: flex; align-items: center; gap: 12px; font-weight: 700; font-size: 1.15rem; }
.brand img { width: 42px; height: 42px; border-radius: 50%; border: 2px solid var(--gold); }
.brand small { display: block; font-weight: 400; color: var(--muted); font-size: 0.65rem; letter-spacing: 1.5px; text-transform: uppercase; }

.search-form { flex: 1; max-width: 420px; margin-left: auto; position: relative; }
.search-form input {
  width: 100%; padding: 10px 14px 10px 38px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--panel); color: var(--text); font-size: 0.9rem;
}
.search-form input:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
.search-form::before {
  content: '⌕'; position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  color: var(--gold-dim); font-size: 1rem;
}

.site-nav { display: flex; gap: 4px; }
.site-nav a {
  padding: 8px 14px; border-radius: 999px; font-size: 0.88rem; color: var(--muted);
  transition: color .15s, background .15s;
}
.site-nav a:hover, .site-nav a.active { color: var(--ink); background: var(--gold); }

.admin-link {
  border: 1px solid var(--gold-dim); border-radius: 999px; padding: 7px 14px;
  font-size: 0.82rem; color: var(--gold-light); white-space: nowrap;
}
.admin-link:hover { background: var(--gold); color: var(--ink); }

/* Hero */
.hero { padding: 56px 0 40px; border-bottom: 1px solid var(--line); position: relative; overflow: hidden; }
.hero::after {
  content: '</>'; position: absolute; right: -10px; bottom: -30px; font-size: 180px;
  font-family: 'JetBrains Mono', monospace; color: rgba(212,175,55,0.05); font-weight: 700; pointer-events: none;
}
.hero h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.hero h1 span { color: var(--gold); }
.hero p { color: var(--muted); max-width: 560px; font-size: 1.02rem; }
.hero-badges { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.hero-badges span {
  border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; font-size: 0.78rem; color: var(--muted);
}
.hero-badges span b { color: var(--gold-light); }

/* Category chips */
.chip-row { display: flex; gap: 10px; overflow-x: auto; padding: 18px 0; }
.chip-row::-webkit-scrollbar { height: 4px; }
.chip {
  flex: 0 0 auto; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--panel); color: var(--muted); font-size: 0.85rem; cursor: pointer; white-space: nowrap;
}
.chip.active, .chip:hover { border-color: var(--gold); color: var(--gold-light); }

/* Section headings */
.section { padding: 30px 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 16px; }
.section-head h2 { font-size: 1.3rem; }
.section-head .eyebrow { color: var(--gold-dim); font-size: 0.78rem; letter-spacing: 2px; text-transform: uppercase; display: block; margin-bottom: 4px; }

/* Grid + cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; display: flex; flex-direction: column; gap: 10px; transition: transform .15s, border-color .15s;
}
.card:hover { transform: translateY(-3px); border-color: var(--gold-dim); }
.card .icon-row { display: flex; gap: 12px; align-items: center; }
.card .icon-row img.app-icon {
  width: 54px; height: 54px; border-radius: 14px; object-fit: cover; background: var(--panel-2);
  border: 1px solid var(--line);
}
.card .app-name { font-weight: 600; font-size: 0.95rem; line-height: 1.25; }
.card .app-cat { font-size: 0.72rem; color: var(--gold-dim); text-transform: uppercase; letter-spacing: 0.5px; }
.card .meta-row { display: flex; justify-content: space-between; font-size: 0.78rem; color: var(--muted); }
.card .stars { color: var(--gold); }
.card .btn { margin-top: auto; }

.btn {
  display: inline-block; text-align: center; padding: 9px 16px; border-radius: 10px;
  background: var(--gold); color: var(--ink); font-weight: 600; font-size: 0.85rem; border: none; cursor: pointer;
}
.btn:hover { background: var(--gold-light); }
.btn.ghost { background: transparent; border: 1px solid var(--gold-dim); color: var(--gold-light); }
.btn.danger { background: #a83232; color: #fff; }
.btn.small { padding: 6px 12px; font-size: 0.78rem; }

.empty-state { text-align: center; padding: 60px 20px; color: var(--muted); }
.empty-state .code-tag { display: block; font-size: 1.4rem; margin-bottom: 10px; }

/* App detail page */
.app-detail { display: grid; grid-template-columns: 120px 1fr; gap: 20px; padding: 32px 0 20px; align-items: start; }
.app-detail img.app-icon-lg { width: 120px; height: 120px; border-radius: 26px; border: 1px solid var(--line); }
.app-detail h1 { font-size: 1.6rem; }
.app-detail .meta-strip { display: flex; gap: 18px; flex-wrap: wrap; color: var(--muted); font-size: 0.85rem; margin: 10px 0 18px; }
.app-detail .meta-strip b { color: var(--gold-light); display: block; font-size: 1rem; }
.shots-row { display: flex; gap: 12px; overflow-x: auto; padding: 6px 0 20px; }
.shots-row img { width: 200px; border-radius: 10px; border: 1px solid var(--line); flex: 0 0 auto; }
.app-desc { color: #d9d5c9; line-height: 1.7; white-space: pre-line; }
.section-title-sm { font-size: 1rem; color: var(--gold-light); margin: 24px 0 10px; }

@media (max-width: 640px) {
  .header-inner { flex-wrap: wrap; }
  .search-form { order: 3; max-width: 100%; margin-left: 0; width: 100%; }
  .site-nav { display: none; }
  .app-detail { grid-template-columns: 84px 1fr; }
  .app-detail img.app-icon-lg { width: 84px; height: 84px; }
}

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 34px 0; margin-top: 40px; color: var(--muted); font-size: 0.85rem; }
.site-footer .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; align-items: center; }
.site-footer .brand-mini { display: flex; align-items: center; gap: 8px; }
.site-footer .brand-mini img { width: 26px; height: 26px; border-radius: 50%; }

/* Admin */
body.admin-body { background: var(--ink); }
.admin-shell { display: flex; min-height: 100vh; }
.admin-sidebar {
  width: 230px; background: var(--panel); border-right: 1px solid var(--line);
  padding: 20px 14px; display: flex; flex-direction: column; gap: 6px; flex-shrink: 0;
}
.admin-sidebar .brand { padding: 0 8px 16px; border-bottom: 1px solid var(--line); margin-bottom: 10px; }
.admin-sidebar button {
  text-align: left; background: none; border: none; color: var(--muted); padding: 10px 12px;
  border-radius: 8px; cursor: pointer; font-size: 0.9rem;
}
.admin-sidebar button.active, .admin-sidebar button:hover { background: var(--panel-2); color: var(--gold-light); }
.admin-main { flex: 1; padding: 28px 32px; max-width: 1000px; }
.admin-topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 22px; }
.admin-topbar h1 { font-size: 1.3rem; margin: 0; }

.login-shell { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.login-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 36px 32px; width: 100%; max-width: 360px; text-align: center;
}
.login-card img { width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 14px; border: 2px solid var(--gold); }
.login-card h1 { font-size: 1.2rem; }
.field { text-align: left; margin-bottom: 14px; }
.field label { display: block; font-size: 0.8rem; color: var(--muted); margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--panel-2); color: var(--text); font-size: 0.9rem; font-family: inherit;
}
.field textarea { min-height: 90px; resize: vertical; }
.field .hint { font-size: 0.75rem; color: var(--muted); margin-top: 4px; }
.error-box { background: rgba(168,50,50,0.15); border: 1px solid #a83232; color: #ff9a9a; padding: 10px 12px; border-radius: 8px; font-size: 0.85rem; margin-bottom: 14px; }
.success-box { background: rgba(212,175,55,0.12); border: 1px solid var(--gold-dim); color: var(--gold-light); padding: 10px 12px; border-radius: 8px; font-size: 0.85rem; margin-bottom: 14px; }

table.data-table { width: 100%; border-collapse: collapse; background: var(--panel); border-radius: var(--radius); overflow: hidden; }
table.data-table th, table.data-table td { padding: 10px 12px; border-bottom: 1px solid var(--line); font-size: 0.85rem; text-align: left; }
table.data-table th { color: var(--gold-light); background: var(--panel-2); }
table.data-table img { width: 34px; height: 34px; border-radius: 8px; }
.row-actions { display: flex; gap: 6px; }

.modal-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,0.6); display: flex; align-items: flex-start;
  justify-content: center; padding: 40px 16px; overflow-y: auto; z-index: 100;
}
.modal {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; width: 100%; max-width: 560px;
}
.modal h2 { font-size: 1.1rem; }
.modal .two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.icon-preview-row { display: flex; align-items: center; gap: 12px; }
.icon-preview-row img { width: 56px; height: 56px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel-2); }
.toolbar { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.stat-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px,1fr)); gap: 14px; margin-bottom: 24px; }
.stat-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.stat-card .num { font-size: 1.7rem; font-weight: 700; color: var(--gold-light); }
.stat-card .label { font-size: 0.78rem; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; }
