:root {
  --ink: #0b0b0d;
  --panel: #121215;
  --panel-2: #18181c;
  --line: #29292e;
  --soft: #a5a5ad;
  --paper: #f1f0eb;
  --red: #2f6bff;
  --red-dark: #1740b8;
  --display: "Oswald", Impact, sans-serif;
  --body: "DM Sans", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--ink); color: var(--paper); font-family: var(--body); }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
button { color: inherit; }

.site-header {
  height: 82px; padding: 0 clamp(24px, 5vw, 78px); display: flex; align-items: center;
  justify-content: space-between; border-bottom: 1px solid rgba(255,255,255,.1);
  position: relative; z-index: 20; background: rgba(11,11,13,.87); backdrop-filter: blur(16px);
}
.brand { display: flex; align-items: center; gap: 10px; font: 700 17px/1 var(--display); letter-spacing: 1px; }
.brand-logo { width: 48px; height: 48px; object-fit: contain; filter: drop-shadow(0 0 10px rgba(47,107,255,.25)); }
.nav { display: flex; align-items: center; gap: 42px; font-size: 13px; font-weight: 600; }
.nav a { position: relative; padding: 31px 0; color: #adadb3; }
.nav a:hover, .nav a.active { color: white; }
.nav a.active::after { content: ""; position: absolute; height: 2px; background: var(--red); left: 0; right: 0; bottom: 19px; }
.account-slot { min-width: 170px; display: flex; justify-content: flex-end; }
.account-button { display: inline-flex; align-items: center; gap: 9px; font-size: 12px; font-weight: 700; text-transform: uppercase; }
.account-button .discord-dot { width: 8px; height: 8px; border-radius: 50%; background: #5865f2; box-shadow: 0 0 0 5px rgba(88,101,242,.16); }
.avatar { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; background: var(--red); display: grid; place-items: center; }
.logout { border: 0; background: none; cursor: pointer; color: #777; font-size: 11px; }
.menu-button { display: none; border: 0; background: transparent; font-size: 22px; }

.hero { min-height: calc(100vh - 82px); overflow: hidden; position: relative; padding: clamp(90px, 12vh, 150px) clamp(24px, 7vw, 110px) 90px; }
.hero-glow { position: absolute; inset: 0; background: radial-gradient(circle at 77% 43%, rgba(47,107,255,.22), transparent 31%), linear-gradient(90deg, #0b0b0d 47%, transparent); }
.eyebrow, .section-index { position: relative; color: var(--soft); font-size: 11px; font-weight: 700; letter-spacing: 2.3px; }
.eyebrow { display: flex; align-items: center; gap: 11px; }
.eyebrow span { width: 29px; height: 2px; background: var(--red); }
h1, h2 { font-family: var(--display); margin: 0; letter-spacing: -2px; line-height: .95; }
.hero h1 { position: relative; font-size: clamp(72px, 11vw, 160px); margin: 25px 0 30px; z-index: 2; }
h1 em, h2 em { color: var(--red); font-style: normal; }
.hero-copy { position: relative; width: min(525px, 90%); font-size: 17px; line-height: 1.75; color: #b3b3b8; z-index: 2; }
.hero-actions { position: relative; display: flex; gap: 35px; align-items: center; margin-top: 38px; z-index: 2; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 24px; padding: 17px 23px; border: 0; text-transform: uppercase; letter-spacing: .5px; font-size: 12px; font-weight: 800; cursor: pointer; }
.button-primary { background: var(--red); color: white; box-shadow: 0 14px 40px rgba(47,107,255,.2); }
.button-primary:hover { background: #4d82ff; }
.button-discord { background: #5865f2; }
.text-link { display: inline-flex; align-items: center; gap: 13px; border-bottom: 1px solid #555; padding-bottom: 7px; font-size: 12px; font-weight: 700; text-transform: uppercase; }
.text-link:hover { border-color: var(--red); }
.hero-counter { position: absolute; right: 6vw; bottom: 9vh; z-index: 2; display: flex; align-items: center; gap: 15px; }
.hero-counter strong { font: 700 62px/1 var(--display); }
.hero-counter span { color: #8b8b91; font-size: 10px; line-height: 1.45; letter-spacing: 1.4px; }
.hero-art { position: absolute; width: min(55vw, 780px); height: 85%; right: -3vw; top: 8%; opacity: .85; }
.orb { width: 60%; aspect-ratio: 1; border-radius: 50%; position: absolute; left: 20%; top: 10%; background: radial-gradient(circle at 38% 35%, #a9c4ff, #2f6bff 20%, #071c59 55%, #010716 72%); box-shadow: 0 0 90px rgba(47,107,255,.28); filter: contrast(1.2); }
.orb::before { content: ""; position: absolute; inset: -6%; border: 1px solid rgba(255,255,255,.17); border-radius: 50%; transform: rotate(21deg) scaleY(.35); }
.grid-plane { position: absolute; width: 110%; height: 50%; bottom: 2%; background-image: linear-gradient(rgba(47,107,255,.22) 1px, transparent 1px), linear-gradient(90deg, rgba(47,107,255,.22) 1px, transparent 1px); background-size: 38px 38px; transform: perspective(300px) rotateX(60deg); mask-image: linear-gradient(to bottom, transparent, black); }
.slash { position: absolute; width: 120px; height: 90%; background: linear-gradient(180deg, transparent, rgba(61,124,255,.95), transparent); transform: rotate(34deg); right: 34%; top: -4%; filter: blur(2px); mix-blend-mode: screen; }
.art-label { position: absolute; right: 8%; top: 24%; font: 600 11px/1.8 var(--display); letter-spacing: 5px; color: rgba(255,255,255,.48); writing-mode: vertical-rl; }
.scroll-cue { position: absolute; bottom: 30px; left: 50%; color: #6f6f75; font-size: 8px; letter-spacing: 2px; display: flex; align-items: center; gap: 13px; transform: rotate(90deg); transform-origin: left; }
.scroll-cue span { width: 45px; height: 1px; background: #444; }

.manifesto { background: var(--paper); color: var(--ink); display: grid; grid-template-columns: 1fr 1fr; gap: 8vw; padding: 120px clamp(24px, 7vw, 110px); }
.manifesto h2, .featured h2, .section-heading h2 { font-size: clamp(50px, 6vw, 88px); margin-top: 30px; }
.manifesto-copy { padding-top: 65px; }
.manifesto-copy > p { color: #525258; font-size: clamp(18px, 2vw, 25px); max-width: 570px; line-height: 1.6; }
.stats { display: grid; grid-template-columns: repeat(2, minmax(120px, 190px)); gap: 20px; margin-top: 75px; border-top: 1px solid #c9c8c3; padding-top: 30px; }
.stats div { display: flex; flex-direction: column; gap: 8px; }
.stats strong { font: 700 43px/1 var(--display); }
.stats span { font-size: 9px; letter-spacing: 1.3px; color: #777; font-weight: 700; }

.featured, .catalogue { padding: 110px clamp(24px, 7vw, 110px); }
.section-heading { display: flex; justify-content: space-between; align-items: end; margin-bottom: 50px; }
.game-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.game-card { background: var(--panel); border: 1px solid var(--line); position: relative; overflow: hidden; transition: transform .25s, border-color .25s; }
.game-card:hover { transform: translateY(-5px); border-color: #4b4b53; }
.game-image { aspect-ratio: 16/10; overflow: hidden; background: #222; position: relative; }
.game-image::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 55%, rgba(0,0,0,.65)); }
.game-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.game-card:hover img { transform: scale(1.045); }
.category { position: absolute; top: 14px; left: 14px; background: rgba(8,8,10,.82); backdrop-filter: blur(5px); padding: 6px 9px; z-index: 1; color: #ddd; font-size: 9px; letter-spacing: 1.4px; font-weight: 700; text-transform: uppercase; }
.game-info { padding: 22px; }
.game-info h3 { font: 600 25px/1.1 var(--display); margin: 0 0 10px; text-transform: uppercase; }
.game-info p { color: #919198; line-height: 1.55; font-size: 13px; margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 40px; }
.game-footer { display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--line); padding: 15px 22px; }
.game-footer span { color: #73737a; font-size: 9px; letter-spacing: 1.2px; font-weight: 700; }
.download-button { border: 0; background: transparent; color: white; font-size: 11px; text-transform: uppercase; font-weight: 700; cursor: pointer; display: flex; gap: 10px; align-items: center; }
.download-button:hover { color: var(--red); }
.footer { margin: 0 clamp(24px, 7vw, 110px); padding: 45px 0; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; color: #6f6f76; font-size: 11px; }

.page-hero { min-height: 430px; padding: 110px clamp(24px, 7vw, 110px) 70px; background: radial-gradient(circle at 80% 10%, rgba(47,107,255,.17), transparent 30%); }
.page-hero h1, .admin-intro h1 { font-size: clamp(65px, 8vw, 120px); margin: 24px 0; }
.page-hero > p:last-child, .admin-intro > p:last-child { color: #98989f; width: min(560px, 100%); font-size: 16px; line-height: 1.7; }
.catalogue { padding-top: 45px; }
.catalogue-tools { display: flex; align-items: center; gap: 25px; justify-content: space-between; border-bottom: 1px solid var(--line); padding-bottom: 28px; }
.search-box { width: min(360px, 100%); display: flex; align-items: center; gap: 10px; border: 1px solid #39393f; padding: 13px 15px; background: #101013; }
.search-box input { width: 100%; border: 0; outline: 0; color: white; background: transparent; }
.search-box input::placeholder { color: #666; }
.filter-row { display: flex; flex-wrap: wrap; gap: 7px; justify-content: flex-end; }
.filter { background: transparent; border: 1px solid #35353b; color: #929299; padding: 9px 13px; cursor: pointer; font-size: 10px; text-transform: uppercase; letter-spacing: .8px; }
.filter.active, .filter:hover { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.catalogue-meta { display: flex; justify-content: space-between; padding: 27px 0 18px; color: #67676e; font-size: 9px; letter-spacing: 1.7px; }
.catalogue-meta strong { color: white; }
.catalogue-grid { grid-template-columns: repeat(3, 1fr); }
.empty-state { padding: 80px; text-align: center; border: 1px dashed #34343a; color: #777; }
.empty-state strong, .empty-state span { display: block; margin: 7px; }
.empty-state strong { color: white; font: 600 26px var(--display); }

.admin-main { display: grid; grid-template-columns: .8fr 1.2fr; gap: 7vw; padding: 90px clamp(24px, 7vw, 110px) 120px; min-height: calc(100vh - 82px); }
.admin-intro { padding-top: 45px; }
.admin-card { background: var(--panel); border: 1px solid var(--line); min-height: 600px; }
.game-form { padding: clamp(25px, 4vw, 55px); }
.form-head { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--line); padding-bottom: 25px; margin-bottom: 30px; }
.form-head span:first-child { color: var(--red); font-size: 9px; letter-spacing: 1.4px; font-weight: 700; }
.form-head h2 { font-size: 37px; margin-top: 7px; }
.status-pill { color: #7ddf97; border: 1px solid rgba(125,223,151,.25); background: rgba(125,223,151,.07); padding: 7px 9px; font-size: 8px; letter-spacing: 1px; }
.game-form > label { display: block; color: #b5b5ba; font-size: 11px; font-weight: 700; letter-spacing: .5px; margin: 20px 0; }
.game-form input, .game-form textarea, .game-form select { display: block; width: 100%; margin-top: 9px; border: 1px solid #37373e; background: #0c0c0f; color: white; padding: 14px; outline: none; }
.game-form textarea { resize: vertical; }
.game-form input:focus, .game-form textarea:focus, .game-form select:focus { border-color: var(--red); }
.game-form label > small { display: block; text-align: right; color: #606067; margin-top: 5px; font-weight: 400; }
.upload-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.dropzone { border: 1px dashed #46464d; padding: 20px; font-size: 11px; color: #b8b8bd; cursor: pointer; }
.dropzone input { padding: 0; border: 0; font-size: 10px; margin-bottom: 12px; color: #777; }
.dropzone span, .dropzone small { display: block; margin-top: 6px; }
.dropzone small { color: #666; }
.form-message { min-height: 22px; color: #78a2ff; font-size: 12px; }
.form-message.success { color: #7ddf97; }
.submit-button { width: 100%; margin-top: 7px; }
.admin-library { border-top: 1px solid var(--line); padding: clamp(25px, 4vw, 55px); }
.admin-library .form-head { margin-bottom: 18px; }
.library-count { color: #777; font-size: 9px; letter-spacing: 1.2px; }
.library-count b { color: white; }
.admin-search { display: flex; align-items: center; gap: 10px; border: 1px solid #39393f; background: #0c0c0f; padding: 12px 14px; margin-bottom: 15px; color: #777; }
.admin-search:focus-within { border-color: var(--red); }
.admin-search input { width: 100%; border: 0; outline: 0; background: transparent; color: white; font-size: 12px; }
.admin-search input::placeholder { color: #616168; }
.admin-game-list { display: flex; flex-direction: column; }
.admin-game-row { display: grid; grid-template-columns: 62px 1fr auto; gap: 15px; align-items: center; padding: 13px 0; border-bottom: 1px solid var(--line); }
.admin-game-row img { width: 62px; height: 46px; object-fit: cover; background: #222; }
.admin-game-row h3 { margin: 0 0 4px; font: 600 17px var(--display); text-transform: uppercase; }
.admin-game-row span { color: #6f6f76; font-size: 9px; letter-spacing: 1px; text-transform: uppercase; }
.remove-game { border: 1px solid #3b3b41; background: transparent; color: #999; padding: 9px 11px; cursor: pointer; font-size: 9px; font-weight: 700; letter-spacing: .7px; text-transform: uppercase; }
.remove-game:hover { color: #78a2ff; border-color: #3159ac; background: rgba(47,107,255,.07); }
.admin-list-empty { color: #777; text-align: center; padding: 35px 0; font-size: 12px; }
.confirm-dialog { width: min(480px, calc(100% - 32px)); border: 1px solid #3b3b42; background: var(--panel); color: white; padding: 0; box-shadow: 0 30px 100px rgba(0,0,0,.7); }
.confirm-dialog::backdrop { background: rgba(0,0,0,.76); backdrop-filter: blur(4px); }
.confirm-dialog form { padding: 38px; text-align: center; }
.dialog-mark { margin: 0 auto 20px; display: grid; place-items: center; width: 58px; height: 58px; border: 1px solid rgba(47,107,255,.55); border-radius: 50%; color: var(--red); font: 700 25px var(--display); }
.confirm-dialog h2 { font-size: 29px; }
.confirm-dialog p { color: #96969d; font-size: 13px; line-height: 1.65; margin: 16px 0 28px; }
.confirm-dialog p strong { color: white; }
.dialog-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.button-quiet { background: #25252a; }
.button-danger { background: var(--red-dark); }
.button-danger:hover { background: var(--red); }
.toast { position: fixed; z-index: 50; right: 25px; bottom: 25px; background: var(--paper); color: var(--ink); padding: 15px 20px; font-size: 12px; box-shadow: 0 18px 60px rgba(0,0,0,.4); transform: translateY(130%); transition: transform .3s; }
.toast.show { transform: translateY(0); }

@media (max-width: 900px) {
  .site-header { height: 70px; padding: 0 22px; }
  .brand-logo { width: 42px; height: 42px; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 70px; padding: 20px; background: var(--ink); flex-direction: column; gap: 0; align-items: stretch; }
  .nav.open { display: flex; }
  .nav a { padding: 14px; }
  .nav a.active::after { bottom: 5px; left: 14px; right: auto; width: 25px; }
  .menu-button { display: block; }
  .account-slot { min-width: 0; margin-left: auto; margin-right: 18px; }
  .account-button span:not(.discord-dot) { display: none; }
  .hero { min-height: 790px; padding-top: 80px; }
  .hero h1 { font-size: clamp(64px, 17vw, 110px); }
  .hero-art { width: 90vw; height: 52%; top: 38%; right: -25vw; opacity: .45; }
  .hero-counter { bottom: 45px; }
  .scroll-cue { display: none; }
  .manifesto { grid-template-columns: 1fr; gap: 20px; padding-top: 85px; }
  .manifesto-copy { padding-top: 0; }
  .game-grid, .catalogue-grid { grid-template-columns: repeat(2, 1fr); }
  .catalogue-tools { flex-direction: column; align-items: stretch; }
  .search-box { width: 100%; }
  .filter-row { justify-content: flex-start; }
  .admin-main { grid-template-columns: 1fr; padding-top: 55px; }
  .admin-intro { padding-top: 0; }
}

@media (max-width: 580px) {
  .brand > span:last-child { display: none; }
  .hero-actions, .section-heading, .footer { align-items: flex-start; flex-direction: column; }
  .hero-counter { right: 24px; }
  .manifesto, .featured, .catalogue { padding-left: 20px; padding-right: 20px; }
  .stats { gap: 5px; }
  .game-grid, .catalogue-grid { grid-template-columns: 1fr; }
  .page-hero { min-height: 360px; padding-top: 75px; }
  .page-hero h1, .admin-intro h1 { letter-spacing: -1px; }
  .upload-grid { grid-template-columns: 1fr; }
  .dialog-actions { grid-template-columns: 1fr; }
  .footer { gap: 20px; margin: 0 20px; }
}
