
:root {
  --bg: #0b0f14;
  --bg-soft: #121820;
  --card: #0f1620;
  --text: #e7f6f7;
  --muted: #9fb8bf;
  --teal: #1fb9cc;
  --amber: #ffae2b;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: radial-gradient(1200px 700px at 80% -10%, rgba(255,174,43,0.12), transparent 60%),
              radial-gradient(1000px 600px at 10% 0%, rgba(31,185,204,0.12), transparent 55%),
              var(--bg);
  color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
}

.container { max-width: 1100px; margin: 0 auto; padding: 18px; }

.header { display: flex; align-items: center; gap: 16px; padding: 12px 0 6px; }
.header img.logo { width: clamp(64px, 10vw, 110px); height: auto; border-radius: 16px; filter: drop-shadow(0 6px 18px rgba(0,0,0,0.4)); }
.title { display: flex; flex-direction: column; gap: 4px; }
.title h1 { margin: 0; font-weight: 800; letter-spacing: 0.2px; font-size: clamp(24px, 5vw, 40px); }
.title p { margin: 0; color: var(--muted); }

.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 14px; overflow: visible; align-items: start; }
@media (max-width: 980px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .grid { grid-template-columns: 1fr; } }

.card {
  background: var(--card);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 18px;
  padding: 18px;
  text-decoration: none; color: inherit;
  transition: box-shadow .14s ease, border-color .14s ease;
  position: relative; overflow: visible; min-height: 0;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
}
.card:hover { box-shadow: 0 14px 30px rgba(0,0,0,0.35); border-color: rgba(31,185,204,0.3); }
.card .badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 10px;
  background: linear-gradient(135deg, rgba(31,185,204,0.3), rgba(255,174,43,0.3));
  margin-bottom: 10px; font-weight: 700;
}
.card .thumb { display:block; max-height:40px; width:auto; margin-bottom:8px; border-radius:8px; object-fit:contain; }
.card h3 { margin: 6px 0 6px; font-size: 18px; }
.card p { margin: 0; color: var(--muted); overflow-wrap: anywhere; word-break: break-word; }

.footer { margin: 28px 0 10px; color: var(--muted); font-size: 14px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.footer .mini { display: inline-flex; gap: 10px; align-items: center; }
.footer img.mini-logo { width: 24px; height: 24px; border-radius: 6px; }

.theme-toggle {
  appearance: none; background: var(--card);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px; padding: 8px 12px; color: var(--text);
  cursor: pointer; transition: background .14s ease;
}
.theme-toggle:hover { background: var(--bg-soft); }

.light {
  --bg: #f7fbfc; --bg-soft: #edf4f6; --card: #ffffff; --text: #0b1320; --muted: #4a6570;
}
