/* Home page module */

.home {
  padding: 0 20px 90px;
}

.home-section {
  margin-top: 15px;
}

.home-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px 0 8px;
}

.home-header__logo {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--md-outline);
  box-shadow: 0 4px 14px rgba(255, 71, 87, 0.14);
}

.home-header__title {
  font-size: 22px;
  font-weight: 800;
}

.home-main-card {
  margin: 10px 0 15px;
  padding: 20px 24px 10px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.home-main-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.home-status-title {
  font-size: 38px;
  font-weight: 900;
  line-height: 1.1;
}

.home-status-title--brand {
  background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.home-status-title--ok {
  background: linear-gradient(135deg, #2ED573, #1E8449);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.home-status-sub {
  font-size: 15px;
  color: var(--md-text-3);
  line-height: 1.5;
}

.home-count-row {
  display: flex;
  align-items: center;
  gap: 4px;
}

.home-count {
  color: var(--brand-1);
  font-weight: 900;
}

.home-info-icon {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--md-text-3) 18%, transparent);
  border: 1px solid color-mix(in srgb, var(--md-text-3) 42%, transparent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: transform var(--md-dur-2) var(--md-ease), filter var(--md-dur-2) var(--md-ease);
  animation: homeInfoIconJump 1.2s cubic-bezier(0.22, 0.61, 0.36, 1) infinite;
}

.home-info-icon:hover {
  transform: scale(1.06);
  filter: brightness(1.03);
}

.home-tooltip {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  background: rgba(0, 0, 0, 0.82);
  color: white;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all var(--md-dur-2) var(--md-ease);
  pointer-events: none;
  z-index: 1000;
}

.home-info-icon:hover .home-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(-10px);
}

.home-time-panel {
  display: none;
  width: max-content;
  min-width: 130px;
  text-align: right;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 7px;
  margin-left: auto;
  margin-top: 30px;
  margin-right: 10px;
}

.home-time {
  width: 100%;
  font-size: 33px;
  font-weight: 800;
  color: color-mix(in srgb, var(--md-text-3) 70%, transparent);
  line-height: 1;
  text-align: right;
}

.home-cost {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  width: 100%;
  gap: 6px;
  font-size: 16px;
  color: color-mix(in srgb, var(--brand-1) 55%, var(--md-text-3));
  font-weight: 800;
  white-space: nowrap;
}

.home-cost i,
.home-cost span {
  line-height: 1;
}

.home-cost i {
  width: 16px;
  min-width: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.home-cost span {
  font-size: 16px;
  font-weight: 800;
}

.home-cost.status-jumping i {
  animation: homeCostIconJump 1.15s cubic-bezier(0.22, 0.61, 0.36, 1) infinite;
  transform-origin: center bottom;
}

.home-cost--daypass {
  color: color-mix(in srgb, #2ED573 78%, var(--md-surface));
}

.home-cost--overnight {
  color: color-mix(in srgb, #6C5CE7 80%, var(--md-surface));
}

.home-cost--enter {
  color: color-mix(in srgb, #1677FF 78%, var(--md-surface));
}

.home-cost--fortune-night {
  color: color-mix(in srgb, #C0392B 80%, var(--md-surface));
}

@keyframes homeCostIconJump {
  0%, 100% {
    transform: translateY(0);
  }

  22% {
    transform: translateY(-2px);
  }

  42% {
    transform: translateY(-4px);
  }

  58% {
    transform: translateY(0);
  }

  72% {
    transform: translateY(-1px);
  }
}

@keyframes homeInfoIconJump {
  0%, 100% {
    transform: translateY(0);
  }

  20% {
    transform: translateY(-1px);
  }

  42% {
    transform: translateY(-3px);
  }

  58% {
    transform: translateY(0);
  }

  74% {
    transform: translateY(-1px);
  }
}

.home-user-card {
  margin: 0 0 15px;
  padding: 20px;
}

.home-user-row {
  display: flex;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
}

.home-user-row .md-chip {
  width: fit-content;
  max-width: 100%;
}

.home-user-row .md-chip span {
  white-space: nowrap;
}

.home-avatar {
  width: 60px;
  height: 60px;
  border-radius: 999px;
  border: 3px solid color-mix(in srgb, var(--brand-1) 20%, transparent);
  box-shadow: 0 6px 16px rgba(255, 71, 87, 0.16);
  object-fit: cover;
}

.home-user-name {
  font-size: 18px;
  font-weight: 900;
  color: var(--md-text);
}

.home-section-title {
  font-size: 16px;
  font-weight: 900;
  color: var(--md-text);
  margin-bottom: 12px;
  padding-left: 5px;
}

.home-list {
  background: var(--md-surface);
  border: 1px solid var(--md-outline);
  border-radius: var(--md-r-md);
  box-shadow: var(--md-elev-1);
  overflow: hidden;
}

.home-list-item {
  padding: 15px;
  border-bottom: 1px solid color-mix(in srgb, var(--md-outline) 75%, transparent);
  transition: background var(--md-dur-2) var(--md-ease);
}

.home-list-item:last-child { border-bottom: none; }
.home-list-item:hover { background: color-mix(in srgb, var(--brand-1) 4%, transparent); }

/* List Content Helpers */
.home-list-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.home-list-text {
  font-size: 14px;
  color: var(--md-text);
  flex: 1;
}

/* FAQ */
.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
  font-size: 14px;
}

.faq-question .faq-chevron {
  color: var(--md-text-3);
  transition: transform var(--md-dur-2) var(--md-ease);
}

.faq-answer {
  display: none;
  font-size: 14px;
  color: var(--md-text-2);
  line-height: 1.6;
  padding: 8px 0 0 24px;
}

.faq-answer-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.faq-answer-item strong {
  color: var(--md-text-1);
  font-weight: 700;
}

.faq-item.is-open .faq-answer {
  display: block;
}

.faq-item.is-open .faq-question .faq-chevron {
  transform: rotate(180deg);
}

/* Modal Styling */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(var(--md-glass-blur)) saturate(var(--md-glass-sat)) brightness(var(--md-glass-bright));
  -webkit-backdrop-filter: blur(var(--md-glass-blur)) saturate(var(--md-glass-sat)) brightness(var(--md-glass-bright));
}

.modal-content-card {
  padding: 24px;
  width: 90%;
  max-width: 400px;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
  animation: modalSlideIn 0.3s var(--md-ease);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.modal-title {
  margin: 0;
  font-size: 18px;
  font-weight: 900;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Entry Method Modal */
.entry-modal-card {
  max-width: 468px;
  padding: 20px 18px 16px;
  background:
    radial-gradient(circle at 98% -14%, color-mix(in srgb, var(--brand-1) 12%, transparent), transparent 40%),
    var(--md-surface);
}

.entry-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
}

.entry-modal-head {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 14px;
  padding-right: 34px;
}

.entry-modal-head-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--brand-1) 12%, var(--md-surface-2));
  border: 1px solid color-mix(in srgb, var(--brand-1) 26%, var(--md-outline));
  color: var(--brand-1);
  flex: 0 0 auto;
}

.entry-modal-head-main {
  min-width: 0;
}

.entry-modal-title {
  margin-bottom: 4px;
}

.entry-modal-subtitle {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--md-text-2);
}

.entry-option-list {
  display: grid;
  gap: 10px;
}

.entry-option {
  width: 100%;
  border: 1px solid color-mix(in srgb, var(--md-outline) 88%, transparent);
  border-radius: 14px;
  background: color-mix(in srgb, var(--md-surface-2) 82%, var(--md-surface));
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  cursor: pointer;
  transition:
    transform var(--md-dur-2) var(--md-ease),
    box-shadow var(--md-dur-2) var(--md-ease),
    border-color var(--md-dur-2) var(--md-ease),
    background var(--md-dur-2) var(--md-ease);
}

.entry-option:hover {
  transform: translateY(-1px);
  box-shadow: var(--md-elev-2);
}

.entry-option:active {
  transform: translateY(0);
}

.entry-option-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 14px;
  flex: 0 0 auto;
}

