/* 离线首页补充样式（主样式见 assets/index-DcY0dQS3.css） */
html {
  background-color: #232626;
}

body.app-root.dark {
  background-color: rgb(var(--layer2, 35 38 38));
  color: rgb(var(--primary, 255 255 255));
  min-height: 100vh;
  -webkit-tap-highlight-color: transparent;
}

#home-app {
  margin-left: auto;
  margin-right: auto;
  max-width: 640px;
  min-height: 100vh;
  padding-bottom: var(--safe-footer);
}

#home-app a {
  text-decoration: none;
  color: inherit;
}

#home-app button {
  font: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

#home-app img {
  display: block;
  max-width: 100%;
}

/* 原站 CSS 给 #page-content 预留了 header 高度，但本页 header 在文档流内，需取消重复间距 */
#home-app #page-content {
  padding-top: 0;
}

.home-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header);
  background: rgb(var(--layer2));
}

.home-header-inner {
  display: flex;
  align-items: center;
  width: 100%;
  height: 100%;
  padding: 0 1rem;
  overflow: hidden;
  box-sizing: border-box;
}

.home-logo {
  display: flex;
  align-items: center;
  flex: none;
  min-width: 0;
  font-size: 0;
  text-decoration: none;
  color: inherit;
}

.home-logo-img {
  display: block;
  width: auto;
  height: 2.25rem;
  flex-shrink: 0;
}

#home-app .home-header .header-login-btn,
#home-app .home-header .header-register-btn {
  flex-shrink: 0;
  height: 2.5rem;
  min-width: 6rem;
  padding: 0 0.5rem;
  border-radius: 0.5rem;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
}

#home-app .home-header .header-login-btn {
  margin-left: auto;
  max-width: 9rem;
  border: 2px solid rgb(255 255 255 / 0.2);
  background: transparent;
  color: rgb(var(--primary));
}

#home-app .home-header .header-register-btn {
  margin-left: 0.25rem;
  max-width: 8rem;
  border: none;
  background: rgb(var(--brand));
  color: #000;
}

.game-tabs-scroll svg,
.tabbar svg {
  display: block;
}

#page-content {
  padding-bottom: 0.5rem;
}

.home-shell {
  overflow: hidden;
  padding-left: 1rem;
  padding-right: 1rem;
}

.home-banner {
  position: relative;
  height: 14.375rem;
  width: 100%;
  overflow: hidden;
  border-radius: 0.5rem;
  padding-left: 0.625rem;
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
  background: linear-gradient(317deg, rgb(41, 45, 46) 40.85%, rgb(74, 83, 84) 109.03%);
}

.home-banner > img {
  position: absolute;
  right: 0;
  top: 0;
  height: 100%;
  width: auto;
  max-width: none;
}

.home-banner-content {
  position: relative;
  z-index: 1;
}

/* Banner 按钮需覆盖 #home-app button 全局重置，对齐原站样式 */
#home-app .home-banner .banner-reg-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 2rem;
  width: 8.5rem;
  margin-top: 0.75rem;
  padding: 0;
  border: none;
  border-radius: 0.5rem;
  background-color: rgb(var(--brand));
  color: #000;
  font-size: 0.875rem;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
}

#home-app .home-banner .banner-social-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  height: 2rem;
  width: 5.5rem;
  flex: none;
  padding: 0;
  border-radius: 0.5rem;
  border: 1px solid rgb(var(--third));
  background-color: #0000000d;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  font-size: 0.75rem;
  line-height: 1;
  color: rgb(var(--primary));
  cursor: pointer;
}

#home-app .home-banner .banner-social-btn img {
  display: block;
  width: 0.875rem;
  height: 0.875rem;
  flex-shrink: 0;
}

#home-app .home-banner .banner-social-tg {
  position: relative;
  overflow: hidden;
}

#home-app .home-banner .banner-social-tg > div {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
}

.game-tabs-scroll {
  display: flex;
  gap: 0.25rem;
  overflow-x: auto;
  scrollbar-width: none;
  margin-bottom: 0.25rem;
}

.game-tabs-scroll::-webkit-scrollbar {
  display: none;
}

.game-sections {
  padding-bottom: 0.5rem;
}

.game-card-meta {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 0.125rem;
  padding: 0.35rem 0.4rem;
  font-size: 0.6875rem;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  color: #fff;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.72));
}

.game-card-meta .online-row {
  display: inline-flex;
  align-items: center;
  gap: 0.125rem;
}

.game-card-meta svg {
  width: 0.75rem;
  height: 0.75rem;
  fill: #fff;
  flex-shrink: 0;
}

