/* TaiGameMQ V3 — Aurora gaming interface. No external CSS dependencies. */
:root {
  --bg: #070b14;
  --bg-soft: #0a1120;
  --surface: #0f192c;
  --surface-2: #131f35;
  --surface-3: #18263f;
  --ink: #f4f8ff;
  --muted: #a3b4cf;
  --dim: #7186a3;
  --line: #263a57;
  --line-soft: #1a2a42;
  --mint: #5cf2b6;
  --mint-deep: #18c98d;
  --cyan: #65dcff;
  --violet: #a88bff;
  --amber: #ffcd84;
  --rose: #ff8d9b;
  --glow-mint: rgba(92, 242, 182, .28);
  --glow-violet: rgba(168, 139, 255, .25);
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 24px 60px rgba(0, 0, 0, .35);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 100px; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.56 Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(ellipse 55% 38% at 4% 8%, rgba(24, 91, 176, .25), transparent 80%),
    radial-gradient(ellipse 45% 40% at 96% 24%, rgba(94, 48, 168, .22), transparent 78%),
    radial-gradient(ellipse 48% 36% at 62% 92%, rgba(14, 128, 106, .13), transparent 84%);
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .28;
  background-image: linear-gradient(rgba(120, 165, 220, .055) 1px, transparent 1px), linear-gradient(90deg, rgba(120, 165, 220, .055) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: linear-gradient(180deg, #000 0%, transparent 72%);
}
body.menu-open { overflow: hidden; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
ul, ol { margin: 0; padding: 0; list-style: none; }
.hidden { display: none !important; }
.shell { width: min(1320px, calc(100% - 64px)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
:focus-visible { outline: 2px solid var(--mint); outline-offset: 4px; border-radius: 4px; }
::selection { background: var(--mint); color: #05281f; }
.skip-link { position: fixed; left: 16px; top: -60px; z-index: 100; background: var(--mint); color: #05281f; padding: 10px 16px; border-radius: 10px; font-weight: 800; transition: top .2s; }
.skip-link:focus { top: 12px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 30; height: 76px; border-bottom: 1px solid rgba(126, 166, 220, .12); background: rgba(7, 11, 20, .72); backdrop-filter: blur(20px); transition: background .25s, box-shadow .25s; }
.site-header.is-scrolled { background: rgba(7, 11, 20, .93); box-shadow: 0 12px 40px rgba(0, 0, 0, .28); }
.header-inner { height: 100%; display: flex; align-items: center; gap: 32px; }
.brand { display: inline-flex; align-items: center; gap: 12px; flex: none; }
.brand-mark { position: relative; width: 46px; height: 46px; display: grid; place-items: center; border-radius: 14px; background: linear-gradient(145deg, #7dffd0, #16cf96); color: #052e26; font-size: 18px; font-weight: 950; letter-spacing: -2px; box-shadow: 0 6px 26px rgba(40, 232, 160, .3), inset 0 1px 0 rgba(255, 255, 255, .5); flex: none; line-height: 1; }
.brand-spark { position: absolute; width: 6px; height: 6px; background: #f2fffb; border-radius: 50%; right: 7px; top: 7px; box-shadow: 0 0 12px #fff; }
.brand-word { display: block; font-size: 23px; letter-spacing: -.9px; line-height: 1.04; font-weight: 860; white-space: nowrap; }
.brand-word > span, .footer-brand strong span { color: var(--mint); }
.brand-word small { display: block; color: #8ca6bf; font-size: 8px; font-weight: 760; letter-spacing: 2.1px; line-height: 1.5; margin-top: 6px; }
.top-nav { margin-left: 26px; display: flex; align-items: center; gap: 26px; flex: 1; white-space: nowrap; }
.top-nav a { position: relative; display: inline-flex; align-items: center; gap: 8px; align-self: stretch; color: #a3b0c9; font-weight: 720; font-size: 13px; min-height: 76px; transition: color .18s; }
.top-nav a > span { font-size: 18px; font-weight: 600; color: #8b9dbd; }
.top-nav a:hover, .top-nav a.nav-active, .top-nav a.nav-active > span { color: var(--mint); }
.top-nav a.nav-active::after { content: ""; position: absolute; height: 2px; bottom: 0; left: 2px; right: 2px; border-radius: 4px; background: var(--mint); box-shadow: 0 0 14px var(--mint); }
.header-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.header-find { display: inline-flex; align-items: center; gap: 7px; border: 1px solid #344a66; border-radius: 11px; padding: 9px 12px; color: #afbdd3; font-size: 12px; font-weight: 650; background: #111b2d; white-space: nowrap; }
.header-find > span:first-child { font-size: 20px; line-height: 1; }
.header-find:hover, .header-admin:hover { border-color: var(--mint); color: var(--mint); }
.header-admin { display: inline-flex; align-items: center; gap: 9px; font-size: 12px; font-weight: 750; border: 1px solid #34465e; background: #141f31; padding: 10px 13px; border-radius: 11px; color: #d7e3f7; white-space: nowrap; transition: .2s; }
.header-admin svg { color: var(--mint); }
.menu-toggle { display: none; width: 42px; height: 42px; border: 1px solid #34465e; border-radius: 11px; background: #141f31; padding: 0; align-items: center; justify-content: center; flex-direction: column; gap: 5px; }
.menu-toggle span { width: 18px; height: 2px; border-radius: 2px; background: #d7e3f7; transition: transform .2s, opacity .2s; }
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.mobile-nav { display: none; position: absolute; top: 76px; left: 0; right: 0; padding: 12px 16px 20px; background: rgba(9, 14, 25, .97); border-bottom: 1px solid var(--line); backdrop-filter: blur(20px); box-shadow: 0 20px 40px rgba(0, 0, 0, .4); }
.mobile-nav.is-open { display: grid; gap: 4px; animation: dropIn .22s ease both; }
.mobile-nav-link { display: flex; align-items: center; gap: 12px; padding: 13px 14px; border-radius: 11px; color: #cbd8ec; font-size: 14px; font-weight: 700; }
.mobile-nav-link span { color: var(--mint); font-size: 19px; width: 22px; text-align: center; }
.mobile-nav-link:hover, .mobile-nav-link.nav-active { background: rgba(92, 242, 182, .09); color: var(--mint); }

/* Buttons */
.primary-button { background: linear-gradient(135deg, #82ffca, #22dfa0); color: #05352a; min-height: 48px; border: 0; padding: 0 20px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; font-weight: 860; font-size: 13px; border-radius: 12px; box-shadow: 0 8px 30px rgba(33, 234, 155, .24), inset 0 1px 0 rgba(255, 255, 255, .45); transition: transform .2s, box-shadow .2s; }
.primary-button:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 10px 38px rgba(33, 234, 155, .38); }
.primary-button:active:not(:disabled) { transform: translateY(0); }
.primary-button:disabled { opacity: .6; cursor: wait; }
.primary-button > span:first-child { font-size: 19px; }
.action-arrow { padding-left: 4px; font-size: 17px; }
.outline-button { border: 1px solid #45627d; background: rgba(13, 24, 44, .65); border-radius: 12px; display: inline-flex; align-items: center; gap: 18px; font-size: 13px; font-weight: 750; color: #e3efff; min-height: 48px; padding: 0 18px; transition: border-color .18s, background .18s; }
.outline-button:hover { border-color: var(--mint); background: rgba(28, 60, 66, .5); }

/* Hero */
.hero { margin-top: 26px; position: relative; min-height: 470px; border: 1px solid rgba(120, 170, 230, .22); border-radius: 26px; overflow: hidden; isolation: isolate; background: radial-gradient(ellipse at 88% 40%, rgba(68, 58, 158, .48), transparent 58%), radial-gradient(ellipse at 55% 105%, rgba(14, 135, 116, .24), transparent 62%), linear-gradient(120deg, #0e2239 0%, #0b1730 48%, #151444 100%); box-shadow: var(--shadow), inset 0 1px 0 rgba(190, 225, 255, .08); display: grid; grid-template-columns: 1.04fr .96fr; }
.hero-grid { position: absolute; inset: 0; z-index: -1; opacity: .45; background-image: radial-gradient(rgba(135, 185, 235, .45) .7px, transparent 1px); background-size: 25px 25px; mask-image: linear-gradient(90deg, transparent 12%, #000 92%); }
.hero::after { content: ""; position: absolute; height: 3px; left: 12%; right: 12%; bottom: -1px; background: linear-gradient(90deg, transparent, var(--mint), var(--violet), transparent); filter: blur(5px); opacity: .8; }
.hero-copy { position: relative; z-index: 2; padding: 68px 0 52px 60px; }
.eyebrow { display: flex; align-items: center; gap: 10px; font-size: 10px; letter-spacing: 2.1px; font-weight: 900; color: #b5ffda; }
.live-dot { width: 7px; height: 7px; background: var(--mint); border-radius: 50%; box-shadow: 0 0 0 5px rgba(92, 242, 182, .1), 0 0 14px rgba(92, 242, 182, .95); flex: none; animation: pulse 2.4s ease-in-out infinite; }
.eyebrow-line { width: 27px; height: 1px; background: rgba(196, 233, 226, .35); }
.hero h1 { font-size: clamp(44px, 4.9vw, 70px); line-height: 1.08; font-weight: 920; letter-spacing: -3.2px; margin: 28px 0 18px; text-wrap: balance; }
.gradient-text { background: linear-gradient(100deg, #7dffd0 8%, #64dcff 52%, #b79dff 96%); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 8px 30px rgba(92, 242, 182, .16)); }
.hero-copy > p { font-size: 14px; line-height: 1.85; color: #b3c4dc; max-width: 490px; margin: 0; }
.hero-actions { display: flex; align-items: center; gap: 13px; flex-wrap: wrap; margin-top: 27px; }
.hero-trust { display: flex; align-items: center; flex-wrap: wrap; gap: 20px; margin-top: 36px; color: #a8bfd4; font-size: 11px; font-weight: 650; }
.hero-trust i { color: var(--mint); font-style: normal; margin-right: 5px; }
.hero-art { position: relative; min-height: 440px; overflow: hidden; }
.hero-art-glow { position: absolute; width: 94%; height: 80%; top: 8%; right: 0; border-radius: 50%; background: radial-gradient(ellipse, rgba(69, 76, 190, .44), rgba(20, 145, 180, .14) 52%, transparent 73%); filter: blur(10px); }
.hero-ring { position: absolute; border: 1px solid rgba(90, 205, 240, .16); border-radius: 50%; }
.ring-one { width: 360px; height: 360px; right: 12%; top: 26px; animation: orbit 26s linear infinite; }
.ring-two { width: 460px; height: 250px; right: 4%; top: 142px; transform: rotate(29deg); border-color: rgba(150, 125, 255, .16); }
.ring-three { width: 250px; height: 250px; right: 22%; top: 78px; border-style: dashed; border-color: rgba(92, 242, 182, .12); animation: orbit 34s linear infinite reverse; }
.console-card { position: absolute; right: -3%; top: 44px; width: 98%; padding: 12px 14px 16px; border: 1px solid rgba(150, 190, 245, .2); border-radius: 22px; background: linear-gradient(160deg, rgba(22, 38, 68, .85), rgba(10, 18, 34, .92)); box-shadow: 0 26px 60px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .07); backdrop-filter: blur(6px); transform: rotate(-2deg); animation: float 7s ease-in-out infinite; }
.console-card-top, .console-card-bottom { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: #7fa3c8; font-size: 8px; font-weight: 850; letter-spacing: 1.6px; }
.console-card-top { padding: 2px 4px 8px; }
.console-card-top-right { color: var(--mint); }
.console-led { width: 6px; height: 6px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 10px var(--mint); }
.console-card-bottom { padding: 6px 4px 0; border-top: 1px solid rgba(140, 180, 230, .12); }
.console-card-bottom span:first-child { color: var(--cyan); }
.gamepad-art { display: block; width: 100%; height: auto; filter: drop-shadow(0 18px 32px rgba(0, 0, 0, .45)); }
.float-tag { position: absolute; z-index: 3; display: flex; align-items: center; gap: 10px; background: rgba(13, 29, 49, .92); border: 1px solid rgba(130, 193, 232, .32); border-radius: 12px; padding: 10px 13px; color: #aec5db; font-size: 9px; letter-spacing: 1.5px; font-weight: 770; line-height: 1.6; box-shadow: 0 14px 36px rgba(0, 0, 0, .3); backdrop-filter: blur(10px); }
.float-tag b { font-size: 11px; color: #fff; letter-spacing: .6px; }
.tag-left { left: 3%; top: 82px; transform: rotate(-8deg); }
.tag-right { right: 5%; bottom: 106px; transform: rotate(6deg); }
.float-icon { display: grid; place-items: center; width: 33px; height: 33px; background: rgba(92, 242, 182, .14); border: 1px solid rgba(92, 242, 182, .34); border-radius: 9px; color: var(--mint); font-size: 19px; }
.float-violet { background: rgba(168, 139, 255, .16); border-color: rgba(168, 139, 255, .4); color: #c4aaff; }
.hero-art-caption { position: absolute; bottom: 30px; left: 18%; font-size: 9px; color: #7d98bd; letter-spacing: 2px; font-weight: 850; }
.caption-flare { color: var(--mint); }

/* Stats */
.stats-strip { margin-top: 22px; border: 1px solid var(--line); border-radius: 18px; background: linear-gradient(110deg, rgba(20, 32, 53, .9), rgba(15, 24, 42, .9)); min-height: 104px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); box-shadow: 0 12px 36px rgba(0, 0, 0, .14); overflow: hidden; }
.stat-item { display: flex; gap: 15px; align-items: center; justify-content: center; position: relative; padding: 20px 9px; }
.stat-item::before { content: ""; position: absolute; left: 12%; right: 12%; top: 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(120, 200, 230, .35), transparent); }
.stat-item:not(:last-child)::after { content: ""; position: absolute; right: 0; height: 46px; width: 1px; background: var(--line); }
.stat-symbol { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 14px; font-size: 24px; font-weight: 770; transition: transform .2s; }
.stat-item:hover .stat-symbol { transform: translateY(-3px) scale(1.05); }
.neon-green { background: rgba(44, 241, 158, .1); color: var(--mint); }
.neon-purple { background: rgba(168, 139, 255, .13); color: #bda4ff; }
.neon-blue { background: rgba(84, 205, 255, .12); color: #7ce0ff; }
.neon-amber { background: rgba(255, 205, 107, .11); color: var(--amber); }
.stat-item strong { font-size: 26px; line-height: 1.22; letter-spacing: -1px; display: block; }
.stat-item small { display: block; font-size: 11px; color: #90a2bb; margin-top: 2px; }

/* Category tiles */
.category-strip { display: flex; gap: 30px; align-items: center; padding: 46px 0 42px; }
.strip-label { width: 220px; flex: none; }
.strip-label > span { font-size: 10px; color: var(--mint); letter-spacing: 1.6px; font-weight: 850; display: block; }
.strip-label strong { font-size: 22px; letter-spacing: -.6px; line-height: 1.25; display: block; margin-top: 7px; }
.category-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; flex: 1; }
.category-tile { position: relative; overflow: hidden; border: 1px solid var(--line); text-align: left; min-width: 0; min-height: 90px; border-radius: 16px; background: linear-gradient(145deg, rgba(23, 36, 60, .9), rgba(14, 23, 40, .9)); display: flex; align-items: center; gap: 13px; padding: 16px; transition: transform .22s, border-color .22s, box-shadow .22s; color: var(--ink); }
.category-tile::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 20%, rgba(255, 255, 255, .06) 50%, transparent 80%); transform: translateX(-120%); transition: transform .55s; }
.category-tile:hover { transform: translateY(-4px); border-color: #4aa4a6; box-shadow: 0 16px 34px rgba(0, 0, 0, .22), 0 0 26px rgba(92, 242, 182, .07); }
.category-tile:hover::after { transform: translateX(120%); }
.tile-glyph { width: 48px; height: 48px; border-radius: 13px; display: grid; place-items: center; font-size: 25px; background: rgba(168, 139, 255, .15); color: #c0a6ff; flex: none; }
.cat-app .tile-glyph { background: rgba(101, 220, 255, .13); color: #83e6ff; }
.cat-all .tile-glyph { background: rgba(92, 242, 182, .12); color: var(--mint); }
.category-tile b { display: block; font-size: 13px; white-space: nowrap; }
.category-tile small { font-size: 10px; color: #8e9eb9; display: block; margin-top: 4px; white-space: nowrap; }
.tile-arrow { margin-left: auto; align-self: flex-start; color: #94b3cc; font-size: 16px; transition: transform .2s, color .2s; }
.category-tile:hover .tile-arrow { transform: translate(2px, -2px); color: var(--mint); }

/* Library */
.content-layout { display: grid; grid-template-columns: minmax(0, 1fr) 284px; gap: 25px; align-items: start; padding-bottom: 32px; scroll-margin-top: 25px; }
.library-content { min-width: 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 15px; margin-bottom: 24px; }
.small-kicker { font-size: 10px; color: var(--mint); font-weight: 850; letter-spacing: 1.9px; }
.kicker-slash { color: #5585a3; margin-right: 5px; }
.section-head h2, .section-head h1 { margin: 8px 0 3px; font-size: 28px; line-height: 1.2; letter-spacing: -1px; font-weight: 860; }
.title-accent { color: var(--mint); padding-right: 5px; }
.section-head p { color: var(--muted); font-size: 12px; margin: 0; }
.list-count { border-radius: 99px; white-space: nowrap; font-size: 11px; font-weight: 790; color: var(--mint); border: 1px solid #256256; background: #0d2a2a; padding: 7px 12px; }
.toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 14px; }
.search-box { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; border: 1px solid #32425a; height: 50px; padding: 0 14px; color: #91abc9; background: rgba(18, 29, 48, .95); border-radius: 13px; transition: border-color .17s, box-shadow .17s; }
.search-box:focus-within { border-color: var(--mint); box-shadow: 0 0 0 4px rgba(92, 242, 182, .09); }
.search-box input { background: transparent; border: 0; outline: 0; color: var(--ink); flex: 1; min-width: 0; font-size: 12px; }
.search-box input::-webkit-search-cancel-button { display: none; }
.search-box input::placeholder { color: #7388a4; }
.search-box kbd { font-size: 11px; color: #8298b4; border-radius: 5px; border: 1px solid #34445f; padding: 0 6px; line-height: 22px; }
.search-clear { border: 0; background: transparent; color: #9fb6d0; font-size: 20px; line-height: 1; padding: 0 3px; }
.search-clear:hover { color: var(--mint); }
.sort-wrap { position: relative; flex: none; }
.sort-wrap select { appearance: none; border-radius: 13px; border: 1px solid #32425a; background: rgba(18, 29, 48, .95); color: #cad7ea; min-height: 50px; font-size: 12px; font-weight: 700; cursor: pointer; padding: 0 36px 0 15px; }
.sort-wrap::after { content: "⌄"; position: absolute; right: 14px; top: 10px; color: var(--mint); font-size: 18px; pointer-events: none; }
.view-toggle { display: flex; gap: 3px; padding: 3px; border: 1px solid #32425a; border-radius: 13px; background: rgba(18, 29, 48, .95); }
.view-btn { width: 37px; height: 42px; border: 0; border-radius: 9px; background: transparent; color: #8399b5; font-size: 15px; }
.view-btn:hover { color: #d4e5f7; }
.view-btn.is-active { background: rgba(92, 242, 182, .15); color: var(--mint); box-shadow: inset 0 0 0 1px rgba(92, 242, 182, .32); }
.filter-chips { display: flex; gap: 9px; margin: 0 0 18px; overflow-x: auto; padding-bottom: 3px; }
.chip { color: #a9bed9; border: 1px solid #2c405b; background: rgba(18, 29, 47, .9); border-radius: 10px; padding: 9px 13px; font-size: 12px; font-weight: 780; white-space: nowrap; transition: .16s; }
.chip:hover { color: #fff; border-color: #4f87a1; }
.chip.is-active { color: #053b2e; background: var(--mint); border-color: var(--mint); box-shadow: 0 0 16px rgba(92, 242, 182, .18); }
.chip-count { margin-left: 7px; font-size: 10px; padding: 1px 6px; border-radius: 6px; background: rgba(140, 170, 210, .13); color: inherit; opacity: .85; }
.chip.is-active .chip-count { background: rgba(5, 59, 46, .16); }
.app-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.app-card { min-width: 0; background: linear-gradient(160deg, rgba(18, 29, 49, .96), rgba(12, 20, 36, .96)); border: 1px solid #293a54; border-radius: 18px; overflow: hidden; transition: transform .22s, border-color .22s, box-shadow .22s; animation: cardIn .45s both; animation-delay: calc(var(--i, 0) * 35ms); content-visibility: auto; contain-intrinsic-size: 320px; }
.app-card:hover { transform: translateY(-5px); border-color: #4b9ba0; box-shadow: 0 22px 44px rgba(0, 0, 0, .24), 0 0 34px rgba(28, 218, 177, .08); }
.card-cover { position: relative; min-height: 116px; display: flex; align-items: center; padding: 17px; background: radial-gradient(ellipse at 82% 12%, rgba(152, 111, 255, .3), transparent 58%), linear-gradient(120deg, #192f51, #1a2342 53%, #101a32); border-bottom: 1px solid rgba(139, 185, 242, .1); overflow: hidden; }
.app-card-app .card-cover { background: radial-gradient(ellipse at 82% 12%, rgba(41, 202, 222, .23), transparent 58%), linear-gradient(120deg, #123545, #182642 53%, #0f2334); }
.card-cover-pattern { position: absolute; width: 190px; height: 190px; right: -50px; top: -105px; border: 1px solid rgba(137, 181, 243, .13); border-radius: 50%; box-shadow: 0 0 0 34px rgba(132, 164, 220, .05), 0 0 0 70px rgba(102, 145, 198, .03); }
.app-icon { position: relative; z-index: 1; display: grid; place-items: center; width: 70px; height: 70px; border-radius: 18px; overflow: hidden; background: #1a2840; box-shadow: 0 10px 24px rgba(0, 0, 0, .24); border: 1px solid rgba(229, 241, 255, .2); flex: none; }
.cover-image { height: 100%; width: 100%; object-fit: cover; display: block; }
.icon-fallback { height: 100%; width: 100%; display: grid; place-items: center; font-size: 36px; font-weight: 780; }
.icon-game { color: #d0b5ff; background: linear-gradient(150deg, #493578, #1c2a4d); }
.icon-app { color: #8cf1ed; background: linear-gradient(150deg, #17576f, #143253); }
.card-type { position: relative; z-index: 1; display: inline-flex; align-items: center; white-space: nowrap; background: rgba(13, 24, 40, .82); border: 1px solid #425479; padding: 5px 8px; border-radius: 7px; color: #d3e0f6; font-size: 9px; letter-spacing: .6px; font-weight: 850; margin-left: auto; align-self: flex-start; }
.card-new { position: absolute; z-index: 2; right: 16px; bottom: 12px; font-size: 8px; font-weight: 900; letter-spacing: 1.2px; color: #06372c; background: var(--mint); border-radius: 5px; padding: 3px 7px; box-shadow: 0 0 14px rgba(92, 242, 182, .4); }
.card-body { padding: 17px 16px 16px; }
.card-body h3 { font-size: 15px; letter-spacing: -.2px; font-weight: 830; margin: 0; line-height: 1.3; overflow-wrap: anywhere; }
.app-version { margin-top: 8px; font-size: 11px; color: #9cb4d0; display: flex; align-items: center; gap: 7px; }
.version-dot { height: 6px; width: 6px; background: var(--mint); border-radius: 50%; box-shadow: 0 0 9px rgba(92, 242, 182, .6); flex: none; }
.app-description { font-size: 11px; color: #8ba1bf; line-height: 1.75; min-height: 61px; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden; margin: 14px 0 17px; }
.card-meta { display: flex; justify-content: space-between; gap: 7px; font-size: 10px; color: #a6b8cb; padding-bottom: 15px; border-bottom: 1px solid #263650; white-space: nowrap; }
.card-actions { display: flex; gap: 8px; margin-top: 14px; }
.download-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 10px; height: 40px; background: linear-gradient(120deg, #57f0b4, #2ad59c); color: #062a25; font-size: 11px; font-weight: 870; flex: 1; white-space: nowrap; transition: .17s; }
.download-button span { font-size: 17px; }
.download-button:hover { background: linear-gradient(120deg, #8affce, #54e9b7); box-shadow: 0 0 20px rgba(92, 242, 182, .22); }
.details-button { border: 0; background: transparent; color: inherit; }
.card-more { background: #1b2a41; border: 1px solid #324663; border-radius: 10px; color: #d0dced; font-size: 10px; padding: 0 11px; font-weight: 780; }
.card-more:hover { background: #253952; border-color: #57bad9; }
.card-more span { margin-left: 4px; }

/* List view */
.app-grid.list-view { grid-template-columns: 1fr; }
.app-grid.list-view .app-card { display: grid; grid-template-columns: 190px minmax(0, 1fr); }
.app-grid.list-view .card-cover { min-height: 100%; }
.app-grid.list-view .app-icon { width: 82px; height: 82px; }
.app-grid.list-view .card-body { padding: 20px 22px; }
.app-grid.list-view .app-description { min-height: 0; -webkit-line-clamp: 2; line-clamp: 2; margin: 10px 0 14px; }
.app-grid.list-view .card-actions { justify-content: flex-start; }
.app-grid.list-view .download-button { flex: 0 0 190px; }

/* Sidebar */
.home-sidebar { display: flex; flex-direction: column; gap: 17px; padding-top: 18px; }
.sidebar-panel { border: 1px solid #283d57; background: linear-gradient(155deg, rgba(21, 33, 55, .92), rgba(14, 23, 40, .92)); border-radius: 17px; padding: 20px 17px; }
.panel-head { display: flex; align-items: center; gap: 9px; margin-bottom: 18px; }
.panel-head h3 { font-size: 14px; letter-spacing: -.15px; margin: 0; }
.panel-icon { font-size: 21px; color: var(--mint); line-height: 1; }
.recent-list { display: flex; flex-direction: column; }
.recent-item { display: flex; align-items: center; gap: 9px; padding: 11px 0; text-align: left; background: transparent; color: inherit; border: 0; border-top: 1px solid #28374e; min-width: 0; }
.recent-item:hover .recent-info b { color: var(--mint); }
.recent-icon { width: 41px; height: 41px; border-radius: 11px; overflow: hidden; flex: none; }
.recent-icon .icon-fallback { font-size: 20px; }
.recent-info { min-width: 0; flex: 1; }
.recent-info b { display: block; font-size: 11px; max-width: 100%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.recent-info small { color: #8398b6; font-size: 10px; display: block; margin-top: 5px; white-space: nowrap; }
.recent-arrow { color: #61a9b5; font-size: 16px; transition: transform .2s; }
.recent-item:hover .recent-arrow { transform: translate(2px, -2px); color: var(--mint); }
.aside-empty { text-align: center; font-size: 11px; color: #8da0b8; border: 1px dashed #30445d; border-radius: 11px; padding: 17px 13px; line-height: 1.8; }
.aside-empty-icon { display: block; color: var(--mint); font-size: 26px; margin-bottom: 6px; }
.safety-steps { display: flex; flex-direction: column; gap: 13px; }
.safety-steps li { display: flex; gap: 11px; align-items: flex-start; counter-increment: step; }
.safety-steps > li > span { color: var(--mint); font-weight: 900; font-size: 11px; letter-spacing: 1px; }
.safety-steps p { color: #a3b3c9; font-size: 11px; line-height: 1.6; margin: 0; }
.safety-note { background: rgba(255, 202, 111, .07); border: 1px solid rgba(255, 202, 111, .22); padding: 11px; border-radius: 10px; color: #e0bf84; font-size: 10px; line-height: 1.5; margin-top: 17px; }
.sidebar-cta { position: relative; border: 1px solid #36666a; border-radius: 17px; padding: 22px 19px; overflow: hidden; background: radial-gradient(ellipse at 97% 0%, rgba(37, 230, 158, .23), transparent 60%), linear-gradient(150deg, #12313c, #111e37); }
.cta-decoration { position: absolute; right: -17px; top: -38px; color: rgba(92, 242, 182, .17); font-size: 150px; line-height: 1; }
.sidebar-cta > span { font-size: 9px; color: var(--mint); letter-spacing: 1.8px; font-weight: 850; }
.sidebar-cta h3 { position: relative; margin: 9px 0; font-size: 18px; letter-spacing: -.4px; }
.sidebar-cta p { position: relative; font-size: 11px; color: #9eb3c8; line-height: 1.75; }
.sidebar-cta a { position: relative; display: flex; align-items: center; justify-content: space-between; color: #041e1c; background: var(--mint); font-size: 11px; font-weight: 880; padding: 12px; border-radius: 10px; margin-top: 19px; }
.install-button { position: relative; display: flex; align-items: center; justify-content: space-between; width: 100%; border: 1px dashed #4bb9a0; border-radius: 10px; background: rgba(92, 242, 182, .08); color: var(--mint); font-size: 11px; font-weight: 840; padding: 10px 12px; margin-top: 12px; }
.install-button:hover { background: rgba(92, 242, 182, .16); border-style: solid; }

/* Empty & loading state */
.empty-state { grid-column: 1/-1; display: flex; align-items: center; justify-content: center; flex-direction: column; text-align: center; min-height: 330px; border: 1px dashed #32506b; border-radius: 18px; background: radial-gradient(ellipse at center top, rgba(34, 75, 115, .16), transparent 75%), rgba(15, 25, 43, .85); padding: 34px; }
.empty-icon { width: 70px; height: 70px; border-radius: 19px; background: linear-gradient(140deg, #1d3459, #1d2850); border: 1px solid #46688f; display: grid; place-items: center; color: #c7adff; font-size: 34px; margin-bottom: 17px; box-shadow: 0 0 26px rgba(168, 139, 255, .12); }
.empty-state h3 { font-size: 22px; letter-spacing: -.6px; margin: 9px 0 4px; }
.empty-state p { font-size: 12px; max-width: 410px; line-height: 1.8; color: #8fa4bf; margin: 5px 0 15px; }
.empty-admin { margin-top: 4px; display: inline-flex; align-items: center; gap: 18px; border: 1px solid #2c8a79; border-radius: 10px; background: #123d3e; padding: 10px 15px; color: var(--mint); font-size: 12px; font-weight: 830; }
.empty-admin:hover { background: #1a5353; }
.skeleton-card { width: min(100%, 320px); height: 74px; border-radius: 12px; margin-bottom: 10px; background: linear-gradient(100deg, #152238 20%, #22354f 50%, #152238 80%); background-size: 200% 100%; animation: shimmer 1.3s linear infinite; }

/* About & footer */
.info-section { display: flex; align-items: flex-start; gap: 20px; margin: 27px auto 66px; background: linear-gradient(110deg, rgba(18, 30, 51, .9), rgba(12, 26, 42, .9)); border: 1px solid #2c4660; border-radius: 18px; padding: 27px 30px; scroll-margin-top: 35px; }
.info-icon { flex: none; width: 49px; height: 49px; border-radius: 14px; background: #143b3b; color: var(--mint); display: grid; place-items: center; font-size: 23px; }
.info-section > div:nth-child(2) { flex: 1; }
.info-section h3 { font-size: 17px; margin: 5px 0; letter-spacing: -.3px; }
.info-section p { font-size: 11px; color: #98acc3; line-height: 1.8; max-width: 880px; margin: 0; }
.back-top { width: 38px; height: 38px; border-radius: 11px; border: 1px solid #385270; display: grid; place-items: center; color: var(--mint); font-size: 18px; flex: none; transition: .18s; }
.back-top:hover { background: rgba(92, 242, 182, .1); border-color: var(--mint); }
footer { border-top: 1px solid var(--line-soft); background: rgba(8, 13, 24, .85); }
.footer-inner { min-height: 108px; display: flex; justify-content: space-between; align-items: center; gap: 20px; color: #8295ad; }
.footer-brand { display: flex; align-items: center; gap: 10px; }
.brand-mark.mini { width: 35px; height: 35px; font-size: 13px; border-radius: 10px; }
.footer-brand strong { color: #e7f3ff; font-weight: 860; letter-spacing: -.2px; }
.footer-brand small { display: block; font-size: 8px; letter-spacing: 1.9px; color: #697f98; margin-top: 3px; }
.footer-copy, .footer-admin { font-size: 11px; }
.footer-admin:hover { color: var(--mint); }

/* Dialog & toast */
.app-dialog { position: fixed; max-height: calc(100dvh - 32px); overflow: auto; width: min(520px, calc(100% - 28px)); border: 1px solid #487c8c; border-radius: 22px; background: linear-gradient(155deg, #17253d, #0d1627); color: var(--ink); padding: 30px; box-shadow: 0 28px 110px rgba(0, 0, 0, .75); animation: dialogIn .24s ease both; }
.app-dialog::backdrop { background: rgba(3, 7, 14, .78); backdrop-filter: blur(8px); }
.dialog-close { position: absolute; right: 17px; top: 12px; background: transparent; border: 0; color: #92abc5; font-size: 26px; line-height: 1; }
.dialog-close:hover { color: #fff; }
.dialog-tag { color: var(--mint); font-size: 10px; letter-spacing: 1.8px; font-weight: 850; margin-bottom: 24px; }
.dialog-top { display: flex; align-items: center; gap: 16px; }
.dialog-icon { width: 82px; height: 82px; flex: none; border-radius: 20px; overflow: hidden; border: 1px solid #3c5472; }
.dialog-top .card-type { margin: 0; }
.dialog-top h2 { font-size: 24px; letter-spacing: -.7px; margin: 7px 0 3px; line-height: 1.24; overflow-wrap: anywhere; }
.dialog-top p { font-size: 12px; color: #94a9c3; margin: 0; }
.dialog-description { font-size: 13px; color: #b2c0d5; line-height: 1.8; margin: 23px 0; }
.details-list { margin: 0 0 21px; padding: 13px 0; border-top: 1px solid #2d4059; border-bottom: 1px solid #2d4059; }
.details-list > div { display: flex; justify-content: space-between; align-items: baseline; gap: 15px; padding: 8px 0; }
.details-list dt { font-size: 11px; color: #8297b7; }
.details-list dd { font-size: 12px; font-weight: 760; color: #e4ecf9; margin: 0; text-align: right; }
.details-list .wrap { overflow-wrap: anywhere; max-width: 64%; }
.format-badge { background: rgba(101, 220, 255, .12); border: 1px solid rgba(101, 220, 255, .3); color: #8ce6ff; border-radius: 6px; padding: 2px 8px; font-size: 10px; font-weight: 850; }
.dialog-download { display: flex; justify-content: center; margin-bottom: 10px; width: 100%; }
.dialog-secondary { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.copy-button { background: #1b3143; border: 1px solid #2c5060; border-radius: 10px; color: #a5efd9; font-size: 11px; font-weight: 780; width: 100%; padding: 12px; transition: .18s; }
.copy-button:hover { border-color: var(--mint); background: #1f4350; }
.dialog-warning { font-size: 10px; color: #a5a7bd; text-align: center; margin: 15px 0 0; }
.toast { position: fixed; z-index: 60; bottom: 20px; left: 50%; transform: translate(-50%, 12px); opacity: 0; pointer-events: none; white-space: nowrap; background: #17433e; border: 1px solid #368d74; color: #d8ffee; padding: 12px 20px; border-radius: 12px; box-shadow: 0 15px 40px rgba(0, 0, 0, .35); font-size: 12px; transition: .22s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Admin */
.admin-body { background: radial-gradient(ellipse 60% 45% at 88% 8%, rgba(94, 48, 168, .2), transparent 78%), var(--bg); }
.admin-main { min-height: calc(100dvh - 188px); }
.header-controls { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.text-button { font-size: 12px; font-weight: 800; color: #ff9c9e; background: #2b1d2c; border: 1px solid #66465e; border-radius: 10px; padding: 10px 12px; }
.text-button:hover { background: #3b2539; }
.login-wrap { display: flex; justify-content: center; padding: 72px 0 100px; }
.login-card-v3 { width: min(880px, 100%); display: grid; grid-template-columns: 1.08fr .92fr; gap: 0; border: 1px solid #345571; border-radius: 24px; background: linear-gradient(155deg, rgba(21, 36, 59, .95), rgba(13, 23, 40, .96)); box-shadow: var(--shadow); overflow: hidden; }
.login-form-side { padding: 38px 40px; }
.login-icon { width: 70px; height: 70px; margin-bottom: 20px; border-radius: 20px; border: 1px solid #2c8874; background: linear-gradient(140deg, #174c41, #162944); box-shadow: 0 0 38px rgba(53, 228, 164, .16); color: var(--mint); display: grid; place-items: center; }
.login-wrap .eyebrow { display: block; color: var(--mint); font-size: 10px; letter-spacing: 2.3px; }
.login-wrap h1 { font-size: 34px; line-height: 1.22; letter-spacing: -1.2px; margin: 12px 0 9px; font-weight: 880; }
.login-form-side > p.intro { font-size: 13px; line-height: 1.85; color: #96abc4; margin: 0; max-width: 390px; }
.login-card { background: transparent; border: 0; border-radius: 0; margin-top: 28px; padding: 0; text-align: left; box-shadow: none; }
.field-label { display: block; font-size: 11px; font-weight: 800; color: #c9d9ed; margin-bottom: 9px; }
.field-label em { font-style: normal; color: #ff9d92; }
.login-card input, .field input, .field select, .field textarea { display: block; width: 100%; min-width: 0; outline: none; background: #0d182a; border: 1px solid #33475f; border-radius: 11px; color: #edf7ff; padding: 12px 14px; font-size: 12px; transition: .17s; }
.login-card input:focus, .field input:focus, .field select:focus, .field textarea:focus { border-color: var(--mint); box-shadow: 0 0 0 4px rgba(92, 242, 182, .09); }
.login-card input::placeholder, .field input::placeholder, .field textarea::placeholder { color: #7186a4; }
.login-card .primary-button { width: 100%; justify-content: space-between; margin-top: 17px; }
.form-error { font-size: 11px; line-height: 1.5; color: #ff9f9f; margin: 11px 0 0; }
.form-error:empty { display: none; }
.login-wrap .login-note { font-size: 10px; color: #8195ad; margin: 19px 0 0; }
.login-info-side { position: relative; overflow: hidden; padding: 38px 32px; border-left: 1px solid rgba(120, 165, 220, .14); background: radial-gradient(ellipse at 100% 0%, rgba(92, 242, 182, .2), transparent 62%), radial-gradient(ellipse at 0% 100%, rgba(168, 139, 255, .18), transparent 62%), #0c172b; display: flex; flex-direction: column; justify-content: center; }
.login-info-side::before { content: "✦"; position: absolute; right: -30px; top: -70px; color: rgba(92, 242, 182, .08); font-size: 260px; line-height: 1; }
.login-shield { position: relative; width: 78px; height: 78px; border-radius: 22px; border: 1px solid rgba(92, 242, 182, .4); background: rgba(92, 242, 182, .1); color: var(--mint); display: grid; place-items: center; font-size: 36px; margin-bottom: 24px; box-shadow: 0 0 42px rgba(92, 242, 182, .14); }
.login-info-side h2 { position: relative; font-size: 21px; letter-spacing: -.5px; margin: 0 0 10px; }
.login-info-side p { position: relative; font-size: 12px; color: #9db1ca; line-height: 1.8; margin: 0 0 24px; }
.login-features { position: relative; display: flex; flex-direction: column; gap: 12px; }
.login-features li { display: flex; align-items: center; gap: 10px; font-size: 11px; color: #c3d3e8; }
.login-features b { width: 22px; height: 22px; border-radius: 7px; background: rgba(92, 242, 182, .13); border: 1px solid rgba(92, 242, 182, .3); color: var(--mint); display: grid; place-items: center; font-size: 11px; flex: none; }

.dashboard { padding: 48px 0 72px; }
.dash-title { font-size: 34px !important; }
.secure-indicator { display: inline-flex; align-items: center; gap: 10px; border: 1px solid #2b7f69; background: #12372f; color: #99f7d0; border-radius: 50px; padding: 9px 15px; font-size: 10px; font-weight: 800; white-space: nowrap; }
.dashboard-columns { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(280px, 1fr); gap: 20px; }
.dash-card { background: linear-gradient(140deg, rgba(20, 32, 53, .95), rgba(13, 22, 39, .95)); border: 1px solid #2c405a; border-radius: 19px; padding: 28px; box-shadow: 0 15px 45px rgba(0, 0, 0, .1); }
.card-heading { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 23px; }
.card-numeric { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: rgba(92, 242, 182, .11); border: 1px solid #2b7868; color: var(--mint); font-size: 11px; font-weight: 870; flex: none; }
.card-heading h2 { font-size: 16px; line-height: 1.4; letter-spacing: -.2px; margin: 0; }
.card-heading p { font-size: 11px; margin: 3px 0 0; color: #8499b6; }
.field-row { display: grid; grid-template-columns: 1.4fr 1fr; gap: 15px; }
.field { display: block; margin-bottom: 18px; }
.field select { cursor: pointer; color-scheme: dark; }
.field textarea { resize: vertical; min-height: 84px; }
.optional { font-weight: 500; color: #869bb8; }
.icon-picker { border: 1px solid #304963; display: flex; align-items: center; gap: 13px; padding: 11px; border-radius: 12px; cursor: pointer; margin-bottom: 24px; background: #0d1829; transition: .15s; }
.icon-picker:hover { border-color: #4aab95; }
.icon-picker input { display: none; }
.icon-preview { width: 54px; height: 54px; border: 1px dashed #396d73; background: #163043; border-radius: 11px; display: grid; place-items: center; flex: none; color: var(--mint); font-size: 24px; overflow: hidden; }
.icon-preview img { width: 100%; height: 100%; object-fit: cover; }
.icon-picker strong { display: block; color: #d0e1f4; font-size: 12px; }
.icon-picker small { display: block; margin-top: 3px; color: #7e97b2; font-size: 10px; }
.file-drop { border: 2px dashed #386b72; min-height: 193px; border-radius: 16px; background: linear-gradient(125deg, rgba(29, 77, 74, .14), rgba(24, 33, 67, .4)); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 24px; cursor: pointer; outline: 0; transition: .17s; }
.file-drop.drag-over, .file-drop:hover, .file-drop:focus-visible { border-color: var(--mint); background: rgba(33, 124, 91, .15); transform: translateY(-2px); }
.file-drop.has-file { border-color: #35dba5; background: rgba(24, 134, 93, .14); }
.drop-icon { width: 50px; height: 50px; display: grid; place-items: center; margin-bottom: 13px; border-radius: 13px; background: rgba(92, 242, 182, .11); border: 1px solid #316c65; color: var(--mint); }
.file-drop strong { font-size: 13px; overflow-wrap: anywhere; max-width: 100%; }
.file-drop p { font-size: 11px; color: #86a1b9; margin: 4px 0 14px; }
.file-chip { border: 1px solid #314a64; border-radius: 8px; background: #17263b; color: #9fb6c9; font-size: 9px; font-weight: 790; padding: 6px 9px; }
.upload-progress-wrap { margin-top: 16px; }
.progress-head { display: flex; justify-content: space-between; margin-bottom: 8px; font-size: 11px; color: #a8d4cb; font-weight: 740; }
.progress-track { height: 8px; border-radius: 99px; background: #253750; overflow: hidden; }
.progress-track span { display: block; width: 0; height: 100%; background: linear-gradient(90deg, #31d9d7, #42ffa8); border-radius: 99px; transition: width .2s; }
.upload-message { border-radius: 11px; border: 1px solid #298268; padding: 12px; background: #11362d; color: #a5f9da; font-size: 12px; overflow-wrap: anywhere; margin-top: 15px; }
.upload-message.error { background: #39212b; color: #ffc1bf; border-color: #805060; }
.upload-submit { width: 100%; justify-content: space-between; margin-top: 22px; }
.upload-footnote { font-size: 10px; color: #889eb4; line-height: 1.7; margin: 13px 0 0; }
.admin-side { display: flex; flex-direction: column; gap: 20px; align-self: start; }
.admin-side .dash-card { padding: 23px; }
.side-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.side-stats > div { border: 1px solid #2a425d; background: #0d1a2c; border-radius: 12px; padding: 18px 14px; }
.side-stats strong { font-size: 26px; letter-spacing: -.6px; display: block; color: var(--mint); }
.side-stats span { display: block; margin-top: 4px; color: #92a4bc; font-size: 10px; }
.side-tip { display: flex; align-items: flex-start; gap: 11px; background: #142f36; border: 1px solid #2a5c63; border-radius: 11px; padding: 12px; margin-top: 15px; }
.side-tip > span { font-size: 19px; color: var(--mint); }
.side-tip p { margin: 0; font-size: 10px; line-height: 1.7; color: #a5c6c4; }
.dash-help h3 { margin: 0 0 21px; font-size: 15px; letter-spacing: -.2px; }
.steps { display: flex; flex-direction: column; gap: 16px; }
.steps > div { display: flex; gap: 12px; align-items: center; font-size: 11px; color: #a1b2cb; }
.steps b { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; flex: none; background: #193a3b; border: 1px solid #2f6965; color: var(--mint); font-size: 11px; }
.help-link { display: block; color: var(--mint); font-size: 11px; font-weight: 800; margin-top: 22px; border-top: 1px solid #2d3d53; padding-top: 16px; }
.manage-section { margin-top: 49px; }
.manage-section .section-head h2 { font-size: 25px; }
.secondary-button { background: #142337; border: 1px solid #39536c; border-radius: 10px; color: #c8e5ec; padding: 10px 15px; font-size: 11px; font-weight: 790; }
.secondary-button:hover { border-color: var(--mint); color: var(--mint); }
.manage-list { background: rgba(17, 27, 45, .9); border: 1px solid #2d415b; border-radius: 17px; overflow: hidden; }
.manage-empty { text-align: center; color: #8d9fba; font-size: 12px; padding: 38px 16px; }
.manage-item { display: flex; align-items: center; gap: 15px; border-bottom: 1px solid #283b53; padding: 13px 19px; transition: background .18s; }
.manage-item:last-child { border: 0; }
.manage-item:hover { background: rgba(40, 61, 89, .25); }
.manage-icon { width: 45px; height: 45px; border-radius: 12px; background: #18334e; display: grid; place-items: center; font-size: 21px; flex: none; overflow: hidden; }
.manage-icon img { width: 100%; height: 100%; object-fit: cover; }
.manage-name { flex: 1; min-width: 0; }
.manage-name b { display: block; font-size: 12px; overflow-wrap: anywhere; }
.manage-name span { display: block; font-size: 10px; color: #8499b7; margin-top: 4px; overflow-wrap: anywhere; }
.manage-link { font-size: 11px; background: #153c3b; border: 1px solid #286d61; color: #9ef9d1; border-radius: 9px; padding: 8px 11px; white-space: nowrap; font-weight: 800; }
.delete-button { border: 1px solid #754453; border-radius: 9px; background: #2f202f; color: #ffb0ac; padding: 8px 13px; font-size: 11px; font-weight: 780; }
.delete-button:hover { background: #4c2937; }
.delete-button:disabled { opacity: .6; }

/* Motion */
.reveal { opacity: 0; transform: translateY(20px); }
.reveal.is-visible { opacity: 1; transform: none; transition: opacity .6s ease, transform .6s ease; }
@keyframes cardIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes dropIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }
@keyframes dialogIn { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes float { 0%, 100% { transform: rotate(-2deg) translateY(0); } 50% { transform: rotate(-1deg) translateY(-9px); } }
@keyframes orbit { to { transform: rotate(360deg); } }
@keyframes pulse { 50% { box-shadow: 0 0 0 8px rgba(92, 242, 182, .04), 0 0 18px rgba(92, 242, 182, 1); } }
@keyframes shimmer { to { background-position: -200% 0; } }

/* Responsive */
@media (max-width: 1230px) {
  .shell { width: min(100% - 48px, 1320px); }
  .header-inner { gap: 22px; }
  .top-nav { margin-left: 5px; gap: 18px; }
  .hero-copy { padding-left: 44px; }
  .hero h1 { font-size: 58px; }
  .strip-label { width: 190px; }
  .content-layout { grid-template-columns: minmax(0, 1fr) 258px; gap: 18px; }
  .app-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 980px) {
  .top-nav { display: none; }
  .menu-toggle { display: flex; }
  .mobile-nav { display: none; }
  .header-actions { margin-left: auto; }
  .hero { grid-template-columns: 1fr; min-height: auto; }
  .hero-copy { padding: 52px 44px 24px; }
  .hero h1 { font-size: 52px; }
  .hero-copy > p { max-width: 620px; }
  .hero-art { min-height: 340px; }
  .console-card { right: 6%; top: 10px; width: 76%; }
  .tag-left { left: 8%; top: 46px; }
  .tag-right { right: 8%; bottom: 30px; }
  .hero-art-caption { display: none; }
  .category-strip { align-items: flex-start; flex-direction: column; }
  .strip-label { width: auto; }
  .category-tiles { width: 100%; }
  .content-layout { grid-template-columns: 1fr; }
  .home-sidebar { display: grid; grid-template-columns: 1fr 1fr; padding-top: 6px; }
  .latest-panel { grid-row: span 2; }
  .app-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-columns { grid-template-columns: 1fr; }
  .admin-side { display: grid; grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .shell { width: calc(100% - 32px); }
  .site-header, .header-inner, .mobile-nav { height: 70px; }
  .mobile-nav { top: 70px; height: auto; }
  .brand-mark { width: 42px; height: 42px; border-radius: 12px; }
  .brand-word { font-size: 21px; }
  .header-find { display: none; }
  .hero { margin-top: 16px; border-radius: 20px; }
  .hero-copy { padding: 38px 30px 24px; }
  .hero h1 { font-size: 46px; letter-spacing: -2px; }
  .hero-art { min-height: 240px; }
  .console-card { right: 3%; width: 88%; }
  .stats-strip { grid-template-columns: repeat(2, 1fr); min-height: 0; }
  .stat-item { padding: 16px 14px; justify-content: flex-start; }
  .stat-item:nth-child(2)::after { display: none; }
  .stat-item:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .category-strip { padding: 34px 0 30px; }
  .login-card-v3 { grid-template-columns: 1fr; }
  .login-info-side { border-left: 0; border-top: 1px solid rgba(120, 165, 220, .14); }
  .login-form-side { padding: 30px 26px; }
  .login-info-side { padding: 26px; }
  .login-shield { margin-bottom: 16px; }
  .admin-side { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  html { scroll-padding-top: 84px; }
  .shell { width: calc(100% - 28px); }
  .brand { gap: 9px; }
  .brand-mark { width: 38px; height: 38px; font-size: 15px; }
  .brand-word { font-size: 19px; }
  .brand-word small { font-size: 7px; letter-spacing: 1.6px; }
  .header-admin { display: none; }
  .admin-body .header-admin { display: inline-flex; padding: 9px 10px; font-size: 11px; }
  .header-admin svg { display: none; }
  .header-inner { gap: 8px; }
  .menu-toggle { width: 40px; height: 40px; }
  .hero-copy { padding: 31px 23px 16px; }
  .hero .eyebrow { font-size: 9px; letter-spacing: 1.4px; gap: 7px; }
  .hero h1 { font-size: 40px; letter-spacing: -1.9px; margin: 18px 0 12px; }
  .hero-copy > p { font-size: 12px; line-height: 1.75; }
  .hero-actions { gap: 9px; margin-top: 22px; }
  .hero-link, .outline-button { font-size: 11px; min-height: 45px; padding: 0 13px; }
  .hero-trust { font-size: 9px; gap: 10px 16px; margin-top: 24px; }
  .hero-art { min-height: 195px; }
  .console-card { top: 0; right: -4%; width: 96%; padding: 9px 10px 12px; border-radius: 17px; }
  .console-card-top, .console-card-bottom { font-size: 6px; letter-spacing: 1px; }
  .float-tag { padding: 6px 8px; font-size: 7px; }
  .float-tag b { font-size: 8px; }
  .float-icon { width: 26px; height: 26px; font-size: 15px; }
  .tag-left { top: 10px; left: 4%; }
  .tag-right { bottom: 14px; right: 3%; }
  .stats-strip { margin-top: 14px; border-radius: 14px; }
  .stat-item { gap: 10px; padding: 14px 11px; }
  .stat-symbol { width: 37px; height: 37px; font-size: 19px; border-radius: 10px; }
  .stat-item strong { font-size: 20px; }
  .stat-item small { font-size: 9px; }
  .strip-label strong { font-size: 20px; }
  .category-strip { padding: 30px 0 27px; gap: 16px; }
  .category-tiles { grid-template-columns: 1fr 1fr; gap: 9px; }
  .category-tile { min-height: 76px; padding: 10px; }
  .category-tile:last-child { grid-column: 1/-1; }
  .category-tile b { font-size: 12px; }
  .category-tile small { font-size: 9px; }
  .tile-glyph { width: 37px; height: 37px; font-size: 21px; }
  .tile-arrow { font-size: 13px; }
  .section-head { align-items: flex-start; }
  .section-head h2 { font-size: 23px; }
  .section-head p { font-size: 11px; }
  .list-count { font-size: 10px; padding: 5px 8px; }
  .toolbar { flex-wrap: wrap; gap: 8px; }
  .search-box { flex-basis: calc(100% - 128px); height: 46px; padding: 0 11px; }
  .search-box input { font-size: 11px; }
  .sort-wrap select { min-height: 46px; padding: 0 26px 0 8px; font-size: 10px; max-width: 106px; }
  .sort-wrap::after { right: 8px; }
  .view-toggle { height: 46px; }
  .view-btn { width: 31px; height: 38px; }
  .app-grid { grid-template-columns: 1fr; gap: 13px; }
  .app-grid.list-view .app-card { grid-template-columns: 1fr; }
  .app-grid.list-view .card-cover { min-height: 110px; }
  .app-grid.list-view .download-button { flex: 1; }
  .card-cover { min-height: 105px; }
  .card-body h3 { font-size: 17px; }
  .app-description { min-height: 0; -webkit-line-clamp: 2; line-clamp: 2; }
  .home-sidebar { grid-template-columns: 1fr; gap: 13px; }
  .latest-panel { grid-row: auto; }
  .info-section { margin: 24px auto 50px; padding: 21px; gap: 11px; }
  .info-icon { width: 39px; height: 39px; }
  .info-section h3 { font-size: 15px; }
  .back-top { display: none; }
  .footer-inner { padding: 24px 0; min-height: auto; flex-wrap: wrap; gap: 13px; }
  .footer-copy { order: 3; width: 100%; font-size: 10px; }
  .app-dialog { padding: 25px 20px; }
  .dialog-secondary { grid-template-columns: 1fr; }
  .login-wrap { padding: 40px 0 60px; }
  .login-wrap h1 { font-size: 29px; }
  .dashboard { padding: 32px 0 55px; }
  .dash-title { font-size: 26px !important; }
  .secure-indicator { display: none; }
  .dash-card { padding: 19px; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .admin-side { grid-template-columns: 1fr; }
  .manage-item { gap: 9px; padding: 11px 10px; flex-wrap: wrap; }
  .manage-icon { width: 38px; height: 38px; }
  .manage-name { flex-basis: calc(100% - 58px); }
  .manage-link { margin-left: 47px; font-size: 10px; padding: 7px 10px; }
  .delete-button { font-size: 10px; padding: 7px 10px; }
  .toast { max-width: calc(100% - 20px); white-space: normal; text-align: center; }
}
@media (max-width: 380px) {
  .brand-word { font-size: 17px; }
  .brand-word small { font-size: 6px; letter-spacing: 1.2px; }
  .header-actions { gap: 5px; }
  .header-admin { display: none; }
  .admin-body .brand-word { font-size: 17px; }
  .admin-body .brand-word small { font-size: 6px; letter-spacing: 1.2px; }
  .admin-body .header-controls { gap: 6px; }
  .admin-body .header-admin { display: inline-flex; padding: 8px; font-size: 10px; }
  .admin-body .text-button { padding: 8px; font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ============================================================
   V3.1 — Theme system, command palette and interaction polish
   ============================================================ */

/* Header icon button + theme switcher */
.header-icon-button { display: inline-grid; place-items: center; width: 42px; height: 42px; border: 1px solid #34465e; border-radius: 11px; background: #141f31; color: #d7e3f7; padding: 0; transition: border-color .18s, color .18s, background .18s; }
.header-icon-button > span { font-size: 21px; line-height: 1; }
.header-icon-button:hover { border-color: var(--mint); color: var(--mint); background: #1a2b40; }
.theme-switcher { position: relative; flex: none; }
.theme-button .theme-glyph { font-size: 20px; }
.theme-menu { position: absolute; right: 0; top: calc(100% + 10px); z-index: 50; width: 226px; padding: 7px; border: 1px solid #3a5673; border-radius: 14px; background: rgba(14, 25, 43, .98); box-shadow: 0 20px 48px rgba(0, 0, 0, .45); backdrop-filter: blur(18px); animation: dropIn .18s ease both; }
.theme-menu[hidden] { display: none; }
.theme-menu button { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: transparent; color: #cddcf1; border-radius: 9px; padding: 10px; font-size: 12px; font-weight: 760; text-align: left; }
.theme-menu button:hover, .theme-menu button.is-active { background: rgba(92, 242, 182, .1); color: var(--mint); }
.theme-menu button small { margin-left: auto; font-size: 9px; font-weight: 650; color: #7f96b1; }
.theme-swatch { width: 19px; height: 19px; border-radius: 6px; border: 1px solid rgba(255, 255, 255, .35); flex: none; }
.swatch-aurora { background: linear-gradient(135deg, #52f2b5 45%, #a88bff 55%); }
.swatch-midnight { background: linear-gradient(135deg, #4da8ff 45%, #14265a 55%); }
.swatch-light { background: linear-gradient(135deg, #ffffff 45%, #cbd9ea 55%); border-color: #9fb2c8; }
.mobile-theme-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 10px 4px 0; padding-top: 11px; border-top: 1px solid #2b3f59; }
.mobile-theme-row button { border: 1px solid #344a66; background: #14223a; color: #aebfd6; border-radius: 9px; padding: 9px 5px; font-size: 11px; font-weight: 760; }
.mobile-theme-row button.is-active { background: rgba(92, 242, 182, .15); border-color: var(--mint); color: var(--mint); }
.top-nav a.is-current:not(.nav-active) { color: #e2edfb; }
.top-nav a.is-current:not(.nav-active)::after { content: ""; position: absolute; left: 50%; bottom: 0; width: 4px; height: 4px; border-radius: 50%; background: #7996b8; transform: translateX(-50%); }

/* Scroll progress & floating back-to-top */
.scroll-progress { position: absolute; left: 0; bottom: -1px; height: 2px; width: 0; background: linear-gradient(90deg, var(--mint), var(--cyan), var(--violet)); box-shadow: 0 0 12px rgba(92, 242, 182, .65); transition: width .1s linear; }
.back-to-float { position: fixed; right: 22px; bottom: 22px; z-index: 40; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; border: 1px solid #3a6d78; background: rgba(17, 39, 54, .94); color: var(--mint); font-size: 21px; box-shadow: 0 12px 34px rgba(0, 0, 0, .3); opacity: 0; visibility: hidden; transform: translateY(10px); transition: .22s; }
.back-to-float.is-visible { opacity: 1; visibility: visible; transform: none; }
.back-to-float:hover { background: rgba(26, 79, 72, .96); border-color: var(--mint); }

/* Command palette */
.command-palette { position: fixed; top: 11vh; margin: 0 auto; padding: 0; width: min(620px, calc(100% - 28px)); max-height: 78vh; overflow: hidden; border: 1px solid #45708a; border-radius: 19px; background: rgba(13, 23, 40, .98); color: var(--ink); box-shadow: 0 32px 100px rgba(0, 0, 0, .72); animation: dialogIn .2s ease both; }
.command-palette::backdrop { background: rgba(3, 7, 14, .74); backdrop-filter: blur(7px); }
.palette-head { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid #2c425e; }
.palette-icon { color: var(--mint); font-size: 24px; line-height: 1; }
.palette-head input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 15px; }
.palette-head input::placeholder { color: #7389a3; }
.palette-head kbd, .palette-foot kbd { font-size: 10px; color: #a7bdd5; border: 1px solid #3a5370; border-bottom-width: 2px; border-radius: 5px; padding: 1px 6px; background: #16253c; }
.palette-results { max-height: 52vh; overflow-y: auto; padding: 10px; }
.palette-label { font-size: 9px; letter-spacing: 1.6px; font-weight: 850; color: #7a94b0; padding: 10px 9px 6px; }
.palette-item { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; border: 1px solid transparent; background: transparent; color: var(--ink); border-radius: 11px; padding: 9px 10px; }
.palette-item:hover, .palette-item.is-selected { background: rgba(92, 242, 182, .09); border-color: rgba(92, 242, 182, .3); }
.palette-item-icon { width: 38px; height: 38px; border-radius: 10px; overflow: hidden; display: grid; place-items: center; background: #1a2c46; color: var(--mint); font-size: 18px; flex: none; }
.palette-item-icon .icon-fallback { font-size: 18px; }
.palette-item b { display: block; font-size: 12px; }
.palette-item small { display: block; font-size: 10px; color: #8ea3bd; margin-top: 3px; }
.palette-enter { margin-left: auto; color: #7089a5; font-size: 14px; opacity: 0; }
.palette-item.is-selected .palette-enter { opacity: 1; color: var(--mint); }
.palette-empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 34px 14px; color: #9aadc4; }
.palette-empty span { font-size: 31px; color: var(--mint); }
.palette-empty b { font-size: 13px; color: var(--ink); }
.palette-empty small { font-size: 11px; }
.palette-foot { display: flex; gap: 16px; align-items: center; padding: 11px 18px; border-top: 1px solid #2c425e; color: #839ab4; font-size: 10px; }
.palette-foot span:last-child { margin-left: auto; letter-spacing: 1px; }

/* Card copy button */
.card-copy { width: 40px; flex: none; border: 1px solid #324663; border-radius: 10px; background: #1b2a41; color: #b9cde4; font-size: 17px; transition: .17s; }
.card-copy:hover { border-color: var(--mint); color: var(--mint); background: #213a4a; }

/* Admin polish */
.password-wrap { position: relative; }
.password-wrap input { padding-right: 46px !important; }
.password-toggle { position: absolute; right: 7px; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; border: 0; border-radius: 8px; background: transparent; color: #8fa6c0; font-size: 18px; }
.password-toggle:hover { color: var(--mint); background: rgba(92, 242, 182, .08); }
.upload-steps { display: flex; gap: 6px; margin: 4px 0 15px; }
.upload-steps span { flex: 1; text-align: center; font-size: 9px; font-weight: 780; color: #7189a5; border: 1px solid #2e435d; background: #0e1b2f; border-radius: 7px; padding: 7px 4px; transition: .2s; }
.upload-steps span.is-active { color: #06382d; background: var(--mint); border-color: var(--mint); }
.upload-steps span.is-done { color: var(--mint); border-color: #2c7d68; background: rgba(92, 242, 182, .1); }
.upload-form.is-busy .field input, .upload-form.is-busy .field select, .upload-form.is-busy .field textarea, .upload-form.is-busy .icon-picker { opacity: .7; pointer-events: none; }
.manage-copy { border: 1px solid #2c5060; border-radius: 9px; background: #15343b; color: #a5efd9; padding: 8px 10px; font-size: 10px; font-weight: 800; white-space: nowrap; }
.manage-copy:hover { border-color: var(--mint); background: #1a4548; }
.confirm-dialog { width: min(420px, calc(100% - 28px)); margin: auto; border: 1px solid #6b4b58; border-radius: 18px; background: linear-gradient(150deg, #1d2438, #121a2b); color: var(--ink); padding: 26px; box-shadow: 0 28px 90px rgba(0, 0, 0, .7); text-align: center; animation: dialogIn .2s ease both; }
.confirm-dialog::backdrop { background: rgba(4, 7, 14, .76); backdrop-filter: blur(6px); }
.confirm-icon { display: grid; place-items: center; width: 52px; height: 52px; margin: 0 auto 14px; border-radius: 15px; border: 1px solid #a06a72; background: rgba(255, 141, 155, .11); color: #ff9da4; font-size: 27px; font-weight: 900; }
.confirm-dialog h2 { margin: 0 0 8px; font-size: 20px; letter-spacing: -.4px; }
.confirm-dialog p { margin: 0; color: #a6b6ca; font-size: 12px; line-height: 1.75; }
.confirm-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 22px; }
.confirm-danger { border: 0; border-radius: 10px; background: linear-gradient(120deg, #ff818b, #e35a6d); color: #2a0710; font-size: 12px; font-weight: 860; padding: 12px; }
.confirm-danger:hover { filter: brightness(1.08); }

/* Theme: Midnight (deep blue / cyan) */
:root[data-theme="midnight"] {
  --bg: #04091b;
  --bg-soft: #07112b;
  --surface: #0b1838;
  --surface-2: #102347;
  --surface-3: #162d55;
  --ink: #eef5ff;
  --muted: #9db2d6;
  --dim: #7087ad;
  --line: #223a68;
  --line-soft: #172b4e;
  --mint: #6fc9ff;
  --mint-deep: #2c9ade;
  --cyan: #8bdcff;
  --violet: #8fa9ff;
  --glow-mint: rgba(85, 180, 255, .28);
  --glow-violet: rgba(111, 142, 255, .25);
  --shadow: 0 24px 64px rgba(0, 0, 0, .5);
}
:root[data-theme="midnight"] body::before {
  background:
    radial-gradient(ellipse 55% 40% at 6% 6%, rgba(20, 76, 179, .38), transparent 78%),
    radial-gradient(ellipse 45% 42% at 94% 22%, rgba(36, 60, 168, .28), transparent 76%),
    radial-gradient(ellipse 48% 36% at 60% 94%, rgba(18, 116, 190, .18), transparent 82%);
}
:root[data-theme="midnight"] .hero {
  background: radial-gradient(ellipse at 88% 40%, rgba(28, 61, 158, .6), transparent 58%), radial-gradient(ellipse at 55% 105%, rgba(20, 104, 190, .3), transparent 62%), linear-gradient(120deg, #081b3e 0%, #061536 48%, #0d1c4e 100%);
}
:root[data-theme="midnight"] .gradient-text { background: linear-gradient(100deg, #8ce9ff 8%, #6cb6ff 52%, #c3b4ff 96%); -webkit-background-clip: text; background-clip: text; }
:root[data-theme="midnight"] .primary-button { background: linear-gradient(135deg, #8fdcff, #46a9f0); color: #032241; box-shadow: 0 8px 30px rgba(70, 169, 240, .28); }
:root[data-theme="midnight"] .download-button { background: linear-gradient(120deg, #82d8ff, #4aa6ee); color: #05213d; }
:root[data-theme="midnight"] .download-button:hover { background: linear-gradient(120deg, #a7e7ff, #66baf7); }
:root[data-theme="midnight"] .chip.is-active { color: #042544; background: var(--mint); border-color: var(--mint); }
:root[data-theme="midnight"] .card-new { color: #042544; background: var(--mint); }
:root[data-theme="midnight"] .list-count, :root[data-theme="midnight"] .secure-indicator, :root[data-theme="midnight"] .empty-admin, :root[data-theme="midnight"] .share-button { border-color: #2d6794; background: #102e4f; color: var(--mint); }
:root[data-theme="midnight"] .stat-symbol.neon-green { background: rgba(85, 180, 255, .12); color: var(--mint); }
:root[data-theme="midnight"] .console-card-top-right, :root[data-theme="midnight"] .console-card-bottom span:first-child, :root[data-theme="midnight"] .caption-flare { color: var(--mint); }
:root[data-theme="midnight"] .sidebar-cta { border-color: #2f5e97; background: radial-gradient(ellipse at 97% 0%, rgba(75, 156, 255, .22), transparent 60%), linear-gradient(150deg, #102748, #0c1b3d); }
:root[data-theme="midnight"] .sidebar-cta a { color: #05213d; background: var(--mint); }
:root[data-theme="midnight"] .theme-menu button:hover, :root[data-theme="midnight"] .theme-menu button.is-active, :root[data-theme="midnight"] .palette-item:hover, :root[data-theme="midnight"] .palette-item.is-selected { background: rgba(111, 201, 255, .1); }
:root[data-theme="midnight"] .float-icon, :root[data-theme="midnight"] .panel-icon, :root[data-theme="midnight"] .info-icon, :root[data-theme="midnight"] .drop-icon { color: var(--mint); }
:root[data-theme="midnight"] .login-shield { color: var(--mint); border-color: rgba(111, 201, 255, .4); background: rgba(111, 201, 255, .1); }
:root[data-theme="midnight"] .side-stats strong { color: var(--mint); }

/* Theme: Light */
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f7fb;
  --bg-soft: #e9eff7;
  --surface: #ffffff;
  --surface-2: #f7faff;
  --surface-3: #eef3fa;
  --ink: #16243a;
  --muted: #51657f;
  --dim: #71849d;
  --line: #d5dfec;
  --line-soft: #e5ebf3;
  --mint: #0e9d76;
  --mint-deep: #087d5e;
  --cyan: #0a87b8;
  --violet: #7158cf;
  --amber: #b87916;
  --rose: #d14d64;
  --glow-mint: rgba(14, 157, 118, .16);
  --glow-violet: rgba(113, 88, 207, .14);
  --shadow: 0 24px 60px rgba(34, 55, 90, .16);
}
:root[data-theme="light"] body { background: var(--bg); color: var(--ink); }
:root[data-theme="light"] body::before { background: radial-gradient(ellipse 55% 40% at 4% 6%, rgba(56, 166, 199, .13), transparent 78%), radial-gradient(ellipse 46% 40% at 96% 22%, rgba(126, 94, 201, .1), transparent 76%), radial-gradient(ellipse 48% 36% at 62% 94%, rgba(16, 151, 112, .08), transparent 82%); }
:root[data-theme="light"] body::after { opacity: .5; background-image: linear-gradient(rgba(65, 100, 145, .06) 1px, transparent 1px), linear-gradient(90deg, rgba(65, 100, 145, .06) 1px, transparent 1px); }
:root[data-theme="light"] .site-header { background: rgba(248, 250, 253, .86); border-color: #dbe3ee; }
:root[data-theme="light"] .site-header.is-scrolled { background: rgba(248, 250, 253, .97); box-shadow: 0 12px 35px rgba(31, 52, 85, .12); }
:root[data-theme="light"] .brand-word small, :root[data-theme="light"] .footer-brand small, :root[data-theme="light"] .footer-copy { color: #73869d; }
:root[data-theme="light"] .top-nav a { color: #5b6f88; }
:root[data-theme="light"] .top-nav a > span { color: #7f93aa; }
:root[data-theme="light"] .top-nav a:hover, :root[data-theme="light"] .top-nav a.nav-active, :root[data-theme="light"] .top-nav a.nav-active > span { color: var(--mint); }
:root[data-theme="light"] .header-find, :root[data-theme="light"] .header-admin, :root[data-theme="light"] .header-icon-button, :root[data-theme="light"] .menu-toggle { background: #ffffff; border-color: #cdd8e7; color: #334a68; }
:root[data-theme="light"] .header-find:hover, :root[data-theme="light"] .header-admin:hover, :root[data-theme="light"] .header-icon-button:hover { border-color: var(--mint); color: var(--mint); background: #f0faf6; }
:root[data-theme="light"] .menu-toggle span { background: #334a68; }
:root[data-theme="light"] .mobile-nav { background: rgba(248, 250, 253, .98); border-color: #d5dfec; }
:root[data-theme="light"] .mobile-nav-link { color: #334a68; }
:root[data-theme="light"] .mobile-nav-link:hover, :root[data-theme="light"] .mobile-nav-link.nav-active { background: rgba(14, 157, 118, .08); color: var(--mint); }
:root[data-theme="light"] .mobile-theme-row { border-color: #d5dfec; }
:root[data-theme="light"] .mobile-theme-row button { background: #ffffff; border-color: #cdd8e7; color: #4a6180; }
:root[data-theme="light"] .mobile-theme-row button.is-active { color: var(--mint); border-color: var(--mint); background: rgba(14, 157, 118, .08); }
:root[data-theme="light"] .theme-menu { background: rgba(255, 255, 255, .98); border-color: #cdd8e7; box-shadow: 0 20px 48px rgba(34, 55, 90, .2); }
:root[data-theme="light"] .theme-menu button { color: #334a68; }
:root[data-theme="light"] .theme-menu button.is-active, :root[data-theme="light"] .theme-menu button:hover { color: var(--mint); background: rgba(14, 157, 118, .08); }
:root[data-theme="light"] .theme-menu button small { color: #7b8da4; }
:root[data-theme="light"] .hero { border-color: #cddfee; background: radial-gradient(ellipse at 88% 40%, rgba(110, 92, 193, .16), transparent 58%), radial-gradient(ellipse at 55% 105%, rgba(16, 151, 112, .14), transparent 62%), linear-gradient(120deg, #e9f4ff 0%, #eef2ff 48%, #f6efff 100%); box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, .8); }
:root[data-theme="light"] .hero-grid { opacity: .32; background-image: radial-gradient(rgba(45, 92, 145, .28) .7px, transparent 1px); }
:root[data-theme="light"] .hero h1 { color: #13243c; }
:root[data-theme="light"] .gradient-text { background: linear-gradient(100deg, #058c6c 8%, #087bb0 52%, #7158cf 96%); -webkit-background-clip: text; background-clip: text; }
:root[data-theme="light"] .eyebrow { color: #0a8566; }
:root[data-theme="light"] .eyebrow-line { background: rgba(20, 90, 110, .3); }
:root[data-theme="light"] .hero-copy > p { color: #4d6480; }
:root[data-theme="light"] .hero-trust { color: #4f6680; }
:root[data-theme="light"] .outline-button { background: #ffffff; border-color: #c4d3e4; color: #29425f; }
:root[data-theme="light"] .outline-button:hover { border-color: var(--mint); background: #f0faf6; }
:root[data-theme="light"] .primary-button { color: #ffffff; box-shadow: 0 8px 26px rgba(14, 157, 118, .26), inset 0 1px 0 rgba(255, 255, 255, .3); background: linear-gradient(135deg, #17b78b, #0a8f6c); }
:root[data-theme="light"] .console-card { background: linear-gradient(160deg, rgba(255, 255, 255, .94), rgba(230, 239, 250, .96)); border-color: #bdd3e8; }
:root[data-theme="light"] .console-card-top, :root[data-theme="light"] .console-card-bottom { color: #637d99; }
:root[data-theme="light"] .float-tag { background: rgba(255, 255, 255, .95); border-color: #bcd3e7; color: #5f7894; }
:root[data-theme="light"] .float-tag b { color: #223b5a; }
:root[data-theme="light"] .hero-art-caption { color: #7a90ab; }
:root[data-theme="light"] .stats-strip { background: linear-gradient(110deg, #ffffff, #f7faff); border-color: #d5dfec; box-shadow: 0 12px 30px rgba(34, 55, 90, .08); }
:root[data-theme="light"] .stat-item::before { background: linear-gradient(90deg, transparent, rgba(30, 140, 180, .3), transparent); }
:root[data-theme="light"] .stat-item:not(:last-child)::after { background: #dfe6f0; }
:root[data-theme="light"] .stat-item small { color: #73869d; }
:root[data-theme="light"] .stat-symbol.neon-green { background: rgba(14, 157, 118, .1); color: var(--mint); }
:root[data-theme="light"] .stat-symbol.neon-purple { background: rgba(113, 88, 207, .1); color: var(--violet); }
:root[data-theme="light"] .stat-symbol.neon-blue { background: rgba(10, 135, 184, .1); color: var(--cyan); }
:root[data-theme="light"] .stat-symbol.neon-amber { background: rgba(184, 121, 22, .1); color: var(--amber); }
:root[data-theme="light"] .category-tile { background: linear-gradient(145deg, #ffffff, #f5f8fd); border-color: #d5dfec; color: var(--ink); }
:root[data-theme="light"] .category-tile:hover { border-color: #63b7a3; box-shadow: 0 14px 30px rgba(34, 55, 90, .12); }
:root[data-theme="light"] .category-tile small { color: #7488a1; }
:root[data-theme="light"] .tile-glyph { background: rgba(113, 88, 207, .1); color: var(--violet); }
:root[data-theme="light"] .cat-app .tile-glyph { background: rgba(10, 135, 184, .1); color: var(--cyan); }
:root[data-theme="light"] .cat-all .tile-glyph { background: rgba(14, 157, 118, .1); color: var(--mint); }
:root[data-theme="light"] .strip-label > span, :root[data-theme="light"] .small-kicker { color: var(--mint); }
:root[data-theme="light"] .kicker-slash { color: #9aadc2; }
:root[data-theme="light"] .section-head p { color: var(--muted); }
:root[data-theme="light"] .list-count { border-color: #a6d8c9; background: #e9f8f2; color: var(--mint); }
:root[data-theme="light"] .search-box, :root[data-theme="light"] .sort-wrap select, :root[data-theme="light"] .view-toggle { background: #ffffff; border-color: #cdd8e7; color: #29425f; }
:root[data-theme="light"] .search-box input { color: var(--ink); }
:root[data-theme="light"] .search-box input::placeholder { color: #8b9db1; }
:root[data-theme="light"] .search-box kbd { color: #7389a3; border-color: #cdd8e7; }
:root[data-theme="light"] .sort-wrap select { color: #334a68; }
:root[data-theme="light"] .view-btn { color: #7d91a9; }
:root[data-theme="light"] .view-btn.is-active { background: rgba(14, 157, 118, .12); color: var(--mint); box-shadow: inset 0 0 0 1px rgba(14, 157, 118, .35); }
:root[data-theme="light"] .chip { background: #ffffff; border-color: #cdd8e7; color: #4a6180; }
:root[data-theme="light"] .chip:hover { border-color: #72ac9c; color: var(--ink); }
:root[data-theme="light"] .chip.is-active { background: var(--mint); border-color: var(--mint); color: #ffffff; }
:root[data-theme="light"] .chip-count { background: rgba(80, 110, 145, .1); }
:root[data-theme="light"] .app-card { background: linear-gradient(160deg, #ffffff, #f7faff); border-color: #d5dfec; }
:root[data-theme="light"] .app-card:hover { border-color: #63b7a3; box-shadow: 0 20px 40px rgba(34, 55, 90, .14); }
:root[data-theme="light"] .card-cover { background: radial-gradient(ellipse at 82% 12%, rgba(113, 88, 207, .18), transparent 58%), linear-gradient(120deg, #e4ecfb, #eae8fa 53%, #e6f2f4); border-color: #d6e0ee; }
:root[data-theme="light"] .app-card-app .card-cover { background: radial-gradient(ellipse at 82% 12%, rgba(10, 135, 184, .16), transparent 58%), linear-gradient(120deg, #e0f1f7, #e8eefb 53%, #e3f3f1); }
:root[data-theme="light"] .card-type { background: rgba(255, 255, 255, .85); border-color: #b9cde1; color: #365173; }
:root[data-theme="light"] .card-new { color: #ffffff; background: var(--mint); }
:root[data-theme="light"] .app-version, :root[data-theme="light"] .app-description, :root[data-theme="light"] .card-meta { color: #647b96; }
:root[data-theme="light"] .card-meta { border-color: #e1e8f1; }
:root[data-theme="light"] .download-button { background: linear-gradient(120deg, #16b98c, #0a8e6b); color: #ffffff; }
:root[data-theme="light"] .download-button:hover { filter: brightness(1.06); }
:root[data-theme="light"] .card-copy, :root[data-theme="light"] .card-more { background: #eef3fa; border-color: #cdd8e7; color: #365173; }
:root[data-theme="light"] .card-copy:hover, :root[data-theme="light"] .card-more:hover { border-color: var(--mint); color: var(--mint); }
:root[data-theme="light"] .sidebar-panel { background: linear-gradient(155deg, #ffffff, #f6f9fd); border-color: #d5dfec; }
:root[data-theme="light"] .recent-item { border-color: #e2e8f1; }
:root[data-theme="light"] .recent-info b { color: var(--ink); }
:root[data-theme="light"] .recent-info small, :root[data-theme="light"] .safety-steps p { color: #647b96; }
:root[data-theme="light"] .aside-empty { border-color: #c9d6e6; color: #7589a1; }
:root[data-theme="light"] .safety-note { background: rgba(184, 121, 22, .07); border-color: rgba(184, 121, 22, .25); color: #96631b; }
:root[data-theme="light"] .sidebar-cta { border-color: #a9d4c6; background: radial-gradient(ellipse at 97% 0%, rgba(16, 170, 124, .16), transparent 60%), linear-gradient(150deg, #eafaf3, #edf4fd); }
:root[data-theme="light"] .sidebar-cta p { color: #58718b; }
:root[data-theme="light"] .sidebar-cta a { background: var(--mint); color: #ffffff; }
:root[data-theme="light"] .empty-state { border-color: #c9d6e6; background: radial-gradient(ellipse at center top, rgba(94, 151, 204, .12), transparent 75%), #ffffff; }
:root[data-theme="light"] .empty-icon { background: #edf0fc; border-color: #b9c6e0; color: var(--violet); }
:root[data-theme="light"] .empty-state p { color: #647b96; }
:root[data-theme="light"] .empty-admin { border-color: #7ac4ad; background: #e9f8f2; color: var(--mint); }
:root[data-theme="light"] .info-section { background: linear-gradient(110deg, #ffffff, #f4f8fd); border-color: #d5dfec; }
:root[data-theme="light"] .info-section p { color: #5e7590; }
:root[data-theme="light"] .info-icon { background: #e9f8f2; color: var(--mint); }
:root[data-theme="light"] .back-top { border-color: #cdd8e7; color: var(--mint); }
:root[data-theme="light"] footer { background: #eef2f8; border-color: #dbe3ee; }
:root[data-theme="light"] .footer-admin { color: #4a6180; }
:root[data-theme="light"] .app-dialog, :root[data-theme="light"] .command-palette, :root[data-theme="light"] .confirm-dialog { background: #ffffff; border-color: #b9cde1; color: var(--ink); }
:root[data-theme="light"] .app-dialog::backdrop, :root[data-theme="light"] .command-palette::backdrop, :root[data-theme="light"] .confirm-dialog::backdrop { background: rgba(25, 40, 65, .5); }
:root[data-theme="light"] .dialog-tag, :root[data-theme="light"] .panel-icon, :root[data-theme="light"] .dialog-close:hover { color: var(--mint); }
:root[data-theme="light"] .dialog-top p, :root[data-theme="light"] .dialog-description, :root[data-theme="light"] .dialog-warning, :root[data-theme="light"] .details-list dt { color: #647b96; }
:root[data-theme="light"] .details-list { border-color: #e1e8f1; }
:root[data-theme="light"] .details-list dd { color: var(--ink); }
:root[data-theme="light"] .format-badge, :root[data-theme="light"] .copy-button, :root[data-theme="light"] .palette-item-icon { background: #eaf5f9; border-color: #bfd9e3; color: #0a759f; }
:root[data-theme="light"] .copy-button:hover { background: #dbf0e9; border-color: var(--mint); color: var(--mint); }
:root[data-theme="light"] .toast { background: #e9f8f2; border-color: #7ac4ad; color: #0a6f54; }
:root[data-theme="light"] .back-to-float { background: rgba(255, 255, 255, .96); border-color: #a9d4c6; color: var(--mint); box-shadow: 0 12px 34px rgba(34, 55, 90, .18); }
:root[data-theme="light"] .back-to-float:hover { background: #e9f8f2; }
:root[data-theme="light"] .admin-body { background: radial-gradient(ellipse 60% 45% at 88% 8%, rgba(126, 94, 201, .08), transparent 78%), var(--bg); }
:root[data-theme="light"] .login-card-v3, :root[data-theme="light"] .dash-card { background: linear-gradient(155deg, #ffffff, #f6f9fd); border-color: #d5dfec; box-shadow: 0 15px 45px rgba(34, 55, 90, .1); }
:root[data-theme="light"] .login-info-side { background: radial-gradient(ellipse at 100% 0%, rgba(14, 157, 118, .1), transparent 62%), radial-gradient(ellipse at 0% 100%, rgba(113, 88, 207, .1), transparent 62%), #f2f7fd; border-color: #d5dfec; }
:root[data-theme="light"] .login-info-side p, :root[data-theme="light"] .login-features li, :root[data-theme="light"] .card-heading p, :root[data-theme="light"] .steps > div, :root[data-theme="light"] .upload-footnote { color: #5e7590; }
:root[data-theme="light"] .login-shield { border-color: #8ecdb9; background: #e9f8f2; color: var(--mint); }
:root[data-theme="light"] .login-features b { background: #e9f8f2; border-color: #8ecdb9; color: var(--mint); }
:root[data-theme="light"] .login-card input, :root[data-theme="light"] .field input, :root[data-theme="light"] .field select, :root[data-theme="light"] .field textarea { background: #ffffff; border-color: #cdd8e7; color: var(--ink); }
:root[data-theme="light"] .login-card input::placeholder, :root[data-theme="light"] .field input::placeholder, :root[data-theme="light"] .field textarea::placeholder { color: #8b9db1; }
:root[data-theme="light"] .field-label { color: #334a68; }
:root[data-theme="light"] .icon-picker, :root[data-theme="light"] .icon-preview { background: #ffffff; border-color: #cdd8e7; }
:root[data-theme="light"] .icon-picker strong { color: #334a68; }
:root[data-theme="light"] .icon-picker small { color: #7589a1; }
:root[data-theme="light"] .file-drop { border-color: #93cbb9; background: linear-gradient(125deg, rgba(16, 170, 124, .07), rgba(210, 224, 244, .35)); }
:root[data-theme="light"] .file-drop p, :root[data-theme="light"] .file-chip { color: #647b96; }
:root[data-theme="light"] .file-chip { background: #eef3fa; border-color: #cdd8e7; }
:root[data-theme="light"] .progress-track { background: #dce5f0; }
:root[data-theme="light"] .upload-message { background: #e9f8f2; border-color: #7ac4ad; color: #0a6f54; }
:root[data-theme="light"] .upload-message.error { background: #fff0f1; border-color: #e2a1ab; color: #b03b4d; }
:root[data-theme="light"] .upload-steps span { background: #ffffff; border-color: #cdd8e7; color: #7389a3; }
:root[data-theme="light"] .upload-steps span.is-active { background: var(--mint); color: #ffffff; }
:root[data-theme="light"] .upload-steps span.is-done { color: var(--mint); border-color: #7ac4ad; background: #e9f8f2; }
:root[data-theme="light"] .side-stats > div { background: #ffffff; border-color: #d5dfec; }
:root[data-theme="light"] .side-stats span { color: #647b96; }
:root[data-theme="light"] .side-tip { background: #eaf5f4; border-color: #b6d8d2; }
:root[data-theme="light"] .side-tip p { color: #55757a; }
:root[data-theme="light"] .secondary-button, :root[data-theme="light"] .text-button { background: #ffffff; border-color: #cdd8e7; color: #365173; }
:root[data-theme="light"] .text-button { color: #b03b4d; border-color: #e0b3bc; }
:root[data-theme="light"] .manage-list { background: #ffffff; border-color: #d5dfec; }
:root[data-theme="light"] .manage-item { border-color: #e2e8f1; }
:root[data-theme="light"] .manage-item:hover { background: #f5f8fd; }
:root[data-theme="light"] .manage-name span, :root[data-theme="light"] .manage-empty { color: #647b96; }
:root[data-theme="light"] .manage-copy { background: #e9f8f2; border-color: #7ac4ad; color: var(--mint); }
:root[data-theme="light"] .manage-link { background: #eaf4fb; border-color: #a9c9e0; color: #0a759f; }
:root[data-theme="light"] .delete-button { background: #fff0f1; border-color: #e0b3bc; color: #b03b4d; }
:root[data-theme="light"] .confirm-icon { background: #fff0f1; border-color: #e0b3bc; color: #b03b4d; }
:root[data-theme="light"] .confirm-dialog p { color: #647b96; }
:root[data-theme="light"] .card-numeric { background: #e9f8f2; border-color: #7ac4ad; color: var(--mint); }
:root[data-theme="light"] .secure-indicator { border-color: #7ac4ad; background: #e9f8f2; color: var(--mint); }
:root[data-theme="light"] .steps b { background: #e9f8f2; border-color: #7ac4ad; color: var(--mint); }
:root[data-theme="light"] .help-link { border-color: #e1e8f1; color: var(--mint); }
:root[data-theme="light"] .sr-only { clip: rect(0, 0, 0, 0); }
:root[data-theme="light"] .dialog-close { color: #647b96; }
:root[data-theme="light"] .float-violet { background: rgba(113, 88, 207, .1); border-color: rgba(113, 88, 207, .3); color: var(--violet); }
:root[data-theme="light"] .skeleton-card { background: linear-gradient(100deg, #e8eef6 20%, #f7faff 50%, #e8eef6 80%); background-size: 200% 100%; }
:root[data-theme="light"] .progress-head { color: #0a6f54; }
:root[data-theme="light"] .empty-admin:hover { background: #d8f1e7; }
:root[data-theme="light"] .delete-button:hover { background: #ffe0e3; }
:root[data-theme="light"] .palette-foot kbd { background: #f2f6fb; color: #4a6180; border-color: #cdd8e7; }

/* Compact responsive additions */
@media (max-width: 560px) {
  .palette-foot span:last-child { display: none; }
  .header-actions { gap: 6px; }
  .header-icon-button { width: 40px; height: 40px; }
  .theme-menu { right: -6px; }
  .back-to-float { right: 14px; bottom: 14px; width: 42px; height: 42px; }
  .confirm-dialog { padding: 22px 18px; }
}

