:root {
  color-scheme: dark;
  --bg: #0b1118;
  --sidebar: #0d141d;
  --surface: #111a24;
  --surface-hi: #162230;
  --surface-soft: #0f1721;
  --line: rgba(165, 187, 211, .12);
  --line-hi: rgba(165, 187, 211, .2);
  --text: #e8f0f8;
  --muted: #91a1b4;
  --dim: #627389;
  --accent: #73adff;
  --accent-rgb: 115, 173, 255;
  --accent-2: #3bd2c2;
  --orange: #e5a56f;
  --red: #ef7888;
  --sidebar-w: 252px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(800px 510px at 75% -220px, rgba(var(--accent-rgb), .12), transparent 70%),
    radial-gradient(600px 500px at 105% 62%, rgba(59, 210, 194, .045), transparent 68%),
    var(--bg);
}
body, button, input, select, textarea { font-family: inherit; }
button, select { color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
::selection { background: rgba(var(--accent-rgb), .33); color: white; }

.auth-screen { min-height: 100vh; display: grid; place-items: center; padding: 28px 18px; background: radial-gradient(500px 370px at 50% 46%, rgba(var(--accent-rgb), .11), transparent 75%); }
.auth-card { width: min(460px, 100%); border: 1px solid var(--line-hi); border-radius: 17px; padding: 29px; background: linear-gradient(150deg, rgba(20,30,42,.98), rgba(13,20,29,.99)); box-shadow: 0 25px 85px rgba(0,0,0,.4); }
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-auth { margin-bottom: 32px; }
.brand-icon { width: 40px; height: 40px; display: grid; flex: 0 0 auto; place-items: center; border: 1px solid rgba(var(--accent-rgb), .32); border-radius: 12px; background: linear-gradient(145deg, rgba(var(--accent-rgb), .23), rgba(var(--accent-rgb), .07)); color: var(--accent); box-shadow: inset 0 1px 0 rgba(255,255,255,.09), 0 8px 26px rgba(var(--accent-rgb), .08); }
.brand-icon svg { width: 21px; height: 21px; }
.brand-title { display: block; overflow: hidden; color: #eef4fa; font-size: 13px; font-weight: 750; letter-spacing: -.15px; text-overflow: ellipsis; white-space: nowrap; }
.brand-caption { display: block; margin-top: 4px; color: var(--dim); font-size: 9px; font-weight: 700; letter-spacing: 1.25px; text-transform: uppercase; }
.auth-mark { display: inline-flex; align-items: center; gap: 8px; border: 1px solid rgba(var(--accent-rgb),.2); border-radius: 5px; padding: 5px 7px; background: rgba(var(--accent-rgb),.055); color: #a7c7f1; font-size: 8px; font-weight: 800; letter-spacing: 1.1px; }
.auth-mark-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px rgba(var(--accent-rgb),.7); }
.auth-card h1 { margin: 15px 0 8px; color: #f0f4f9; font-size: 36px; font-weight: 780; letter-spacing: -1.5px; line-height: 1.05; }
.auth-card h1 span { color: var(--accent); }
.auth-copy { margin: 0 0 20px; color: #92a2b6; font-size: 11px; line-height: 1.7; }
.discord-button { min-height: 43px; display: flex; align-items: center; justify-content: center; gap: 9px; border: 1px solid rgba(133,160,255,.35); border-radius: 8px; padding: 0 14px; background: linear-gradient(110deg, #5865f2, #6976ff); color: white; box-shadow: 0 8px 24px rgba(75,90,220,.2); font-size: 11px; font-weight: 750; transition: filter .15s ease, transform .15s ease; }
.discord-button.app-login { min-height: 31px; padding: 0 10px; font-size: 9px; }
.discord-button:hover { filter: brightness(1.08); transform: translateY(-1px); }
.discord-button svg { width: 17px; height: 17px; }
.discord-button.disabled { pointer-events: none; filter: grayscale(.65); opacity: .48; }
.auth-error, .auth-setup { margin-top: 14px; border: 1px solid rgba(239,120,136,.23); border-radius: 8px; padding: 10px 11px; background: rgba(239,120,136,.07); color: #eaa0aa; font-size: 9px; line-height: 1.55; }
.auth-setup { display: grid; gap: 4px; border-color: rgba(229,165,111,.2); background: rgba(229,165,111,.055); color: #c4a17d; }
.auth-setup strong { color: #ecc08f; font-size: 9px; }
.auth-foot { display: flex; align-items: center; gap: 7px; margin-top: 19px; border-top: 1px solid var(--line); padding-top: 14px; color: #738399; font-size: 8px; }
.lock-icon { color: var(--accent-2); font-size: 8px; }

.sidebar { width: var(--sidebar-w); position: fixed; inset: 0 auto 0 0; z-index: 20; display: flex; flex-direction: column; padding: 22px 14px 15px; border-right: 1px solid var(--line); background: rgba(13,20,29,.96); backdrop-filter: blur(18px); }
.sidebar > .brand { padding: 0 9px 22px; }
.side-label { margin: 5px 10px 8px; color: #64758a; font-size: 9px; font-weight: 750; letter-spacing: 1.35px; text-transform: uppercase; }
.nav-stack { display: grid; gap: 3px; }
.nav-link { width: 100%; min-height: 40px; display: flex; align-items: center; gap: 11px; border: 1px solid transparent; border-radius: 8px; padding: 0 10px; background: transparent; color: #9dacbf; text-align: left; font-size: 11px; transition: background .16s ease, border-color .16s ease, color .16s ease; }
.nav-link svg { width: 16px; height: 16px; color: #7e8ea3; }
.nav-link:hover { background: rgba(255,255,255,.035); color: #e5eef8; }
.nav-link.active { border-color: rgba(var(--accent-rgb),.14); background: linear-gradient(90deg, rgba(var(--accent-rgb),.15), rgba(var(--accent-rgb),.045)); box-shadow: inset 2px 0 var(--accent); color: #e6f0ff; }
.nav-link.active svg { color: var(--accent); }
.nav-count { margin-left: auto; color: #74869c; font-size: 9px; font-variant-numeric: tabular-nums; }
.side-separator { height: 1px; margin: 17px 9px 16px; background: var(--line); }
.side-spacer { flex: 1; }
.panel-card { display: block; width: 100%; margin: 0 0 11px; border: 1px solid var(--line); border-radius: 10px; padding: 11px 11px 10px; background: linear-gradient(145deg, rgba(23,34,47,.96), rgba(16,24,34,.9)); text-align: left; transition: border-color .15s ease, background .15s ease; }
.panel-card:hover { border-color: rgba(var(--accent-rgb),.34); background: rgba(27,41,57,.95); }
.panel-card-head { display: flex; align-items: center; gap: 8px; color: #d3deec; font-size: 10px; font-weight: 700; }
.panel-icon { width: 23px; height: 23px; display: grid; place-items: center; border: 1px solid rgba(229,165,111,.19); border-radius: 7px; color: var(--orange); background: rgba(229,165,111,.08); }
.panel-icon svg { width: 13px; height: 13px; }
.panel-status { display: flex; align-items: center; gap: 6px; margin: 9px 0 0 31px; color: #7d8da2; font-size: 9px; }
.status-dot { width: 5px; height: 5px; flex: 0 0 auto; border-radius: 50%; background: #d0996a; }
.panel-status.configured .status-dot { background: var(--accent-2); box-shadow: 0 0 9px rgba(59,210,194,.35); }
.profile-mini { display: flex; align-items: center; gap: 9px; border-top: 1px solid var(--line); padding: 10px 8px 0; }
.profile-copy { min-width: 0; }
.avatar { width: 29px; height: 29px; display: grid; flex: 0 0 auto; place-items: center; border: 1px solid rgba(var(--accent-rgb),.25); border-radius: 9px; background: rgba(var(--accent-rgb),.12); color: #c4dcff; font-size: 9px; font-weight: 800; }
.avatar.small { width: 27px; height: 27px; border-radius: 8px; }
.profile-mini-name { display: block; overflow: hidden; color: #b6c3d3; font-size: 10px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.profile-mini-caption { display: block; margin-top: 3px; color: var(--dim); font-size: 8px; }
.icon-button { width: 32px; height: 32px; display: grid; flex: 0 0 auto; place-items: center; border: 1px solid var(--line); border-radius: 8px; background: rgba(255,255,255,.02); color: #a7b6c8; transition: border-color .15s ease, color .15s ease, background .15s ease; }
.icon-button:hover { border-color: var(--line-hi); background: rgba(255,255,255,.05); color: white; }
.icon-button svg { width: 15px; height: 15px; }
.icon-button.mini { width: 27px; height: 27px; margin-left: auto; }

.main { min-height: 100vh; margin-left: var(--sidebar-w); }
.topbar { height: 61px; position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 0 clamp(20px,3vw,44px); border-bottom: 1px solid var(--line); background: rgba(11,17,24,.82); backdrop-filter: blur(16px); }
.top-left, .top-right { display: flex; align-items: center; gap: 11px; }
.crumb { color: #78889d; font-size: 10px; }
.crumb strong { color: #d1dce9; font-weight: 650; }
.crumb-sep { margin: 0 7px; color: #46566a; }
.secure-tag { display: inline-flex; align-items: center; gap: 7px; color: #8293a8; font-size: 9px; white-space: nowrap; }
.secure-tag .status-dot { background: #68d6a5; box-shadow: 0 0 8px rgba(104,214,165,.35); }
.steam-connect { min-height: 31px; display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line-hi); border-radius: 7px; padding: 0 9px; background: rgba(255,255,255,.025); color: #c9d6e5; font-size: 9px; font-weight: 700; transition: .15s ease; }
.steam-connect:hover:not(:disabled) { border-color: rgba(var(--accent-rgb),.35); background: rgba(var(--accent-rgb),.07); color: white; }
.steam-connect.connected { border-color: rgba(59,210,194,.23); color: #7adbcf; }
.steam-connect:disabled { cursor: not-allowed; opacity: .58; }
.steam-icon { width: 17px; height: 17px; display: grid; place-items: center; border: 1px solid rgba(173,190,209,.2); border-radius: 50%; color: #c4d2e2; font-size: 9px; font-weight: 850; }
.steam-connect.connected .steam-icon { border-color: rgba(59,210,194,.35); color: var(--accent-2); }
.discord-user { display: flex; align-items: center; gap: 7px; border-left: 1px solid var(--line); padding-left: 11px; }
.discord-user-name { max-width: 125px; overflow: hidden; color: #b8c5d5; font-size: 9px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.mobile-menu { display: none; }
.content { width: min(1470px,100%); margin: 0 auto; padding: 27px clamp(20px,3vw,44px) 40px; }
.welcome-row { display: flex; align-items: end; justify-content: space-between; gap: 22px; margin-bottom: 17px; }
.micro-label { display: flex; align-items: center; gap: 8px; color: #8798ad; font-size: 9px; font-weight: 750; letter-spacing: 1.35px; text-transform: uppercase; }
.micro-bar { width: 15px; height: 2px; border-radius: 2px; background: var(--accent); box-shadow: 0 0 9px rgba(var(--accent-rgb),.42); }
.welcome-row h1 { margin: 9px 0 5px; color: #f0f4f9; font-size: clamp(25px,2.8vw,36px); font-weight: 770; letter-spacing: -1.2px; line-height: 1.12; }
.welcome-row p { max-width: 640px; margin: 0; color: #8d9db1; font-size: 11px; line-height: 1.65; }
.welcome-actions { flex: 0 0 auto; display: flex; gap: 8px; }
.btn-primary, .btn-secondary, .btn-danger { min-height: 35px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid transparent; border-radius: 7px; padding: 0 11px; font-size: 10px; font-weight: 700; transition: transform .14s ease, filter .14s ease, border-color .14s ease, background .14s ease; }
.btn-primary { border-color: rgba(var(--accent-rgb),.42); background: linear-gradient(115deg,rgba(var(--accent-rgb),.98),rgba(var(--accent-rgb),.78)); color: #101923; box-shadow: 0 4px 16px rgba(var(--accent-rgb),.14); }
.btn-primary:hover { transform: translateY(-1px); filter: brightness(1.07); }
.btn-secondary { border-color: var(--line-hi); background: rgba(255,255,255,.025); color: #c2cede; }
.btn-secondary:hover { border-color: rgba(var(--accent-rgb),.35); background: rgba(var(--accent-rgb),.08); color: #edf5ff; }
.btn-danger { border-color: rgba(239,120,136,.2); background: rgba(239,120,136,.07); color: #f09aa6; }
.btn-danger:hover { background: rgba(239,120,136,.14); }
.btn-primary svg, .btn-secondary svg, .btn-danger svg { width: 14px; height: 14px; }
.focus-card { min-height: 185px; position: relative; display: grid; grid-template-columns: minmax(0,1fr) minmax(260px,37%); overflow: hidden; margin-bottom: 15px; border: 1px solid rgba(var(--accent-rgb),.18); border-radius: 13px; background: radial-gradient(ellipse at 82% 18%,rgba(var(--accent-rgb),.16),transparent 44%),linear-gradient(110deg,#121c28,#101721 64%,#121a27); box-shadow: 0 11px 33px rgba(0,0,0,.15); }
.focus-copy { position: relative; z-index: 2; align-self: center; padding: 21px 24px; }
.focus-kicker { display: flex; align-items: center; gap: 7px; color: var(--accent); font-size: 8px; font-weight: 800; letter-spacing: 1.3px; text-transform: uppercase; }
.focus-kicker .status-dot { background: var(--accent-2); box-shadow: 0 0 8px rgba(59,210,194,.5); }
.focus-title { margin: 11px 0 4px; color: #edf3f9; font-size: 20px; font-weight: 740; letter-spacing: -.55px; }
.focus-sub { color: #91a2b7; font-size: 10px; line-height: 1.55; }
.focus-actions { display: flex; gap: 8px; margin-top: 14px; }
.focus-art { min-height: 185px; position: relative; overflow: hidden; }
.focus-art::before { content: ""; position: absolute; z-index: 1; inset: 0; background: linear-gradient(90deg,#111a25 0%,rgba(17,26,37,.28) 35%,rgba(11,17,24,.08)),linear-gradient(0deg,rgba(11,17,24,.48),transparent 58%); }
.focus-art img { width: 100%; height: 100%; position: absolute; inset: 0; object-fit: cover; opacity: .8; }
.focus-art.empty-art { display: grid; place-items: center; }
.focus-art.empty-art::after { content: "SELECT GAME"; position: relative; z-index: 2; border: 1px solid rgba(var(--accent-rgb),.2); border-radius: 6px; padding: 6px 8px; color: rgba(199,220,247,.58); font-size: 8px; font-weight: 750; letter-spacing: 1.2px; }
.focus-art.empty-art::before { background: repeating-linear-gradient(135deg,transparent,transparent 12px,rgba(154,183,217,.035) 12px,rgba(154,183,217,.035) 13px); }
.stats { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; margin: 0 0 28px; }
.stat-card { min-height: 67px; display: flex; align-items: center; gap: 11px; border: 1px solid var(--line); border-radius: 10px; padding: 11px 13px; background: linear-gradient(145deg,rgba(18,27,38,.96),rgba(15,23,33,.88)); }
.stat-icon { width: 30px; height: 30px; display: grid; flex: 0 0 auto; place-items: center; border: 1px solid rgba(var(--accent-rgb),.14); border-radius: 8px; background: rgba(var(--accent-rgb),.08); color: var(--accent); }
.stat-icon.teal { border-color: rgba(59,210,194,.14); background: rgba(59,210,194,.07); color: #73dace; }
.stat-icon.orange { border-color: rgba(229,165,111,.16); background: rgba(229,165,111,.07); color: #e6ad7c; }
.stat-icon.purple { border-color: rgba(167,142,255,.16); background: rgba(167,142,255,.08); color: #b4a1f2; }
.stat-icon svg { width: 15px; height: 15px; }
.stat-label { display: block; color: #8292a7; font-size: 9px; }
.stat-value { display: block; margin-top: 3px; color: #e2eaf4; font-size: 18px; font-weight: 750; letter-spacing: -.3px; font-variant-numeric: tabular-nums; }
.library-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin: 0 0 12px; }
.library-kicker { color: #718198; font-size: 8px; font-weight: 750; letter-spacing: 1.3px; text-transform: uppercase; }
.library-head h2 { margin: 4px 0 0; color: #eaf0f8; font-size: 19px; font-weight: 720; letter-spacing: -.45px; }
.result-count { color: #8190a3; font-size: 9px; }
.result-count strong { color: #cfdae8; font-weight: 700; }
.toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; border: 1px solid var(--line); border-radius: 10px; padding: 9px; background: rgba(16,24,34,.84); }
.search-wrap { min-width: 220px; position: relative; flex: 1 1 280px; }
.search-wrap svg { width: 14px; height: 14px; position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: #78899e; pointer-events: none; }
.search-wrap input, .toolbar-select { height: 34px; border: 1px solid rgba(165,187,211,.13); border-radius: 7px; outline: 0; background: #0c131c; color: #cfdae7; font-size: 9px; transition: border-color .15s ease,box-shadow .15s ease; }
.search-wrap input { width: 100%; padding: 0 10px 0 33px; }
.search-wrap input::placeholder { color: #69798d; }
.search-wrap input:focus, .toolbar-select:focus { border-color: rgba(var(--accent-rgb),.5); box-shadow: 0 0 0 3px rgba(var(--accent-rgb),.1); }
.toolbar-select { min-width: 140px; padding: 0 10px; cursor: pointer; }
.genre-row { display: flex; gap: 6px; overflow-x: auto; padding: 11px 0 12px; scrollbar-width: thin; scrollbar-color: #29394c transparent; }
.genre-chip { flex: 0 0 auto; min-height: 25px; border: 1px solid var(--line); border-radius: 6px; padding: 0 8px; background: rgba(16,24,34,.7); color: #aab8c9; font-size: 9px; cursor: pointer; }
.genre-chip:hover { border-color: var(--line-hi); color: #e8eff8; }
.genre-chip.active { border-color: rgba(var(--accent-rgb),.35); background: rgba(var(--accent-rgb),.12); color: #bdd9ff; }
.genre-count { margin-left: 6px; color: #74869c; font-size: 8px; }
.tab-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; border-bottom: 1px solid var(--line); padding: 0 0 10px; }
.tab-title { color: #d5e0ec; font-size: 10px; font-weight: 650; }
.tab-caption { color: #718197; font-size: 9px; }
.game-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 11px; padding: 14px 0 23px; }
.game-card { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: linear-gradient(145deg,rgba(19,28,39,.98),rgba(15,22,31,.99)); box-shadow: 0 8px 23px rgba(0,0,0,.12); transition: transform .16s ease,border-color .16s ease,box-shadow .16s ease; }
.game-card:hover { transform: translateY(-2px); border-color: rgba(var(--accent-rgb),.28); box-shadow: 0 13px 27px rgba(0,0,0,.22); }
.cover { aspect-ratio: 460 / 215; position: relative; overflow: hidden; background: radial-gradient(ellipse at 77% 22%,rgba(var(--accent-rgb),.3),transparent 42%),linear-gradient(135deg,#263547,#101923 70%,#193536); }
.cover::after { content: ""; position: absolute; inset: 35% 0 0; background: linear-gradient(0deg,rgba(8,13,19,.68),transparent); pointer-events: none; }
.cover img { width: 100%; height: 100%; position: absolute; inset: 0; object-fit: cover; transition: transform .4s ease; }
.game-card:hover .cover img { transform: scale(1.035); }
.cover-fallback { width: 100%; height: 100%; display: grid; place-items: center; color: rgba(211,231,250,.55); font-size: 41px; font-weight: 800; letter-spacing: -2px; }
.cover-chip { position: absolute; z-index: 2; top: 8px; left: 8px; min-height: 19px; display: inline-flex; align-items: center; gap: 5px; border: 1px solid rgba(230,239,250,.17); border-radius: 5px; padding: 0 6px; background: rgba(9,14,20,.78); color: #dbe8f8; font-size: 8px; font-weight: 700; backdrop-filter: blur(8px); }
.cover-chip .status-dot { background: var(--accent-2); }
.card-tools { position: absolute; z-index: 3; top: 7px; right: 7px; display: flex; gap: 5px; }
.mini-action { width: 27px; height: 27px; display: grid; place-items: center; border: 1px solid rgba(230,239,250,.18); border-radius: 6px; background: rgba(9,14,20,.75); color: #bdc9d8; backdrop-filter: blur(8px); }
.mini-action:hover { border-color: rgba(230,239,250,.4); color: white; }
.mini-action svg { width: 13px; height: 13px; }
.mini-action.favorite.on { border-color: rgba(229,165,111,.35); color: #f0b37c; }
.mini-action.done.on { border-color: rgba(59,210,194,.3); color: #65d3c5; }
.game-body { min-height: 145px; display: flex; flex-direction: column; padding: 11px 12px 12px; }
.card-meta { display: flex; align-items: center; gap: 6px; min-height: 15px; color: #8696aa; font-size: 8px; }
.platform-dot { width: 5px; height: 5px; border-radius: 50%; background: #8497ae; }
.meta-sep { color: #506177; }
.game-title { margin: 7px 0 0; overflow: hidden; color: #e8eef6; font-size: 13px; font-weight: 730; line-height: 1.32; text-overflow: ellipsis; white-space: nowrap; }
.game-note { min-height: 14px; margin: 4px 0 0; overflow: hidden; color: #8090a4; font-size: 9px; line-height: 1.45; text-overflow: ellipsis; white-space: nowrap; }
.tag-row { display: flex; flex-wrap: wrap; gap: 4px; margin-top: auto; padding-top: 8px; }
.tag { min-height: 17px; display: inline-flex; align-items: center; border: 1px solid rgba(var(--accent-rgb),.15); border-radius: 4px; padding: 0 5px; background: rgba(var(--accent-rgb),.07); color: #a9c5e7; font-size: 8px; }
.tag--backlog { border-color: rgba(229,165,111,.2); background: rgba(229,165,111,.08); color: #e3b586; }
.tag--played { border-color: rgba(59,210,194,.17); background: rgba(59,210,194,.07); color: #72d5c9; }
.card-footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; padding-top: 8px; border-top: 1px solid rgba(165,187,211,.08); }
.card-link { display: inline-flex; align-items: center; gap: 5px; color: #a8caff; font-size: 8px; font-weight: 700; }
.card-link:hover { color: white; }
.card-link.disabled { color: #627287; cursor: default; }
.card-link svg { width: 12px; height: 12px; }
.edit-link { border: 0; padding: 3px 0 3px 6px; background: none; color: #73849a; font-size: 8px; }
.edit-link:hover { color: #d6e2f1; }
.empty-state { padding: 43px 20px 46px; border: 1px dashed var(--line-hi); border-radius: 10px; text-align: center; color: #91a1b4; }
.empty-icon { width: 40px; height: 40px; display: grid; place-items: center; margin: 0 auto 11px; border: 1px solid var(--line); border-radius: 12px; color: var(--accent); background: rgba(var(--accent-rgb),.07); }
.empty-icon svg { width: 19px; height: 19px; }
.empty-state strong { display: block; margin-bottom: 6px; color: #d6e1ef; font-size: 12px; }
.empty-state p { margin: 0 auto 13px; font-size: 9px; line-height: 1.6; }
.footer-note { display: flex; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); padding-top: 13px; color: #64758a; font-size: 8px; }

.overlay { position: fixed; inset: 0; z-index: 40; display: none; align-items: center; justify-content: center; overflow: auto; padding: 20px; background: rgba(2,7,12,.72); backdrop-filter: blur(8px); }
.overlay.open { display: flex; }
.modal { width: min(560px,100%); max-height: min(90vh,850px); overflow: auto; border: 1px solid var(--line-hi); border-radius: 13px; background: #121b26; box-shadow: 0 24px 80px rgba(0,0,0,.52); animation: modal-in .16s ease-out; }
@keyframes modal-in { from { opacity: .55; transform: translateY(6px) scale(.99); } to { opacity: 1; transform: none; } }
.modal-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line); background: rgba(18,27,38,.97); backdrop-filter: blur(10px); }
.modal-kicker { color: var(--accent); font-size: 8px; font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase; }
.modal-head h2 { margin: 4px 0 0; color: #e8eef6; font-size: 16px; font-weight: 720; letter-spacing: -.3px; }
.modal-content { padding: 16px 18px 18px; }
.entry-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 13px; }
.entry-tab { min-height: 31px; border: 1px solid var(--line); border-radius: 6px; background: rgba(255,255,255,.02); color: #9caec2; font-size: 9px; font-weight: 700; }
.entry-tab.active { border-color: rgba(var(--accent-rgb),.32); background: rgba(var(--accent-rgb),.1); color: #c8dfff; }
.field { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.field label { color: #aab8c8; font-size: 9px; font-weight: 650; }
.field-hint { color: #74859a; font-size: 8px; line-height: 1.45; }
.field input, .field select, .field textarea { width: 100%; min-height: 34px; border: 1px solid rgba(165,187,211,.16); border-radius: 7px; outline: 0; padding: 8px 9px; background: #0b131c; color: #dbe5f1; font-size: 10px; transition: border-color .15s ease,box-shadow .15s ease; }
.field input::placeholder, .field textarea::placeholder { color: #65768c; }
.field textarea { min-height: 55px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: rgba(var(--accent-rgb),.55); box-shadow: 0 0 0 3px rgba(var(--accent-rgb),.1); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field.full { grid-column: 1 / -1; }
.common-fields { margin-top: 13px; }
.search-entry { position: relative; }
.search-entry input { padding-right: 32px; }
.search-spinner { width: 13px; height: 13px; position: absolute; top: 10px; right: 10px; border: 2px solid rgba(var(--accent-rgb),.2); border-top-color: var(--accent); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.steam-results { display: grid; gap: 5px; max-height: 225px; overflow: auto; margin: 7px 0 0; border: 1px solid var(--line); border-radius: 7px; padding: 5px; background: #0d151e; }
.steam-result { width: 100%; display: flex; align-items: center; gap: 9px; border: 1px solid transparent; border-radius: 5px; padding: 5px; background: transparent; text-align: left; }
.steam-result:hover, .steam-result:focus-visible { border-color: rgba(var(--accent-rgb),.25); background: rgba(var(--accent-rgb),.07); outline: none; }
.steam-result img { width: 64px; height: 30px; flex: 0 0 auto; border-radius: 3px; object-fit: cover; background: #182332; }
.steam-result-copy { min-width: 0; }
.steam-result-name { display: block; overflow: hidden; color: #dce7f3; font-size: 9px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.steam-result-sub { display: block; margin-top: 3px; color: #71849a; font-size: 8px; }
.steam-no-results { padding: 10px; color: #92a2b6; font-size: 9px; line-height: 1.55; }
.steam-no-results button { margin-top: 6px; border: 0; padding: 0; background: none; color: #a9caff; font-size: 9px; font-weight: 700; }
.selected-steam { display: flex; align-items: center; gap: 10px; margin-top: 8px; border: 1px solid rgba(59,210,194,.22); border-radius: 7px; padding: 8px; background: rgba(59,210,194,.05); }
.selected-steam img { width: 78px; height: 37px; border-radius: 4px; object-fit: cover; background: #162230; }
.selected-steam-name { color: #dcebe9; font-size: 9px; font-weight: 700; }
.selected-steam-id { margin-top: 3px; color: #80aea9; font-size: 8px; }
.selected-remove { margin-left: auto; border: 0; background: none; color: #829a9b; font-size: 8px; }
.selected-remove:hover { color: #f09aa6; }
.check-row { display: flex; flex-wrap: wrap; gap: 7px; }
.check-pill { display: inline-flex; align-items: center; gap: 6px; min-height: 28px; border: 1px solid var(--line); border-radius: 6px; padding: 0 8px; background: rgba(255,255,255,.02); color: #9cacc0; font-size: 8px; }
.check-pill input { width: 12px; height: 12px; margin: 0; accent-color: var(--accent); }
.form-error { min-height: 13px; margin-top: 6px; color: #ef929e; font-size: 8px; }
.modal-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 14px; padding-top: 13px; border-top: 1px solid var(--line); }
.modal-actions-right { display: flex; gap: 7px; margin-left: auto; }
.backup-section { margin-top: 15px; padding-top: 13px; border-top: 1px solid var(--line); }
.settings-title { margin: 0 0 6px; color: #dbe4f0; font-size: 10px; font-weight: 750; }
.backup-section p { margin: 0 0 9px; color: #8192a7; font-size: 8px; line-height: 1.55; }
.backup-row { display: flex; gap: 7px; }
.focus-list { display: grid; gap: 7px; }
.focus-option { width: 100%; display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 8px; padding: 9px; background: rgba(255,255,255,.02); text-align: left; }
.focus-option:hover { border-color: rgba(var(--accent-rgb),.35); background: rgba(var(--accent-rgb),.06); }
.focus-option-art { width: 55px; height: 32px; display: grid; flex: 0 0 auto; place-items: center; overflow: hidden; border-radius: 5px; background: linear-gradient(135deg,#203246,#13202a); color: #b7cfea; font-size: 13px; font-weight: 750; }
.focus-option-art img { width: 100%; height: 100%; object-fit: cover; }
.focus-option-copy { min-width: 0; }
.focus-option-title { display: block; color: #e0e9f4; font-size: 10px; font-weight: 680; }
.focus-option-sub { display: block; margin-top: 3px; color: #8495aa; font-size: 8px; }
.focus-option-current { margin-left: auto; color: var(--accent-2); font-size: 8px; font-weight: 700; }
.toast { position: fixed; right: 20px; bottom: 20px; z-index: 60; max-width: calc(100vw - 40px); border: 1px solid rgba(var(--accent-rgb),.2); border-radius: 8px; padding: 10px 13px; background: rgba(22,33,47,.97); color: #dce8f6; box-shadow: 0 10px 28px rgba(0,0,0,.3); font-size: 9px; opacity: 0; transform: translateY(7px); pointer-events: none; transition: .18s ease; }
.toast.visible { opacity: 1; transform: translateY(0); }
.confirm-box { width: min(390px,100%); border: 1px solid var(--line-hi); border-radius: 12px; padding: 18px; background: linear-gradient(150deg,#172331,#111a24); box-shadow: 0 22px 65px rgba(0,0,0,.45); }
.confirm-box h2 { margin: 0; color: #e8f0f8; font-size: 15px; letter-spacing: -.2px; }
.confirm-box p { margin: 9px 0 17px; color: #9aaabd; font-size: 10px; line-height: 1.6; }
.confirm-actions { display: flex; justify-content: flex-end; gap: 8px; padding-top: 12px; border-top: 1px solid var(--line); }
.btn-danger { min-height: 32px; border: 1px solid rgba(239,120,136,.24); border-radius: 7px; padding: 0 11px; background: rgba(239,120,136,.13); color: #f0a2ad; font-size: 9px; font-weight: 700; }
.btn-danger:hover { border-color: rgba(239,120,136,.42); background: rgba(239,120,136,.2); }

@media (max-width: 1120px) {
  :root { --sidebar-w: 220px; }
  .game-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .stats { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 720px) {
  :root { --sidebar-w: 248px; }
  .sidebar { transform: translateX(-101%); transition: transform .2s ease; box-shadow: 20px 0 45px rgba(0,0,0,.38); }
  .sidebar.open { transform: translateX(0); }
  .main { margin-left: 0; }
  .mobile-menu { width: 31px; height: 31px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 7px; background: rgba(255,255,255,.02); color: #bdc9d8; }
  .mobile-menu svg { width: 15px; height: 15px; }
  .topbar { height: 55px; padding: 0 15px; }
  .secure-tag { display: none; }
  .content { padding: 20px 15px 32px; }
  .welcome-row { align-items: start; flex-direction: column; }
  .welcome-actions { width: 100%; }
  .focus-card { grid-template-columns: 1fr; min-height: 176px; }
  .focus-copy { max-width: 75%; padding: 19px; }
  .focus-art { position: absolute; inset: 0 0 0 30%; opacity: .53; }
  .focus-art::before { background: linear-gradient(90deg,#111a25,rgba(17,26,37,.4) 57%,rgba(11,17,24,.2)); }
  .stats { gap: 7px; }
  .stat-card { min-height: 63px; gap: 8px; padding: 9px; }
  .stat-icon { width: 27px; height: 27px; }
  .stat-label { font-size: 8px; }
  .stat-value { font-size: 16px; }
}
@media (max-width: 500px) {
  .discord-user-name { display: none; }
  .discord-user { padding-left: 7px; }
  .steam-connect { padding: 0 6px; font-size: 8px; }
  .welcome-row h1 { font-size: 29px; }
  .welcome-actions .btn-secondary { padding: 0 9px; }
  .stats { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .stat-card:last-child { grid-column: 1 / -1; }
  .toolbar { padding: 7px; gap: 6px; }
  .search-wrap { flex-basis: 100%; }
  .toolbar-select { min-width: 0; flex: 1; }
  .game-grid { grid-template-columns: 1fr; }
  .game-body { min-height: 139px; }
  .tab-caption { display: none; }
  .form-grid { grid-template-columns: 1fr; }
  .field.full { grid-column: auto; }
  .footer-note { flex-direction: column; }
  .auth-card { padding: 22px; }
  .auth-card h1 { font-size: 31px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