.tabbar {
  max-width: 640px;
  left: 50% !important;
  transform: translateX(-50%);
  padding-bottom: env(safe-area-inset-bottom, 0);
  z-index: 60;
}

.tabbar .active-tab .tab-label {
  color: rgb(var(--primary));
  font-weight: 800;
}

.tabbar .active-tab svg {
  fill: rgb(var(--brand));
}

#login-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.65);
}

#login-modal.show {
  display: flex;
}

.login-dialog {
  width: 100%;
  max-width: 24rem;
  border-radius: 0.75rem;
  overflow: hidden;
  background: rgb(var(--layer2));
  border: 1px solid rgb(var(--third));
}

.login-dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 3.5rem;
  padding: 0 1rem;
  border-bottom: 1px solid rgb(var(--third));
  background: rgb(var(--layer2));
}

.login-dialog-head h3 {
  font-size: 1rem;
  font-weight: 800;
}

.login-close {
  width: 2rem;
  height: 2rem;
  border-radius: 0.5rem;
  background: rgb(var(--layer5));
  font-size: 1.25rem;
  line-height: 2rem;
  text-align: center;
}

.login-dialog-body {
  padding: 1rem;
}

.login-tabs {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid rgb(var(--third));
}

.login-tab {
  padding: 0.5rem 0;
  font-weight: 700;
  color: rgb(var(--tertiary));
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

.login-tab.active {
  color: rgb(var(--primary));
  border-bottom-color: rgb(var(--brand));
}

.login-panel {
  display: none;
}

.login-panel.active {
  display: block;
}

.login-field {
  margin-bottom: 0.75rem;
}

.login-field label,
.login-field .input-label {
  display: block;
  margin-bottom: 0.375rem;
  font-size: 0.8125rem;
  color: rgb(var(--secondary));
}

.login-field input {
  width: 100%;
  padding: 0.75rem;
  border-radius: 0.5rem;
  border: 1px solid rgb(var(--third));
  background: rgb(var(--layer1));
  color: rgb(var(--primary));
  font-size: 0.875rem;
  outline: none;
  box-sizing: border-box;
}

.login-field input:focus {
  border-color: rgb(var(--brand));
}

.captcha-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.captcha-row input {
  flex: 1;
  min-width: 0;
}

#captcha-canvas {
  flex-shrink: 0;
  width: 6.25rem;
  height: 2.5rem;
  border-radius: 0.5rem;
  border: 1px solid rgb(var(--third));
  background: rgb(var(--layer1));
  cursor: pointer;
}

.captcha-refresh {
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.5rem;
  border: 1px solid rgb(var(--third));
  background: rgb(var(--layer4));
  color: rgb(var(--primary));
  font-size: 1.125rem;
  line-height: 1;
}

.login-submit {
  width: 100%;
  margin-top: 0.25rem;
  padding: 0.75rem;
  border-radius: 0.5rem;
  background: rgb(var(--brand));
  color: #000;
  font-size: 0.9375rem;
  font-weight: 800;
}

.login-submit:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.login-err {
  display: none;
  margin-top: 0.625rem;
  padding: 0.625rem;
  border-radius: 0.5rem;
  background: rgba(255, 80, 80, 0.15);
  color: #ff8a8a;
  font-size: 0.8125rem;
  text-align: center;
}

.login-err.show {
  display: block;
}

body.entry-modal-open,
body.login-modal-open {
  overflow: hidden;
}

.entry-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 1.125rem 0.875rem calc(1.125rem + env(safe-area-inset-bottom));
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
}

.entry-modal.show {
  opacity: 1;
  pointer-events: auto;
}

.entry-shell {
  position: relative;
  width: 92vw;
  max-width: 22.5rem;
  max-height: calc(100vh - 2.125rem);
  overflow: auto;
  overflow-x: hidden;
  border: 1px solid rgba(36, 238, 137, 0.28);
  border-radius: 0.5rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03)),
    #202228;
  box-shadow: 0 1.125rem 3.25rem rgba(0, 0, 0, 0.55);
}

#entry-modal .guide-head {
  padding: 1.125rem 2.75rem 0.75rem 1rem;
}

#entry-modal .guide-head h2 {
  margin: 0 0 0.4375rem;
  font-size: 1.25rem;
  line-height: 1.2;
  font-weight: 800;
}

#entry-modal .guide-head p {
  margin: 0;
  color: rgb(var(--secondary));
  font-size: 0.8125rem;
  line-height: 1.55;
}

