/* Browse page, desktop layout (1024px and wider).
   Loaded by home.html only for wide screens (media="(min-width: 1024px)"), so phones and tablets never apply any of it.
   The phone layout (.browse-wrap, the bottom bar and the floating buttons) is hidden here and left exactly as it is below this width. */

@media (min-width: 1024px) {
  .browse-wrap, .bottom-nav, .terms-fab, .blog-fab, .settings-fab { display: none !important; }
  .dk-only { display: block; }

  /* ---------- Colours (light by default, dark when the site's dark mode is on) ---------- */
  .dk-page {
    --bg: #ffffff; --bg2: #f4f4f5; --ink: #1a1a1a; --ink2: #3b3b44; --muted: #5d5d66;
    --head: #0b3a5c; --blue: #1471b5; --link: #136fb0; --tint: #eaf6ff; --tint-line: rgba(31,143,220,.28);
    --line: rgba(0,0,0,.09); --card: #ffffff; --hero-from: #eaf6ff; --shadow: rgba(11,58,92,.22);
    --pad: clamp(24px, 5.5vw, 80px);
    min-height: 100vh; background: var(--bg); color: var(--ink);
    font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif;
  }
  body:not(.light-theme) .dk-page {
    --bg: #121214; --bg2: #1c1c1f; --ink: #f2f2f4; --ink2: #d4d4db; --muted: #a9a9b3;
    --head: #e8f4fd; --blue: #1471b5; --link: #7ec3f3; --tint: #16222c; --tint-line: rgba(126,195,243,.28);
    --line: rgba(255,255,255,.1); --card: #1b1b1f; --hero-from: #14212c; --shadow: rgba(0,0,0,.5);
  }
  .dk-page a { color: inherit; text-decoration: none; }
  .dk-page :focus-visible { outline: 3px solid #4db8ff; outline-offset: 2px; border-radius: 8px; }

  /* ---------- Top bar ---------- */
  .dk-top {
    position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 20px;
    height: 76px; padding: 0 var(--pad); box-sizing: border-box;
    background: var(--bg); border-bottom: 1px solid var(--line);
  }
  .dk-logo { font-weight: 800; font-size: 24px; letter-spacing: -.3px; color: var(--head); flex: none; }
  .dk-logo span { color: #1f8fdc; }
  .dk-nav { display: flex; gap: 4px; flex: none; }
  .dk-nav a { padding: 10px 16px; border-radius: 999px; font-weight: 700; font-size: 15px; color: var(--ink2); }
  .dk-nav a:hover { background: var(--bg2); }
  .dk-nav a.active { background: var(--tint); color: var(--head); }
  .dk-top-right { margin-left: auto; display: flex; align-items: center; gap: 12px; min-width: 0; }
  .dk-search {
    display: flex; align-items: center; gap: 10px; width: clamp(170px, 20vw, 300px); height: 44px; box-sizing: border-box;
    padding: 0 16px; border-radius: 999px; background: var(--bg2); border: 1px solid var(--line);
  }
  .dk-search svg { flex: none; width: 18px; height: 18px; fill: var(--muted); }
  .dk-search input { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; color: var(--ink); font: 500 14px 'Poppins', system-ui, sans-serif; }
  .dk-search input::placeholder { color: var(--muted); }
  .dk-search:focus-within { border-color: var(--blue); }
  .dk-cta, .dk-coins {
    display: inline-flex; align-items: center; height: 44px; padding: 0 20px; border-radius: 999px; box-sizing: border-box;
    background: var(--blue); color: #ffffff !important; font-weight: 700; font-size: 14px; white-space: nowrap; flex: none;
  }
  .dk-cta:hover { filter: brightness(1.08); }
  .dk-cta[hidden], .dk-coins[hidden] { display: none; }
  .dk-cta .dk-short { display: none; }
  @media (max-width: 1199px) { .dk-cta .dk-long { display: none; } .dk-cta .dk-short { display: inline; } .dk-cta { padding: 0 16px; } }
  .dk-icon-btn {
    flex: none; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--bg);
    display: flex; align-items: center; justify-content: center; cursor: pointer;
  }
  .dk-icon-btn:hover { background: var(--bg2); }
  .dk-icon-btn svg { width: 20px; height: 20px; fill: var(--muted); }
  .dk-profile { flex: none; display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; }
  .dk-profile .nav-profile-icon { width: 36px; height: 36px; }

  /* ---------- Hero ---------- */
  .dk-hero { background: linear-gradient(180deg, var(--hero-from) 0%, var(--bg) 100%); padding: 56px var(--pad) 64px; box-sizing: border-box; }
  .dk-hero-in { max-width: 1280px; margin: 0 auto; display: flex; align-items: center; gap: clamp(40px, 5vw, 72px); }
  .dk-hero-copy { flex: 1 1 0; min-width: 0; }
  .dk-eyebrow {
    display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px;
    background: var(--card); border: 1px solid var(--tint-line); font-size: 13px; font-weight: 700; color: var(--head);
  }
  .dk-eyebrow svg { width: 16px; height: 16px; stroke: var(--link); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
  .dk-hero h1 { margin: 18px 0 0; font-weight: 800; font-size: clamp(40px, 4.3vw, 60px); line-height: 1.04; letter-spacing: -1.5px; color: var(--head); }
  .dk-hero-sub { margin: 18px 0 0; font-size: 19px; line-height: 1.55; color: var(--ink2); max-width: 520px; }
  .dk-prompt {
    margin-top: 30px; display: flex; align-items: center; gap: 14px; max-width: 580px; padding: 10px 10px 10px 12px;
    border-radius: 20px; background: var(--card); border: 1px solid var(--line); box-shadow: 0 10px 30px var(--shadow);
  }
  .dk-prompt-add {
    flex: none; width: 56px; height: 56px; border-radius: 14px; border: 2px dashed #7ab7e3; background: var(--tint);
    display: flex; align-items: center; justify-content: center;
  }
  .dk-prompt-add svg { width: 24px; height: 24px; stroke: var(--link); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
  .dk-prompt-text { flex: 1; min-width: 0; font-size: 15px; line-height: 1.4; color: var(--ink); min-height: 42px; display: flex; align-items: center; }
  .dk-caret { display: inline-block; flex: none; width: 2px; height: 18px; margin-left: 2px; background: var(--blue); animation: dk-caret 1s steps(1) infinite; }
  .dk-prompt-go {
    flex: none; display: flex; align-items: center; height: 56px; padding: 0 26px; border-radius: 14px; background: var(--blue);
    color: #ffffff !important; font-weight: 700; font-size: 16px; transition: transform .15s ease, box-shadow .15s ease;
  }
  .dk-prompt-go:hover { filter: brightness(1.08); }
  .dk-prompt-go.press { transform: scale(.94); box-shadow: 0 0 0 6px rgba(20,113,181,.25); }
  .dk-facts { list-style: none; margin: 22px 0 0; padding: 0; display: flex; gap: 10px; flex-wrap: wrap; }
  .dk-facts li { padding: 8px 14px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); font-size: 13px; font-weight: 700; color: var(--ink2); }

  /* Before / after demo: the still on the left, the real demo video revealed from the right by a sweeping divider */
  .dk-demo { flex: none; position: relative; width: clamp(340px, 36vw, 520px); }
  .dk-demo-frame {
    position: relative; width: 100%; aspect-ratio: 520 / 560; border-radius: 28px; overflow: hidden; background: #123;
    border: 4px solid var(--card); box-shadow: 0 24px 60px var(--shadow);
  }
  .dk-demo-still, .dk-demo-vid, .dk-demo-vid video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
  .dk-demo-vid { clip-path: inset(0 0 0 50%); animation: dk-clip 5s ease-in-out 6 alternate both; }
  .dk-demo-div { position: absolute; top: 0; bottom: 0; left: 50%; width: 4px; margin-left: -2px; background: #ffffff; box-shadow: 0 0 14px rgba(0,0,0,.35); animation: dk-bar 5s ease-in-out 6 alternate both; }
  .dk-demo-div i {
    position: absolute; top: 50%; left: 50%; width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 50%; background: #ffffff;
    box-shadow: 0 4px 14px rgba(0,0,0,.3); display: flex; align-items: center; justify-content: center;
  }
  .dk-demo-div svg { width: 22px; height: 22px; stroke: #0b3a5c; fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
  .dk-tag { position: absolute; top: 18px; padding: 6px 12px; border-radius: 999px; color: #ffffff; font-size: 12px; font-weight: 700; }
  .dk-tag-l { left: 18px; background: rgba(11,58,92,.85); }
  .dk-tag-r { right: 18px; background: var(--blue); }
  .dk-demo-bar { position: absolute; left: 18px; right: 18px; bottom: 18px; display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 14px; background: rgba(255,255,255,.92); color: #0b3a5c; font-size: 12px; font-weight: 700; }
  .dk-demo-bar svg { width: 18px; height: 18px; fill: #0b3a5c; }
  .dk-demo-bar span { flex: 1; height: 6px; border-radius: 3px; background: #d8e9f6; overflow: hidden; }
  .dk-demo-bar span i { display: block; width: 62%; height: 100%; background: var(--blue); }
  .dk-prompt-chip {
    position: absolute; left: -36px; bottom: 90px; max-width: 260px; padding: 12px 16px; border-radius: 16px; background: var(--card);
    box-shadow: 0 12px 30px var(--shadow); border: 1px solid var(--line); font-size: 14px; line-height: 1.4; color: var(--ink);
  }
  .dk-prompt-chip b { display: block; margin-bottom: 2px; font-size: 11px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; color: var(--link); }

  /* ---------- Categories ---------- */
  .dk-cats { max-width: 1280px; margin: 0 auto; padding: 8px var(--pad) 56px; box-sizing: content-box; }
  .dk-cats h2 { margin: 0; font-weight: 800; font-size: 32px; letter-spacing: -.5px; color: var(--head); }
  .dk-cats-sub { margin: 6px 0 0; font-size: 15px; color: var(--muted); }
  .dk-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
  .dk-chip {
    display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 999px; background: var(--tint);
    border: 1px solid var(--tint-line); color: var(--head); font: 700 14px 'Poppins', system-ui, sans-serif; cursor: pointer; transition: background .15s ease;
  }
  .dk-chip:hover { background: var(--bg2); }
  .dk-chip b { font-size: 12px; color: var(--link); }
  .dk-chip-all { background: #0b3a5c; border-color: #0b3a5c; color: #ffffff; }
  .dk-chip-all:hover { background: #12507f; }
  .dk-chip-more { background: transparent; border: 1px dashed var(--tint-line); color: var(--link); }
  .dk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 20px; margin-top: 28px; }
  .dk-tile {
    position: relative; display: block; aspect-ratio: 3 / 4; border-radius: 18px; overflow: hidden; background: #1c3a52 center / cover no-repeat;
    border: 1px solid var(--line); transition: transform .18s ease, box-shadow .18s ease;
  }
  .dk-tile:hover, .dk-tile:focus-visible { transform: translateY(-4px); box-shadow: 0 14px 30px var(--shadow); }
  .dk-play {
    position: absolute; left: 50%; top: 44%; width: 52px; height: 52px; margin: -26px 0 0 -26px; border-radius: 50%; background: rgba(255,255,255,.95);
    display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 18px rgba(0,0,0,.3); opacity: 0; transition: opacity .18s ease;
  }
  .dk-play svg { width: 24px; height: 24px; fill: #0b3a5c; }
  .dk-tile:hover .dk-play, .dk-tile:focus-visible .dk-play { opacity: 1; }
  .dk-label {
    position: absolute; left: 10px; right: 10px; bottom: 10px; display: flex; align-items: center; justify-content: space-between; gap: 8px;
    padding: 9px 12px; border-radius: 12px; background: rgba(255,255,255,.95); color: #0b3a5c;
  }
  .dk-label-name { font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .dk-label-count { flex: none; font-size: 12px; font-weight: 700; color: #136fb0; }
  .dk-empty { margin: 28px 0 0; text-align: center; font-size: 15px; color: var(--muted); }
  .dk-empty[hidden], .dk-more[hidden] { display: none; }
  .dk-more { display: flex; justify-content: center; margin-top: 32px; }
  .dk-more button {
    height: 52px; padding: 0 32px; border-radius: 999px; border: 2px solid var(--head); background: transparent; color: var(--head);
    font: 700 15px 'Poppins', system-ui, sans-serif; cursor: pointer;
  }
  .dk-more button:hover { background: var(--tint); }

  .dk-foot { padding: 28px var(--pad); border-top: 1px solid var(--line); display: flex; gap: 18px; justify-content: center; font-size: 13px; color: var(--muted); }
  .dk-foot a:hover { color: var(--link); }

  @keyframes dk-caret { 50% { opacity: 0; } }
  @keyframes dk-clip { from { clip-path: inset(0 0 0 28%); } to { clip-path: inset(0 0 0 72%); } }
  @keyframes dk-bar { from { left: 28%; } to { left: 72%; } }
  @media (prefers-reduced-motion: reduce) {
    .dk-caret, .dk-demo-vid, .dk-demo-div { animation: none; }
    .dk-tile, .dk-prompt-go, .dk-play { transition: none; }
  }
}
