/* 龙腾国际大厅风格 — 客户端首页 */
:root {
  --lt-primary: #e0a540;
  --lt-primary-text: #fcd68b;
  --lt-bg: #1b1a1c;
  --lt-card-bg: #232220;
  --lt-card-border: #7a6a61;
  --lt-header-bg: rgba(27, 26, 28, 0.92);
  --lt-header-border: #443e70;
  --lt-text: #fff;
  --lt-text-secondary: #dbdde5;
  --lt-placeholder: #6b758a;
  --lt-tab-active-bg: linear-gradient(180deg, #fbf5eb, #f0c996);
  --lt-tab-active-text: #3c280c;
  --lt-wallet-bg: linear-gradient(135deg, #3d3428 0%, #2a241c 55%, #1f1b16 100%);
}

body.bc-app.bc-lt-home {
  --bc-bg: var(--lt-bg);
  --bc-surface: var(--lt-card-bg);
  --bc-text: var(--lt-text);
  --bc-muted: var(--lt-text-secondary);
  --bc-border: var(--lt-card-border);
  --bc-primary: var(--lt-primary);
  --bc-primary-soft: rgba(224, 165, 64, 0.12);
  --pico-background-color: var(--lt-bg);
  --pico-card-background-color: var(--lt-card-bg);
  --pico-color: var(--lt-text);
  --pico-muted-color: var(--lt-text-secondary);

  background-color: var(--lt-bg);
  min-height: 100vh;
}

body.bc-lt-home .bc-main {
  max-width: 100%;
  padding: 0;
}

body.bc-lt-home .bc-tabbar {
  background: var(--lt-card-bg);
  border-top-color: var(--lt-card-border);
  box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.35);
}

body.bc-lt-home .bc-tabbar__item { color: var(--lt-text-secondary); }
body.bc-lt-home .bc-tabbar__item--active { color: var(--lt-primary); }

.lt-home {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - var(--tab-height) - var(--safe-bottom));
  background-image: url('/client/assets/lt/bg.png');
  background-size: 100% auto;
  background-repeat: repeat-y;
  background-color: var(--lt-bg);
}

/* 顶栏 */
.lt-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 52px;
  padding: 0 12px;
  background: var(--lt-header-bg);
}

.lt-head__logo img {
  max-width: 118px;
  max-height: 26px;
  display: block;
}

.lt-head__actions {
  display: none;
}

.lt-head__download,
.lt-head__notice img {
  height: 30px;
  display: block;
}

/* Banner 轮播 */
.lt-banner {
  padding: 10px 12px 6px;
}

.lt-banner__viewport {
  overflow: hidden;
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

.lt-banner__track {
  display: flex;
  transition: transform 0.45s ease;
  will-change: transform;
}

.lt-banner__slide {
  flex: 0 0 100%;
  line-height: 0;
}

.lt-banner__slide img {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 750 / 280;
  object-fit: cover;
  background: #151515;
}

.lt-banner__dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 8px;
}

.lt-banner__dot {
  width: 6px;
  height: 6px;
  border: none;
  border-radius: 50%;
  padding: 0;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
}

.lt-banner__dot--active {
  width: 14px;
  border-radius: 999px;
  background: var(--lt-primary);
}

/* 公告滚动 */
.lt-ticker {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 12px 10px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(35, 34, 32, 0.88);
  border: 1px solid rgba(122, 106, 97, 0.45);
  overflow: hidden;
}

.lt-ticker__icon {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  object-fit: contain;
}

.lt-ticker__wrap {
  flex: 1;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.lt-ticker__text {
  margin: 0;
  white-space: nowrap;
  font-size: 0.78rem;
  color: var(--lt-text-secondary);
  animation: lt-marquee 18s linear infinite;
}

@keyframes lt-marquee {
  0% { transform: translateX(100%); }
  100% { transform: translateX(-100%); }
}

/* 钱包区 */
.lt-wallet {
  padding: 0 12px 10px;
}

.lt-wallet__panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--lt-wallet-bg);
  border: 1px solid rgba(224, 165, 64, 0.25);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.lt-wallet__user {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.lt-wallet__name {
  font-size: 0.82rem;
  color: var(--lt-text);
  margin-bottom: 2px;
}

.lt-wallet__balance {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.95rem;
  color: var(--lt-primary);
}

.lt-wallet__balance strong {
  font-size: 1.05rem;
}

.lt-wallet__refresh {
  border: none;
  background: none;
  padding: 0;
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.lt-wallet__refresh img {
  width: 100%;
  height: 100%;
  display: block;
}

.lt-wallet__actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.lt-wallet__action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 42px;
  text-decoration: none;
  color: var(--lt-primary-text);
  font-size: 0.62rem;
}

.lt-wallet__action img {
  width: 34px;
  height: 34px;
  display: block;
}

/* 主体：侧栏 + 内容 */
.lt-body {
  flex: 1;
  display: flex;
  gap: 8px;
  padding: 0 8px 12px;
  min-height: 0;
}

.lt-sidebar {
  flex-shrink: 0;
  width: 62px;
  display: flex;
  flex-direction: column;
  gap: 0;
  justify-content: flex-start !important; /* 覆盖 Pico 对 nav 的 space-between */
}

.lt-sidebar__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 8px;
  padding: 0;
  min-height: 0;
  background: transparent;
  cursor: pointer;
  line-height: 0;
  width: 58px;
  height: 72px;
}

