:root {
  color-scheme: light;
  --ink: #101828;
  --muted: #667085;
  --blue: #0068e8;
  --blue-bright: #008cff;
  --blue-dark: #003791;
  --surface: #ffffff;
  --soft: #f4f7fb;
  --line: #e4e9f1;
  --good: #11875d;
  --bad: #d92d4c;
  --missing: #ad6800;
  --radius: 2px;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: #fff; }
body { margin: 0; min-height: 100vh; color: var(--ink); overflow-x: hidden; background: #fff; }
button, input { font: inherit; }
button { border: 0; cursor: pointer; }
button:disabled { opacity: .38; cursor: not-allowed; }

.topbar {
  position: relative;
  z-index: 20;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(24px, 5vw, 82px);
  border-bottom: 1px solid #eceff4;
  background: rgba(255,255,255,.96);
  box-shadow: 0 2px 12px rgba(16, 24, 40, .04);
}
.brand { color: #111827; font-size: 20px; font-weight: 700; letter-spacing: -.035em; text-decoration: none; }
.header-download { display: inline-flex; align-items: center; gap: 10px; min-height: 38px; padding: 0 17px; color: #fff; border-radius: 2px; background: var(--blue); font-size: 12px; font-weight: 650; text-decoration: none; transition: .18s ease; }
.header-download:hover { background: #0058c9; transform: translateY(-1px); box-shadow: 0 8px 20px rgba(0, 93, 212, .2); }
.header-download span { font-size: 15px; }

main { width: 100%; }
.hero {
  position: relative;
  min-height: 680px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(440px, .82fr);
  align-items: center;
  gap: clamp(55px, 7vw, 120px);
  padding: 74px max(6vw, calc((100vw - 1420px) / 2)) 82px;
  overflow: hidden;
  background: linear-gradient(110deg, #fff 0%, #fff 62%, #f6faff 100%);
}
.hero::before { content: ""; position: absolute; width: 360px; height: 360px; right: -210px; top: -210px; border: 65px solid rgba(0,104,232,.04); border-radius: 50%; }
.hero::after { display: none; }
.hero-copy, .game-showcase { position: relative; z-index: 2; }
.eyebrow { color: var(--blue); font-size: 10px; font-weight: 750; letter-spacing: .25em; margin: 0 0 18px; }
h1 { margin: 0; max-width: 760px; color: #111827; font-size: clamp(46px, 5.6vw, 82px); line-height: .99; letter-spacing: -.055em; font-weight: 300; }
h1 em { color: var(--blue); font-style: normal; font-weight: 650; }
.intro { max-width: 650px; margin: 28px 0 0; color: #596579; line-height: 1.7; font-size: 15px; }
code { color: #005ac7; background: #eaf3ff; padding: 2px 5px; }
.browse-center { position: relative; z-index: 3; width: 100%; display: grid; grid-template-columns: 1fr; gap: 18px; padding: 30px; border: 1px solid #dce4ef; border-top: 4px solid var(--blue); background: #fff; box-shadow: 0 24px 65px rgba(24, 53, 88, .14); }
.browse-heading { text-align: left; }
.browse-heading p { margin: 0 0 5px; color: var(--blue); font-size: 8px; font-weight: 750; letter-spacing: .18em; }
.browse-heading h2 { margin: 0; color: #15243a; font-size: 25px; font-weight: 400; letter-spacing: -.025em; }
.browse-heading > span { display: block; margin-top: 9px; color: #6c798b; font-size: 11px; line-height: 1.55; }
.browse-heading > span b { color: #27415f; }
.hero-actions { display: flex; align-items: stretch; justify-content: center; gap: 8px; margin: 0; }
.primary, .secondary, .ghost, .danger { min-height: 44px; padding: 0 21px; border: 1px solid transparent; border-radius: var(--radius); transition: .18s ease; }
.primary, .secondary { color: #fff; background: var(--blue); box-shadow: 0 10px 24px rgba(0, 93, 212, .16); }
.primary:hover, .secondary:hover { background: #0059c9; transform: translateY(-1px); }
.ghost { color: #27364d; background: #fff; border-color: #cfd7e4; }
.ghost:hover { color: var(--blue); border-color: #78afea; background: #f8fbff; }
.danger { color: var(--bad); background: #fff1f3; border-color: #ffc6d1; }
.browse-dropzone { display: grid; justify-items: center; gap: 10px; padding: 22px 16px 15px; border: 2px dashed #70aceb; background: #f5faff; text-align: center; }
.dropzone-label { color: #497092; font-size: 8px; font-weight: 750; letter-spacing: .16em; }
.browse-dropzone > small { color: #8290a2; font-size: 9px; }
.browse-button { position: relative; min-width: 300px; min-height: 62px; display: inline-flex; align-items: center; justify-content: center; gap: 14px; padding-inline: 20px 25px; overflow: hidden; text-align: left; isolation: isolate; animation: browseGlow 2.6s ease-in-out infinite; }
.browse-button::after { content: ""; position: absolute; z-index: 1; width: 38%; height: 190%; left: -65%; top: -45%; background: linear-gradient(90deg, transparent, rgba(255,255,255,.62), transparent); transform: rotate(18deg); animation: browseShine 2.6s ease-in-out infinite; }
.browse-button > span { position: relative; z-index: 2; }
.browse-button strong { display: block; font-size: 14px; line-height: 1.15; }
.browse-button small { display: block; margin-top: 4px; color: rgba(255,255,255,.72); font-size: 9px; font-weight: 400; letter-spacing: .04em; }
.folder-symbol { position: relative; display: block; width: 24px; height: 17px; border: 1.5px solid rgba(255,255,255,.9); border-radius: 2px; }
.folder-symbol::before { content: ""; position: absolute; width: 10px; height: 4px; left: 2px; top: -5px; border: 1.5px solid rgba(255,255,255,.9); border-bottom: 0; border-radius: 2px 2px 0 0; }
.folder-symbol::after { content: "↗"; position: absolute; right: 3px; bottom: 0; color: #fff; font-size: 10px; }
.folder-guide { width: 100%; margin: 0; padding: 16px 17px 13px; border: 1px solid #e2e8f0; background: #fafbfd; text-align: left; }
.folder-root { display: flex; align-items: center; gap: 9px; min-height: 26px; padding-bottom: 10px; border-bottom: 1px solid #e4e9f0; }
.folder-root strong { color: #173253; font-size: 11px; letter-spacing: .08em; }
.folder-root mark { margin-left: auto; padding: 4px 7px; color: #fff; background: var(--blue); font-size: 8px; font-weight: 750; letter-spacing: .06em; white-space: nowrap; }
.tree-folder, .mini-folder { position: relative; display: inline-block; width: 17px; height: 12px; flex: 0 0 auto; border: 1.5px solid #1675db; border-radius: 1px; background: #e1f0ff; }
.tree-folder::before, .mini-folder::before { content: ""; position: absolute; width: 7px; height: 3px; left: 1px; top: -4px; border: 1.5px solid #1675db; border-bottom: 0; border-radius: 1px 1px 0 0; }
.folder-children { display: grid; grid-template-columns: 1fr; gap: 0; margin: 5px 0 4px 7px; }
.folder-children div { min-height: 34px; display: grid; grid-template-columns: 19px 17px 62px 1fr; align-items: center; column-gap: 7px; color: #486078; font-size: 10px; border-bottom: 1px solid #edf0f4; }
.folder-children div:last-child { border-bottom: 0; }
.folder-children .branch { display: inline; color: #8aa1b8; font-family: Consolas, monospace; font-size: 11px; }
.folder-children .mini-folder { width: 13px; height: 9px; }
.folder-children .mini-folder::before { width: 5px; height: 2px; top: -3px; }
.folder-children b { color: #263f5c; font-weight: 650; }
.folder-children small { color: #8493a4; font-size: 9px; }
.file-dot { width: 11px; height: 13px; border: 1px solid #5e7f9f; background: #fff; }
.muted-folder { filter: grayscale(.55); opacity: .64; }
.folder-guide p { margin: 10px 0 0; color: #65758a; font-size: 9px; line-height: 1.5; text-align: left; }
.folder-guide p b { color: #bd3e50; }
#rescanButton:disabled { display: none; }
@keyframes browseGlow { 0%,100% { box-shadow: 0 10px 24px rgba(0, 93, 212, .18), 0 0 0 0 rgba(0, 133, 255, .28); } 50% { box-shadow: 0 14px 34px rgba(0, 93, 212, .3), 0 0 0 7px rgba(0, 133, 255, 0); } }
@keyframes browseShine { 0%,38% { left: -65%; } 70%,100% { left: 135%; } }

.featured-games { position: relative; min-height: 600px; padding: 85px 0 72px; overflow: hidden; background: linear-gradient(180deg, #f5f9ff 0%, #edf5ff 100%); }
.featured-games::before { content: ""; position: absolute; width: 520px; height: 520px; left: 50%; top: 58%; border-radius: 50%; background: radial-gradient(circle, rgba(0,113,235,.14), rgba(0,113,235,0) 68%); transform: translate(-50%,-50%); pointer-events: none; }
.featured-copy { position: relative; z-index: 2; max-width: 760px; margin: 0 auto 46px; padding-inline: 24px; text-align: center; }
.featured-copy .eyebrow { margin-bottom: 13px; }
.featured-copy h2 { margin: 0; color: #14233a; font-size: clamp(40px, 4.6vw, 66px); font-weight: 350; line-height: 1.03; letter-spacing: -.05em; }
.featured-copy > p:last-child { max-width: 650px; margin: 20px auto 0; color: #66758a; font-size: 14px; line-height: 1.7; }
.artwork-marquee { position: relative; z-index: 2; width: 100%; overflow: hidden; padding: 18px 0 72px; mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent); }
.artwork-track { display: flex; width: max-content; animation: artworkScroll 70s linear infinite; will-change: transform; }
.artwork-set { display: flex; align-items: center; gap: 18px; padding-right: 18px; }
.artwork-set img { width: clamp(150px, 13vw, 205px); aspect-ratio: 1 / 1; flex: 0 0 auto; object-fit: cover; border: 5px solid #fff; background: #dbe8f7; box-shadow: 0 17px 34px rgba(22, 58, 101, .22); transition: transform .28s ease, box-shadow .28s ease, filter .28s ease; }
.artwork-set img:nth-child(3n+1) { transform: translateY(-8px) rotate(-1.5deg); }
.artwork-set img:nth-child(3n+2) { transform: translateY(9px) rotate(1deg); }
.artwork-set img:nth-child(3n) { transform: translateY(-2px) rotate(.5deg); }
.artwork-set img:not([src]) { opacity: 0; }
.artwork-marquee:hover .artwork-track { animation-play-state: paused; }
.artwork-set img:hover { position: relative; z-index: 3; transform: translateY(-15px) scale(1.06); box-shadow: 0 25px 48px rgba(13, 54, 104, .32); }
@keyframes artworkScroll { to { transform: translateX(-50%); } }

.artwork-ribbon {
  position: relative;
  z-index: 3;
  min-height: 350px;
  margin-top: 0;
  padding: 120px max(6vw, calc((100vw - 1420px) / 2)) 92px;
  color: #fff;
  overflow: hidden;
  background: linear-gradient(110deg, #002c79 0%, #005ed4 48%, #008cff 100%);
  clip-path: polygon(0 15%, 68% 0, 100% 10%, 100% 100%, 0 100%);
}
.artwork-ribbon::before, .artwork-ribbon::after { content: ""; position: absolute; width: 120%; height: 42px; left: -10%; background: rgba(255,255,255,.11); transform: rotate(-10deg); }
.artwork-ribbon::before { top: 7%; }.artwork-ribbon::after { bottom: 6%; transform: rotate(8deg); }
.ribbon-inner { position: relative; z-index: 2; display: grid; grid-template-columns: .8fr 1.2fr; align-items: center; gap: 80px; max-width: 1420px; margin: 0 auto; }
.ribbon-copy .eyebrow { color: #a9ddff; }
.ribbon-copy h2 { margin: 0 0 14px; color: #fff; font-size: clamp(34px, 4vw, 58px); font-weight: 350; letter-spacing: -.04em; }
.ribbon-copy p:last-child { max-width: 520px; margin: 0; color: #d9edff; line-height: 1.65; }
.ribbon-steps { display: grid; grid-template-columns: repeat(3,1fr); gap: 1px; background: rgba(255,255,255,.25); transform: skewX(-7deg); }
.ribbon-steps div { min-height: 144px; padding: 25px 22px; background: rgba(0, 42, 112, .68); transform: skewX(7deg); }
.ribbon-steps span { display: block; color: #7dc9ff; font-size: 11px; letter-spacing: .14em; }
.ribbon-steps strong { display: block; margin-top: 21px; font-size: 16px; }
.ribbon-steps small { display: block; margin-top: 7px; color: #bcd9f4; line-height: 1.45; }

.workspace { width: min(1420px, calc(100% - 48px)); margin: 70px auto 90px; padding: clamp(24px, 4vw, 44px); border: 1px solid var(--line); background: #fff; box-shadow: 0 24px 70px rgba(29, 52, 84, .11); }
.workspace-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 25px; padding-bottom: 26px; border-bottom: 1px solid var(--line); }
.workspace h2 { margin: 0; color: #152238; font-size: clamp(27px, 3vw, 42px); font-weight: 350; }
.summary { display: flex; gap: 34px; }
.summary div { min-width: 55px; }
.summary strong { display: block; color: #17243a; font-size: 23px; font-weight: 500; }
.summary span { color: #7b8799; font-size: 10px; text-transform: uppercase; letter-spacing: .14em; }
.toolbar { display: flex; justify-content: space-between; gap: 20px; margin: 25px 0 18px; }
.search { width: min(390px, 100%); display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 14px; border: 1px solid #dce2eb; background: #f9fafc; }
.search-symbol { position: relative; width: 14px; height: 14px; flex: 0 0 auto; border: 2px solid var(--blue); border-radius: 50%; }
.search-symbol::after { content: ""; position: absolute; width: 6px; height: 2px; right: -5px; bottom: -2px; background: var(--blue); transform: rotate(45deg); transform-origin: left center; }
.search input { width: 100%; border: 0; outline: 0; color: #16233a; background: transparent; }
.search input::placeholder { color: #8a95a6; }
.download-actions { display: flex; gap: 10px; }
.progress-panel { margin: 0 0 18px; padding: 17px 20px; border: 1px solid #c6dcf8; background: #f0f7ff; }
.progress-copy { display: flex; justify-content: space-between; color: #19324f; font-size: 13px; }
.progress-copy span, .progress-panel p { color: #60728a; }
.progress-track { height: 5px; margin: 13px 0 8px; overflow: hidden; background: #cfd7e2; }
.progress-track div { width: 0; height: 100%; background: linear-gradient(90deg, #0068e8, #20a4ff); transition: width .18s ease; }
.progress-panel p { margin: 0; font-size: 11px; }
.notice { margin-bottom: 18px; padding: 14px 17px; color: #244563; border-left: 3px solid var(--blue); background: #eef6ff; font-size: 13px; line-height: 1.5; }
.notice.error { color: #94243a; border-color: var(--bad); background: #fff1f3; }

.table-wrap { min-height: 260px; border: 1px solid var(--line); background: #fff; overflow: auto; }
table { width: 100%; border-collapse: collapse; }
th { position: sticky; top: 0; z-index: 1; padding: 13px 17px; color: #667085; background: #f3f6fa; font-size: 10px; text-align: left; text-transform: uppercase; letter-spacing: .15em; }
td { padding: 15px 17px; color: #344054; border-top: 1px solid #edf0f4; font-size: 13px; }
tbody tr { transition: background .15s; }
tbody tr:hover { background: #f5f9ff; }
.game-title { font-weight: 650; color: #182439; }
.game-path { display: block; max-width: 620px; margin-top: 4px; overflow: hidden; color: #8a95a6; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.disc-id { font-family: "Cascadia Mono", Consolas, monospace; color: #0061cd; }
.format { display: inline-block; min-width: 38px; padding: 3px 6px; text-align: center; color: #075fba; border: 1px solid #b9d5f3; background: #eff7ff; font-size: 9px; letter-spacing: .1em; }
.status { display: inline-flex; align-items: center; gap: 7px; color: #778397; font-size: 11px; }
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #98a2b3; }
.status.ready { color: var(--good); }.status.ready::before { background: var(--good); }
.status.missing { color: var(--missing); }.status.missing::before { background: #e59a18; }
.status.failed, .status.unresolved { color: var(--bad); }.status.failed::before, .status.unresolved::before { background: var(--bad); }
.empty { min-height: 260px; display: grid; place-content: center; text-align: center; color: #778397; }
.empty[hidden] { display: none; }
.empty h3 { margin: 0 0 5px; color: #344054; font-weight: 500; }.empty p { margin: 0; font-size: 12px; }

footer { display: flex; justify-content: space-between; padding: 27px clamp(24px, 5vw, 82px); color: #aebbd0; background: #071a38; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; }

@media (max-width: 1050px) {
  .hero { grid-template-columns: 1fr 440px; gap: 34px; }
  .featured-games { grid-template-columns: .72fr 1.28fr; gap: 20px; }
  .cover { width: 166px; }
  .showcase-blue { width: 340px; height: 340px; }
  .ribbon-inner { grid-template-columns: 1fr; gap: 34px; }
}
@media (max-width: 800px) {
  .hero { min-height: auto; grid-template-columns: 1fr; padding-top: 62px; text-align: center; }
  .hero-copy { display: flex; flex-direction: column; align-items: center; }
  .browse-center { width: min(560px, 100%); justify-self: center; padding: 24px 20px 18px; }
  .browse-heading { text-align: center; }
  .hero-actions { grid-column: 1; grid-row: auto; width: min(330px, 100%); justify-self: center; }
  .featured-games { grid-template-columns: 1fr; gap: 10px; padding-top: 70px; text-align: center; }
  .featured-copy > p:last-child { margin-inline: auto; }
  .game-showcase { min-height: 410px; width: min(560px, 100%); margin: 0 auto; }
  .artwork-ribbon { padding-top: 105px; clip-path: polygon(0 8%, 100% 0, 100% 100%, 0 100%); }
  .ribbon-copy { text-align: center; }.ribbon-copy p:last-child { margin-inline: auto; }
  .workspace-head, .toolbar { align-items: stretch; flex-direction: column; }
  .summary { justify-content: space-between; gap: 10px; }
  .download-actions { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
  .browse-button, .browse-button::after { animation: none; }
  .artwork-marquee { overflow-x: auto; mask-image: none; -webkit-mask-image: none; }
  .artwork-track { animation: none; }
  .artwork-set[aria-hidden="true"] { display: none; }
}
@media (max-width: 580px) {
  .topbar { height: 64px; padding: 0 16px; }
  .brand { font-size: 17px; }.header-download { padding: 0 11px; font-size: 10px; }
  .hero { padding-inline: 18px; padding-bottom: 75px; }
  .browse-center { padding-inline: 14px; }
  .browse-dropzone { padding-inline: 10px; }
  .hero-actions, .browse-button { width: 100%; min-width: 0; }
  .folder-guide { padding-inline: 11px; }
  .folder-children div { grid-template-columns: 18px 15px 45px 1fr; column-gap: 5px; }
  h1 { font-size: 45px; }
  .game-showcase { min-height: 330px; }
  .showcase-blue { width: 270px; height: 270px; }
  .cover { width: 126px; border-width: 4px; }
  .cover-one { left: 4%; top: 22%; }.cover-two { left: 34%; top: 12%; }.cover-three { right: 1%; top: 25%; }
  .floating-shape { width: 35px; height: 35px; font-size: 21px; }
  .artwork-ribbon { padding-inline: 18px; }
  .ribbon-steps { grid-template-columns: 1fr; transform: none; }
  .ribbon-steps div { min-height: 104px; transform: none; }.ribbon-steps strong { margin-top: 10px; }
  .workspace { width: calc(100% - 24px); padding: 18px 12px; }
  .summary div:nth-child(2), .summary div:nth-child(3) { display: none; }
  th, td { padding-inline: 10px; }
  th:nth-child(3), td:nth-child(3) { display: none; }
  footer { gap: 10px; flex-direction: column; }
}
