:root {
  --h5-bg: #0b111a;
  --h5-panel: #111b28;
  --h5-card: rgba(38, 55, 74, 0.78);
  --h5-border: rgba(102, 192, 244, 0.22);
  --h5-accent: #66c0f4;
  --h5-text: #e8f1f8;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--h5-bg); color: var(--h5-text); }
.h5-hub { min-height: 100vh; background: radial-gradient(circle at 70% 12%, rgba(40, 91, 126, 0.22), transparent 34%), #0b111a; }
.h5-hub-top { min-height: 62px; display: grid; grid-template-columns: 180px 1fr 180px; align-items: center; gap: 14px; padding: 9px 20px; border-bottom: 1px solid var(--h5-border); background: rgba(10, 16, 24, 0.94); }
.h5-hub-brand { color: #fff; font-size: 20px; font-weight: 900; text-decoration: none; }
.h5-hub-top > div { text-align: center; }
.h5-hub-top strong { color: var(--h5-accent); font-size: 17px; }
.h5-hub-top span { margin-left: 10px; color: #93a7b8; font-size: 12px; }
.h5-back { justify-self: end; color: #c9d8e4; text-decoration: none; font-size: 13px; }
.h5-back:hover { color: var(--h5-accent); }

.h5-layout { display: grid; grid-template-columns: minmax(310px, 370px) 1fr; min-height: calc(100vh - 62px); }
.h5-side { min-height: 0; max-height: calc(100vh - 62px); display: flex; flex-direction: column; border-right: 1px solid var(--h5-border); background: rgba(15, 24, 35, 0.94); }
.h5-list-head { padding: 14px; border-bottom: 1px solid rgba(255,255,255,.07); }
.h5-list-head label { display: block; margin-bottom: 8px; color: #cce9fa; font-size: 13px; font-weight: 800; letter-spacing: .06em; }
.h5-search-row { display: grid; grid-template-columns: 1fr auto; gap: 7px; }
.h5-search-row input { min-width: 0; height: 36px; padding: 0 10px; border: 1px solid var(--h5-border); border-radius: 6px; background: rgba(0,0,0,.28); color: #fff; }
.h5-search-row button, .h5-pager button { min-width: 58px; height: 36px; border: 1px solid rgba(102,192,244,.35); border-radius: 6px; background: rgba(102,192,244,.12); color: #dff3ff; cursor: pointer; }
.h5-search-row button:hover, .h5-pager button:hover:not(:disabled) { background: rgba(102,192,244,.24); }
.h5-game-list { flex: 1; min-height: 0; overflow-y: auto; padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.h5-list-state { color: #8594a2; text-align: center; padding: 30px 10px; }
.h5-card { display: grid; grid-template-columns: 68px minmax(0, 1fr); gap: 11px; align-items: center; width: 100%; padding: 9px; border: 1px solid rgba(255,255,255,.09); border-radius: 10px; background: var(--h5-card); color: inherit; text-align: left; cursor: pointer; }
.h5-card:hover, .h5-card.active { border-color: rgba(102,192,244,.62); background: rgba(43,74,100,.76); }
.h5-thumb { width: 68px; height: 68px; display: grid; place-items: center; overflow: hidden; border-radius: 9px; background: linear-gradient(145deg, #1b5775, #47326e); font-size: 28px; font-weight: 900; }
.h5-thumb img { width: 100%; height: 100%; object-fit: cover; }
.h5-card-main { min-width: 0; }
.h5-card-title { overflow: hidden; color: #f2f7fb; font-size: 14px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.h5-card-desc { height: 32px; margin-top: 5px; overflow: hidden; color: #93a4b3; font-size: 11px; line-height: 16px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.h5-votes { display: flex; gap: 7px; margin-top: 7px; }
.h5-vote { height: 27px; min-width: 52px; padding: 0 8px; border: 1px solid rgba(255,255,255,.11); border-radius: 6px; background: rgba(0,0,0,.22); color: #aebbc6; cursor: pointer; }
.h5-vote:hover { border-color: rgba(102,192,244,.45); color: #fff; }
.h5-vote.on { border-color: var(--h5-accent); background: rgba(102,192,244,.13); color: var(--h5-accent); }
.h5-pager { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; border-top: 1px solid rgba(255,255,255,.07); color: #8fa0af; font-size: 12px; }
.h5-pager button:disabled { opacity: .38; cursor: not-allowed; }

.h5-stage { position: relative; min-height: calc(100vh - 62px); overflow: hidden; background: #05080d; }
.h5-frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #080b10; }
.h5-placeholder, .h5-mobile-notice { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 9px; padding: 28px; text-align: center; color: #81909d; }
.h5-placeholder strong, .h5-mobile-notice strong { color: #d6e4ed; font-size: 17px; }
.h5-placeholder-icon { font-size: 42px; }
.h5-mobile-notice { z-index: 4; background: #0b111a; }
.h5-frame[hidden],
.h5-placeholder[hidden],
.h5-mobile-notice[hidden] { display: none !important; }
.h5-mobile-notice p { max-width: 380px; margin: 0; line-height: 1.7; }
.h5-mobile-notice a { margin-top: 8px; padding: 9px 16px; border-radius: 6px; background: #326c93; color: #fff; text-decoration: none; }

@media (max-width: 900px) {
  .h5-hub-top { grid-template-columns: 1fr auto; padding: 10px 14px; }
  .h5-hub-top > div { display: none; }
  .h5-layout { grid-template-columns: 1fr; }
  .h5-side { display: none; }
  .h5-stage { min-height: calc(100vh - 62px); }
}