#entry-modal .league-card {
  position: relative;
  overflow: hidden;
  margin: 0 0.875rem 0.75rem;
  padding: 0.875rem;
  border: 1px solid rgba(36, 238, 137, 0.3);
  border-radius: 0.5rem;
  background:
    linear-gradient(135deg, rgba(36, 238, 137, 0.24), rgba(36, 238, 137, 0.06) 44%, rgba(0, 0, 0, 0.18)),
    #1b1d24;
}

#entry-modal .league-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(36, 238, 137, 0.12), transparent 42%),
    radial-gradient(circle at 80% 70%, rgba(36, 238, 137, 0.08), transparent 38%);
  opacity: 0.55;
  pointer-events: none;
}

#entry-modal .league-top,
#entry-modal .league-bonus,
#entry-modal .league-matches {
  position: relative;
  z-index: 1;
}

#entry-modal .league-top {
  display: grid;
  grid-template-columns: 1fr 4.5rem;
  gap: 0.625rem;
  align-items: center;
}

#entry-modal .league-kicker {
  display: inline-flex;
  align-items: center;
  min-height: 1.5rem;
  padding: 0.1875rem 0.5625rem;
  margin-bottom: 0.5rem;
  border: 1px solid rgba(36, 238, 137, 0.42);
  border-radius: 999px;
  color: rgb(var(--brand));
  background: rgba(0, 0, 0, 0.28);
  font-size: 0.75rem;
}

#entry-modal .league-card h3 {
  margin: 0;
  color: #fff;
  font-size: 1.5rem;
  line-height: 1.1;
  font-weight: 800;
}

#entry-modal .league-card > .league-top p {
  margin: 0.5rem 0 0;
  color: rgba(248, 245, 239, 0.82);
  font-size: 0.75rem;
  line-height: 1.5;
}

#entry-modal .league-icon {
  display: grid;
  place-items: center;
  width: 4.5rem;
  height: 4.5rem;
  filter: drop-shadow(0 0.625rem 1rem rgba(0, 0, 0, 0.32));
}

#entry-modal .league-icon svg {
  width: 4.5rem;
  height: 4.5rem;
  fill: rgb(var(--brand));
}

#entry-modal .league-bonus {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-top: 0.875rem;
}

#entry-modal .league-bonus span {
  display: grid;
  place-items: center;
  min-height: 2.875rem;
  padding: 0.375rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.5rem;
  color: rgb(var(--brand));
  background: rgba(0, 0, 0, 0.22);
  font-size: 0.75rem;
  line-height: 1.25;
  text-align: center;
  font-weight: 700;
}

#entry-modal .league-matches {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin-top: 0.625rem;
}

#entry-modal .league-matches span {
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
  color: #dfe3eb;
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.6875rem;
}

#entry-modal .activity-visual {
  display: grid;
  gap: 0.625rem;
  padding: 0 0.875rem 0.875rem;
}

#entry-modal .activity-visual img {
  width: 100%;
  border-radius: 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

#entry-modal .activity-main {
  aspect-ratio: 1050 / 396;
  object-fit: cover;
}

#entry-modal .activity-note {
  display: grid;
  grid-template-columns: 2.625rem 1fr;
  gap: 0.625rem;
  align-items: center;
  margin: 0 0.875rem 0.875rem;
  padding: 0.625rem;
  border: 1px solid rgba(36, 238, 137, 0.22);
  border-radius: 0.5rem;
  background: rgba(0, 0, 0, 0.22);
}

#entry-modal .activity-note > span {
  display: grid;
  place-items: center;
  width: 2.625rem;
  height: 2.625rem;
}

#entry-modal .activity-note svg {
  width: 2.625rem;
  height: 2.625rem;
  fill: rgb(var(--brand));
}

#entry-modal .activity-note strong {
  display: block;
  margin-bottom: 0.1875rem;
  font-size: 0.875rem;
}

#entry-modal .activity-note div > span {
  color: rgb(var(--secondary));
  font-size: 0.75rem;
  line-height: 1.4;
}

#entry-modal .guide-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.625rem;
  padding: 0 0.875rem 0.875rem;
}

#entry-modal .entry-btn-secondary,
#entry-modal .entry-btn-primary {
  min-height: 2.625rem;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 800;
  cursor: pointer;
}

#entry-modal .entry-btn-secondary {
  border: 1px solid rgba(36, 238, 137, 0.35);
  color: rgb(var(--brand));
  background: rgba(0, 0, 0, 0.28);
}

#entry-modal .entry-btn-primary {
  border: none;
  color: #000;
  background: linear-gradient(180deg, #5dffaa, rgb(var(--brand)));
  box-shadow: 0 0.625rem 1.5rem rgba(36, 238, 137, 0.24);
}