.entry-option-main {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
  flex: 1;
}

.entry-option-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.entry-option-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--md-text);
}

.entry-option-desc {
  font-size: 12px;
  color: var(--md-text-2);
  line-height: 1.5;
}

.entry-option-meta {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.entry-option-chip {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  color: var(--brand-1);
  background: var(--md-brand-soft);
}

.entry-option-chip--blue {
  color: #1677ff;
  background: color-mix(in srgb, #1677ff 14%, transparent);
}

.entry-option-chip--violet {
  color: #7c4dff;
  background: color-mix(in srgb, #7c4dff 16%, transparent);
}

.entry-option-chip--gray {
  color: var(--md-text-3);
  background: color-mix(in srgb, var(--md-text-3) 14%, transparent);
}

.entry-option-arrow {
  font-size: 12px;
  font-weight: 700;
  color: var(--md-text-3);
  flex: 0 0 auto;
}

.entry-option--daypass {
  border-color: color-mix(in srgb, var(--brand-1) 30%, var(--md-outline));
}

.entry-option--daypass .entry-option-icon {
  color: var(--brand-1);
  background: color-mix(in srgb, var(--brand-1) 14%, transparent);
}

.entry-option--monthpass {
  border-color: color-mix(in srgb, #1677ff 30%, var(--md-outline));
}

.entry-option--monthpass .entry-option-icon {
  color: #1677ff;
  background: color-mix(in srgb, #1677ff 14%, transparent);
}

.entry-option--points .entry-option-icon {
  color: var(--md-text-2);
  background: color-mix(in srgb, var(--md-text-3) 14%, transparent);
}

.entry-modal-footnote {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--md-outline) 78%, transparent);
  background: color-mix(in srgb, var(--md-surface-2) 72%, var(--md-surface));
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--md-text-2);
}

.entry-modal-footnote i {
  color: var(--brand-2);
  font-size: 12px;
}

/* Overnight Confirm Modal */
.overnight-modal-card {
  max-width: 440px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.overnight-head {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.overnight-head-icon {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--brand-1) 14%, transparent);
  color: var(--brand-1);
  flex: 0 0 auto;
}

.overnight-head-main {
  min-width: 0;
}

.overnight-title {
  margin-bottom: 4px;
}

.overnight-subtitle {
  margin: 0;
  font-size: 13px;
  color: var(--md-text-2);
  line-height: 1.5;
}

.overnight-note {
  border: 1px solid color-mix(in srgb, var(--md-outline) 72%, transparent);
  background: color-mix(in srgb, var(--md-brand-soft) 46%, var(--md-surface));
  border-radius: 12px;
  padding: 10px 12px;
  display: grid;
  gap: 8px;
}

.overnight-note-item {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: 12px;
  color: var(--md-text-2);
  line-height: 1.5;
}

.overnight-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand-1);
  margin-top: 6px;
  flex: 0 0 auto;
}

