/* ============ Tokens ============ */
:root {
  --bg: #f1f2f6;
  --surface: #ffffff;
  --text: #0a0b12;
  --muted: #6a6e80;
  --line: rgba(10, 12, 30, .08);
  --accent: #5a48f5;
  --shadow: 0 1px 2px rgba(10, 12, 30, .04), 0 10px 30px rgba(10, 12, 30, .06);
  --radius: 26px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #08080d; --surface: #13131b; --text: #f4f5fa; --muted: #9799ab;
    --line: rgba(255, 255, 255, .07); --accent: #8b7dff; --shadow: none;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #08080d; --surface: #13131b; --text: #f4f5fa; --muted: #9799ab;
  --line: rgba(255, 255, 255, .07); --accent: #8b7dff; --shadow: none;
  color-scheme: dark;
}

/* ============ Bază ============ */
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
.app {
  max-width: 600px; margin: 0 auto; min-height: 100dvh; display: flex; flex-direction: column;
  padding: calc(14px + env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) calc(20px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
}
main { flex: 1; }

/* ============ Bara de sus ============ */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 2px 0; }
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-logo { width: 42px; height: 42px; border-radius: 13px; background: #fff; box-shadow: var(--shadow), inset 0 0 0 1px var(--line); object-fit: cover; flex: none; }
.brand-name { font-weight: 800; font-size: 16px; line-height: 1.2; letter-spacing: -.01em; }
.brand-sub { font-size: 12.5px; color: var(--muted); font-weight: 500; line-height: 1.3; }
.icon-btn {
  width: 40px; height: 40px; flex: none; border: 0; border-radius: 50%; cursor: pointer;
  background: var(--surface); color: var(--text); box-shadow: var(--shadow), inset 0 0 0 1px var(--line);
  display: grid; place-items: center;
}
.icon-btn svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.i-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .i-sun { display: none; }
  :root:not([data-theme="light"]) .i-moon { display: block; }
}
:root[data-theme="dark"] .i-sun { display: none; }
:root[data-theme="dark"] .i-moon { display: block; }

/* ============ Titlu ============ */
h1 { margin: 26px 2px 4px; font-size: 30px; line-height: 1.1; font-weight: 800; letter-spacing: -.03em; text-wrap: balance; }
.lead { margin: 0 2px 20px; color: var(--muted); font-size: 15px; font-weight: 500; }

/* ============ Butoanele (un card mare pe pagină) ============ */
.cards { display: grid; gap: 14px; }
.card {
  position: relative; isolation: isolate; overflow: hidden;
  display: flex; align-items: center; gap: 14px;
  min-height: 118px; padding: 18px 16px 18px 18px; border-radius: var(--radius);
  color: #fff; text-decoration: none;
  box-shadow: 0 14px 34px -14px var(--glow, rgba(10, 12, 30, .35));
  transition: transform .18s ease, box-shadow .18s ease;
  animation: rise .45s cubic-bezier(.2, .8, .2, 1) both;
  -webkit-tap-highlight-color: transparent;
}
.card:hover { transform: translateY(-2px); box-shadow: 0 20px 40px -14px var(--glow, rgba(10, 12, 30, .4)); }
.card:active { transform: scale(.985); }
.card:focus-visible { outline: 3px solid var(--text); outline-offset: 3px; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }

/* fundalul colorat + două pete de lumină */
.card-bg { position: absolute; inset: 0; z-index: -1; background: var(--grad); }
.card-bg i { position: absolute; border-radius: 50%; filter: blur(34px); opacity: .7; }
.card-bg i:nth-child(1) { width: 190px; height: 190px; right: -50px; top: -80px; background: var(--blob-1); }
.card-bg i:nth-child(2) { width: 170px; height: 170px; left: -60px; bottom: -100px; background: var(--blob-2); }

.card-ic {
  flex: none; width: 64px; height: 64px; border-radius: 20px; overflow: hidden;
  background: rgba(255, 255, 255, .94); box-shadow: 0 6px 16px rgba(0, 0, 0, .16);
  display: grid; place-items: center;
}
.card-ic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-ic b { font-size: 28px; font-weight: 800; color: #2c1a9e; }
.card-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.card-title { font-size: 20px; line-height: 1.15; font-weight: 800; letter-spacing: -.02em; }
.card-desc { font-size: 13.5px; line-height: 1.35; font-weight: 500; opacity: .9; }
.card-url { margin-top: 3px; font-size: 11.5px; font-weight: 700; opacity: .7; letter-spacing: .01em; overflow-wrap: anywhere; }
.card-go { flex: none; width: 34px; height: 34px; padding: 7px; border-radius: 50%; background: rgba(255, 255, 255, .22); fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

/* culorile: fiecare seamănă cu pagina spre care duce */
.c-mov        { --grad: linear-gradient(140deg, #3b1fd6, #6a3cff 50%, #2a7bff); --blob-1: #ff5fa2; --blob-2: #00d4ff; --glow: rgba(90, 72, 245, .7); }
.c-portocaliu { --grad: linear-gradient(150deg, #ffd96a, #ffb061 55%, #ff8f6b); --blob-1: #fff3b0; --blob-2: #ff7fae; --glow: rgba(255, 150, 70, .75); color: #3d2410; }
.c-verde      { --grad: linear-gradient(145deg, #145e5c, #1f7a78 55%, #2c9a8c); --blob-1: #e3b548; --blob-2: #0d3f3e; --glow: rgba(31, 122, 120, .7); color: #fff6e0; }
.c-albastru   { --grad: linear-gradient(145deg, #0b5ed7, #2f80ff 55%, #38bdf8); --blob-1: #a5f3fc; --blob-2: #1e3a8a; --glow: rgba(47, 128, 255, .7); }
.c-rosu       { --grad: linear-gradient(145deg, #b3121f, #e0283a 55%, #ff6b5e); --blob-1: #ffc23d; --blob-2: #7a0c16; --glow: rgba(224, 40, 58, .7); }
.c-portocaliu .card-go { background: rgba(61, 36, 16, .12); }
.c-portocaliu .card-desc { opacity: .82; }
.c-portocaliu .card-url { opacity: .62; }

.empty { color: var(--muted); text-align: center; padding: 30px 0; }
noscript a { color: var(--accent); font-weight: 700; }
.foot { text-align: center; color: var(--muted); font-size: 12.5px; margin-top: 28px; font-weight: 500; }

/* ============ Ecrane late: cele trei carduri pe un rând ============ */
@media (min-width: 860px) {
  .app { max-width: 1040px; }
  h1 { margin-top: 56px; font-size: 44px; }
  .lead { font-size: 17px; margin-bottom: 30px; }
  .cards { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
  .card { flex-direction: column; align-items: flex-start; gap: 18px; min-height: 280px; padding: 24px; }
  .card-ic { width: 84px; height: 84px; border-radius: 24px; }
  .card-title { font-size: 24px; }
  .card-desc { font-size: 15px; }
  .card-body { flex: 1; width: 100%; }
  .card-url { margin-top: auto; padding-top: 14px; font-size: 12.5px; }
  .card-go { position: absolute; right: 22px; top: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