.lt-sidebar__item + .lt-sidebar__item {
  margin-top: 24px; /* 约 1/3 图标高度（按 72px 计） */
}

.lt-sidebar__item img {
  width: 58px !important;
  height: 72px !important;
  display: block;
}

.lt-sidebar__item--active img {
  filter: brightness(1.08);
}

.lt-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* 搜索栏 */
.lt-search {
  display: flex;
  align-items: stretch;
  gap: 8px;
  margin-bottom: 8px;
}

.lt-search__field {
  flex: 1;
  display: block;
  background: var(--lt-card-bg);
  border-radius: 6px;
  border: 1px solid rgba(122, 106, 97, 0.4);
  overflow: hidden;
  height: 34px;
  padding: 0;
  box-sizing: border-box;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.lt-search__field:focus-within {
  border-color: var(--lt-primary);
  box-shadow: 0 0 0 1px rgba(224, 165, 64, 0.35);
}

/* 彻底覆盖 Pico 对 input 的默认样式，避免 focus 蓝框错位 */
body.bc-lt-home .lt-search__input {
  display: block;
  width: 100%;
  height: 100%;
  margin: 0 !important;
  padding: 0 10px !important;
  border: none !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: var(--lt-text) !important;
  font-size: 13px !important;
  line-height: 34px !important;
  box-shadow: none !important;
  outline: none !important;
  min-height: 0 !important;
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
}

body.bc-lt-home .lt-search__input:focus,
body.bc-lt-home .lt-search__input:focus-visible {
  outline: none !important;
  box-shadow: none !important;
  border: none !important;
}

body.bc-lt-home .lt-search__input::placeholder {
  color: var(--lt-placeholder);
}

.lt-search__star {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--lt-card-bg);
  border: 1px solid rgba(122, 106, 97, 0.4);
  border-radius: 6px;
  cursor: pointer;
  padding: 0 !important;
  margin: 0 !important;
  box-shadow: none !important;
}

.lt-search__star img {
  width: 14px;
  height: auto;
}

/* 游戏网格 */
.lt-content {
  flex: 1;
  overflow-y: auto;
}

.lt-game-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
}

.lt-game-item {
  position: relative;
  width: calc(50% - 4px);
  background: var(--lt-card-bg);
  border: 1px solid var(--lt-card-border);
  border-radius: 6px;
  padding: 5px 5px 0;
  margin-bottom: 8px;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
}

.lt-game-item:active { opacity: 0.92; }

.lt-game-item__recommend {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 36px;
  z-index: 1;
}

.lt-game-item__img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  border-radius: 4px;
  display: block;
  background: rgba(0, 0, 0, 0.18);
}

.lt-game-item__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 32px;
  padding: 0 5px;
}

.lt-game-item__name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 0.68rem;
  color: var(--lt-text);
}

.lt-game-item__star {
  flex-shrink: 0;
  width: 14px;
  height: 13px;
  margin-left: 4px;
  background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAZCAYAAAAiwE4nAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAOdEVYdFNvZnR3YXJlAEZpZ21hnrGWYwAAAZtJREFUeAG9ljFywkAMRSU1TDpuEHKD5AbkBMAJMlTApAg0ARpsk5kAFXTgCo7ADeAGMSeIj0CdmVjRGuNxHBzMGO8rWHtHux/JK60QYryN5mVGqjBwVV5Lh1l0ENjxmC2z33Kz2GP0ZTixp8zchn9AhNmg2+yY5rJIN19GWvs/gtbY/gDge0gFOocxvb3RazyoJ1I/yrP0i49Cl9kPJ4upL22O5iVE/AQNSPgfiRAN0AQCVokRLwhNZsUKiZ/6BCVtCDRD4uYedCFahAwOaEJpEQPsQBPMsCPJjTVoQurt2i9tw/FiI56WIV9co9e880+pquqQMxhohMU7Ty9FZDXoNevqOcxDr1CoyeDC9XGjEQwFzU59z/Rdu3Zeqj2jl/CvSmO+PjvscQeuhGRAXe0ZncNThubErkqLsJRzXIQsYv3WKj6PSQuCe3IDYZ+SGtcPY8yzI4nFW8VdXZjSk6QuDPLvt2pNklhgcx7j3W4T8QskeSsHzQO0rG5jdm6vVIIKP8QySBv2FNtgdaodzCwYF5bvexsIbS9Z/wObhL6AUUiHpwAAAABJRU5ErkJggg==") center / contain no-repeat;
}

.lt-empty {
  width: 100%;
  text-align: center;
  padding: 40px 12px;
  color: var(--lt-text-secondary);
  font-size: 0.85rem;
}

@media (min-width: 480px) {
  body.bc-lt-home .bc-main,
  .lt-home {
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
  }
}

@media (max-width: 360px) {
  .lt-wallet__action span { font-size: 0.58rem; }
  .lt-wallet__action img { width: 30px; height: 30px; }
  .lt-sidebar { width: 56px; }
}