.overnight-actions {
  display: grid;
  gap: 8px;
}

@media (max-width: 420px) {
  .entry-modal-card,
  .overnight-modal-card {
    padding: 16px 14px 14px;
  }

  .entry-modal-head {
    margin-bottom: 12px;
    gap: 10px;
  }

  .entry-option-title-row {
    flex-wrap: wrap;
  }

  .entry-option-arrow {
    display: none;
  }
}

.online-player-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: var(--md-r-sm);
  background: color-mix(in srgb, var(--brand-1) 4%, var(--md-surface));
  border: 1px solid var(--md-outline);
}

.online-player-avatar-box {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  overflow: hidden;
  flex: 0 0 auto;
  border: 1px solid var(--md-outline);
}

.online-player-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(1.4px) saturate(1.05);
  transform: scale(1.06);
}

.online-player-name {
  font-size: 15px;
  font-weight: 800;
  color: var(--md-text);
  letter-spacing: 0.2px;
}

.online-player-time {
  font-size: 12px;
  color: var(--brand-1);
  font-weight: 800;
}

/* Animations */
@keyframes modalSlideIn {
  from { opacity: 0; transform: translateY(16px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes logoFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes lineGrow {
  from { height: 0; opacity: 0; }
  to { height: 40px; opacity: 1; }
}

@keyframes textSlideIn {
  from { transform: translateX(-20px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes logoPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

/* Splash Screen (Minimal Premium M3 Style) */
.splash {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: var(--md-bg) !important;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 40px;
  overflow: hidden;
}

.splash--exit {
  animation: splashExit 0.5s cubic-bezier(0.3, 0, 0, 1) forwards;
  pointer-events: none;
}

@keyframes splashExit {
  0% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.02); }
}

.splash-logo-box {
  position: relative;
  width: 80px;
  height: 80px;
  opacity: 0;
  transform: scale(0.92);
  animation: splashMinimalEnter 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) 0.1s forwards;
}

.splash-logo {
  width: 100%;
  height: 100%;
  border-radius: 22px;
  box-shadow: var(--md-elev-2);
  border: 1px solid var(--md-outline);
}

.splash-brand {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 12px;
  opacity: 0;
  transform: translateY(8px);
  animation: splashMinimalEnter 0.8s cubic-bezier(0.2, 0, 0, 1) 0.3s forwards;
}

@keyframes splashMinimalEnter {
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.splash-title {
  font-size: 32px;
  font-weight: 900;
  letter-spacing: 2px;
  color: var(--md-text);
  /* 移除渐变文字，改用纯粹的高对比色或微弱品牌色 */
}

.splash-subtitle {
  font-size: 12px;
  color: var(--md-text-3);
  letter-spacing: 0.4em;
  text-transform: uppercase;
}

.splash-loader-minimal {
  width: 100%;
  max-width: 240px;
  height: 2px;
  background: var(--md-outline);
  border-radius: 1px;
  position: relative;
  overflow: hidden;
  opacity: 0;
  animation: fadeIn 0.6s ease-out 0.6s forwards;
}

.splash-loader-minimal::after {
  content: '';
  position: absolute;
  left: -100%;
  top: 0;
  height: 100%;
  width: 100%;
  background: var(--brand-1);
  animation: splashLoaderMove 2s cubic-bezier(0.65, 0, 0.35, 1) infinite;
}

@keyframes splashLoaderMove {
  0% { left: -100%; width: 20%; }
  50% { left: 40%; width: 60%; }
  100% { left: 100%; width: 20%; }
}

@keyframes fadeIn { to { opacity: 1; } }

@media (min-width: 768px) {
  .home {
    max-width: 520px;
    margin: 0 auto;
  }
}
