/* Excel Games — pure CSS theme (green) */
:root {
  --bg: #f7f8ff;
  --bg-grad-1: #e5e9ff;
  --bg-grad-2: #d7deff;

  --surface: #ffffff;
  --surface-2: #f4f6ff;

  --border: #dfe3ff;
  --border-strong: #c5ccff;

  --text: #18203d;
  --text-muted: #66708f;

  --primary: #4154f1;
  --primary-600: #3144e6;
  --primary-700: #2638cf;
  --primary-50: #eef0ff;

  --on-primary: #ffffff;

  --correct: #4d7cff;
  --present: #8a95ff;
  --absent: #7b839f;
  --danger: #d94f4f;

  --shadow-sm: 0 1px 2px rgba(24, 32, 61, 0.05);
  --shadow-md: 0 10px 30px -12px rgba(65, 84, 241, 0.18);
  --shadow-lg: 0 30px 60px -20px rgba(65, 84, 241, 0.25);

  --radius: 14px;
  --radius-sm: 10px;
  --radius-lg: 22px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1228;
    --bg-grad-1: #141b3d;
    --bg-grad-2: #0d1330;

    --surface: #171d3a;
    --surface-2: #1c2446;

    --border: #27305a;
    --border-strong: #39457d;

    --text: #edf0ff;
    --text-muted: #a0a8d0;

    --primary: #6b7cff;
    --primary-600: #5b6dfc;
    --primary-700: #4b5eef;
    --primary-50: #1a2146;

    --on-primary: #ffffff;

    --absent: #4d5575;
  }
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 10% -10%, var(--bg-grad-1), transparent 60%),
    radial-gradient(900px 500px at 100% 0%, var(--bg-grad-2), transparent 60%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
h1, h2, h3 { letter-spacing: -0.02em; margin: 0; }
.mono { font-family: "JetBrains Mono", "SF Mono", Menlo, monospace; }

.container { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.container-narrow { max-width: 760px; margin: 0 auto; padding: 0 20px; }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 10;
  -webkit-backdrop-filter:saturate(140%) blur(10px);
  backdrop-filter: saturate(140%) blur(10px);
  background: color-mix(in oklab, var(--bg) 75%, transparent);
  border-bottom: 1px solid var(--border);
}
.topbar-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 0;
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -0.01em; }
.brand-mark {
  width: 32px; height: 32px; border-radius: 9px;
  background: var(--primary); color: var(--on-primary);
  display: grid; place-items: center; font-weight: 800; box-shadow: var(--shadow-sm);
}
.brand-name span { color: var(--primary); }
.back-link {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--text-muted); font-size: 14px; font-weight: 500;
}
.back-link:hover { color: var(--text); }
.back-mark {
  width: 28px; height: 28px; border-radius: 8px;
  background: var(--primary-50); color: var(--primary);
  display: grid; place-items: center;
}

.brand-logo {
  height: 40px;
  width: auto;
  display: block;
}

/* ---------- Hero ---------- */
.hero { text-align: center; padding: 20px 0 20px; }
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text-muted); font-size: 12px; font-weight: 500;
}
.pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.4; } }
.hero h1 {
  font-size: clamp(34px, 5vw, 60px); font-weight: 800;
  margin-top: 18px; line-height: 1.05;
}
.hero h1 .accent { color: var(--primary); }
.hero p { color: var(--text-muted); max-width: 560px; margin: 14px auto 0; font-size: 17px; }

/* ---------- Cards grid ---------- */

/* Previous Grid
.grid { display: grid; gap: 18px; padding: 16px 0 30px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
*/

.grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 18px;
    padding: 16px 0 30px;
}

/* Added flex and max-width */

.card {
  flex: 1 1 260px;
  max-width: 350px; /* or whatever fits your design */
  position: relative; overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px; box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
  display: block;
}
.card::before {
  content: "";
  position: absolute;
  inset: 0;

  background: var(--accent);

  opacity: 0;
  transition: opacity .2s ease;
  pointer-events: none;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.card:hover::before { opacity: 1; }
.card > * { position: relative; }
.card-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-icon img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}
.card h3 { margin-top: 14px; font-size: 19px; font-weight: 700; }
.card p { margin: 6px 0 0; color: var(--text-muted); font-size: 14px; }
.card-cta { margin-top: 18px; color: var(--primary); font-weight: 600; font-size: 14px; display: inline-flex; align-items: center; gap: 6px; }
.card:hover .card-cta .arrow { transform: translateX(3px); }
.card-cta .arrow { transition: transform .2s ease; }
.card.placeholder { border-style: dashed; background: transparent; display: grid; place-items: center; text-align: center; color: var(--text-muted); min-height: 160px; }

/* ---------- Footer ---------- */
.foot { padding: 12px 0; text-align: center; font-size: 12px; color: var(--text-muted); border-top: 1px solid var(--border); }