:root { color-scheme: dark; font-family: system-ui, -apple-system, "Segoe UI", sans-serif; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { min-height: 100vh; min-height: 100svh; margin: 0; color: #f5f8fb; background: #080d14; }
a { color: inherit; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
.wrap { width: min(100% - 40px, 1120px); margin: 0 auto; }
.topbar { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid #263746; }
.brand { color: #8ad9e9; font-size: 15px; font-weight: 850; letter-spacing: .18em; text-decoration: none; }
.topnav { display: flex; align-items: center; gap: 18px; color: #b9c8d3; font-size: 14px; }
.topnav a { text-decoration: none; }
.topnav a:hover { color: #fff; }
.page { padding: 52px 0 80px; }
h1 { margin: 0 0 28px; font-size: clamp(32px, 5vw, 52px); line-height: 1.1; letter-spacing: -.04em; }
h2, h3, p { margin-top: 0; }
.muted { color: #a9bbc9; }
.games { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.game-card { display: block; overflow: hidden; border: 1px solid #344454; border-radius: 14px; background: #121c27; color: inherit; text-decoration: none; transition: border-color .2s, transform .2s; }
.game-card:hover, .game-card:focus-visible { border-color: #8ad9e9; transform: translateY(-3px); }
.window-bar { display: flex; align-items: center; gap: 14px; height: 42px; padding: 0 18px; border-bottom: 1px solid #344454; color: #a9bbc9; font-size: 13px; font-weight: 700; letter-spacing: .08em; }
.dots { display: flex; gap: 6px; }
.dots span { width: 7px; height: 7px; border: 1px solid #7890a1; border-radius: 50%; }
.thumb { display: block; width: 100%; aspect-ratio: 16/9; object-fit: cover; background: #0d1720; }
.game-card-body { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 22px; }
.game-card h2 { margin: 0; font-size: clamp(22px, 2.6vw, 30px); letter-spacing: -.03em; }
.card-rating { margin: 8px 0 0; color: #f1cf79; font-size: 14px; font-weight: 700; letter-spacing: 0; }
.arrow { color: #8ad9e9; font-size: 23px; }
.back { display: inline-block; margin-bottom: 24px; color: #9fcbd4; text-decoration: none; font-weight: 700; }
.back:hover { color: #fff; }
.detail { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(280px, 1fr); gap: 32px; align-items: start; }
.detail .thumb { border: 1px solid #344454; border-radius: 14px; }
.detail p { color: #c3d0d9; font-size: 18px; line-height: 1.6; white-space: pre-wrap; }
.detail .detail-rating { margin: 0 0 24px; color: #f1cf79; font-size: 16px; font-weight: 750; }
.community { display: grid; grid-template-columns: minmax(260px, .72fr) minmax(0, 1.28fr); gap: 24px; margin-top: 52px; align-items: start; }
.community-panel { min-width: 0; padding: 24px; border: 1px solid #344454; border-radius: 14px; background: #121c27; }
.community-panel h2 { margin: 0 0 12px; font-size: 24px; }
.community-panel .muted { margin-bottom: 20px; font-size: 15px; line-height: 1.5; }
.rating-stars { display: flex; gap: 4px; margin: 0 0 18px; }
.rating-stars button { min-width: 42px; padding: 4px; border: 0; border-radius: 7px; background: transparent; color: #63798a; font-size: 35px; line-height: 1; }
.rating-stars button.selected, .rating-stars button:hover { color: #f1cf79; }
.rating-stars button:focus-visible, .comment-remove:focus-visible { outline: 2px solid #8ad9e9; outline-offset: 2px; }
.sign-in-prompt { margin: 12px 0 0; color: #b9c8d3; font-size: 15px; }
.sign-in-prompt a { color: #8ad9e9; font-weight: 700; }
.community textarea { display: block; width: 100%; min-height: 108px; margin: 0 0 14px; padding: 12px 14px; border: 1px solid #516373; border-radius: 8px; outline: none; resize: vertical; background: #09121b; color: #fff; font-size: 16px; }
.community textarea:focus { border-color: #8ad9e9; box-shadow: 0 0 0 2px #8ad9e944; }
.community .field { margin-bottom: 8px; }
.comments-list { display: grid; gap: 12px; margin-top: 22px; }
.comment { padding: 16px; border: 1px solid #344454; border-radius: 10px; background: #0c1620; }
.comment-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; color: #b9c8d3; font-size: 14px; }
.comment-author { color: #e8f3f5; font-weight: 750; }
.comment-body { margin: 12px 0 0; color: #e4edf3; font-size: 16px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.comment.removed .comment-body { color: #9fb1bd; font-style: italic; }
.comment-remove { margin-left: auto; padding: 2px 0; border: 0; background: none; color: #f0a5a5; font-size: 14px; font-weight: 700; }
.comment-remove:hover { color: #ffd0d0; text-decoration: underline; }
#more-comments { margin-top: 18px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 20px; border: 1px solid #8ad9e9; border-radius: 9px; background: #8ad9e9; color: #0b1720; font-size: 16px; font-weight: 800; text-decoration: none; }
.button:hover { background: #b6ecf4; }
.button.secondary { border-color: #425565; background: #172431; color: #e8f3f5; }
.button.secondary:hover { background: #223747; }
.button.danger { border-color: #a45757; background: #3f2027; color: #ffd6d6; }
.button:disabled { opacity: .5; cursor: default; }
.status { margin: 16px 0; color: #b9c8d3; }
.status.error { color: #ffaaaa; }
.panel { max-width: 680px; padding: 28px; border: 1px solid #344454; border-radius: 14px; background: #121c27; }
.field { display: grid; gap: 8px; margin: 0 0 20px; color: #d7e2e8; font-size: 14px; font-weight: 700; }
.field input, .field textarea, .field select { width: 100%; padding: 12px 14px; border: 1px solid #516373; border-radius: 8px; outline: none; background: #09121b; color: #fff; font-size: 16px; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: #8ad9e9; box-shadow: 0 0 0 2px #8ad9e944; }
.field textarea { min-height: 120px; resize: vertical; }
.field small { color: #9fb1bd; font-weight: 400; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }
.admin-head { display: flex; justify-content: space-between; align-items: start; gap: 20px; }
.admin-list { display: grid; gap: 12px; margin-top: 24px; }
.admin-item { display: grid; grid-template-columns: 120px minmax(0,1fr) auto; align-items: center; gap: 18px; padding: 12px; border: 1px solid #344454; border-radius: 12px; background: #121c27; }
.admin-item img { width: 120px; aspect-ratio: 16/9; object-fit: cover; border-radius: 6px; }
.admin-item h2 { margin: 0 0 4px; font-size: 19px; }
.admin-item p { margin: 0; color: #9fb1bd; font-size: 14px; }
.admin-form { margin-top: 24px; }
.file-preview { max-width: 220px; aspect-ratio: 16/9; display: block; object-fit: cover; margin: 8px 0; border-radius: 8px; }
@media (max-width: 700px) { .page { padding-top: 34px; } .games, .detail, .community { grid-template-columns: 1fr; } .community { margin-top: 36px; } .community-panel { padding: 20px; } .admin-item { grid-template-columns: 90px minmax(0,1fr); } .admin-item img { width: 90px; } .admin-item .button { grid-column: 1 / -1; } .panel { padding: 20px; } }
@media (prefers-reduced-motion: reduce) { .game-card { transition: none; } }
