/* Premium landscape customer service — gaming hall style */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg-deep: #120c08;
  --bg-mid: #1e1410;
  --panel-bg: linear-gradient(165deg, rgba(38, 26, 18, 0.97) 0%, rgba(22, 15, 10, 0.98) 100%);
  --card-bg: linear-gradient(180deg, #2a1e16 0%, #1c1410 100%);
  --card-hover: linear-gradient(180deg, #35261c 0%, #221810 100%);
  --gold: #c8962c;
  --gold-light: #f0d080;
  --gold-dim: #7a5a20;
  --gold-border: rgba(212, 168, 67, 0.55);
  --gold-glow: rgba(212, 168, 67, 0.15);
  --text: #f5ebe0;
  --text-sub: #a89480;
  --online: #4cd964;
  --radius: 8px;
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg-deep);
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

/* Background scene */
.scene {
  position: relative;
  width: 100%;
  height: 100%;
  height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  padding: max(10px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  background:
    radial-gradient(ellipse 70% 80% at 50% 50%, #241810 0%, var(--bg-deep) 72%),
    repeating-linear-gradient(
      -45deg,
      transparent,
      transparent 18px,
      rgba(212, 168, 67, 0.015) 18px,
      rgba(212, 168, 67, 0.015) 19px
    );
}

.scene-glow {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(60px);
}

.scene-glow--left {
  width: 200px;
  height: 200px;
  top: -40px;
  left: -40px;
  background: rgba(180, 100, 30, 0.12);
}

.scene-glow--right {
  width: 180px;
  height: 180px;
  bottom: -30px;
  right: -30px;
  background: rgba(120, 60, 20, 0.1);
}

/* Main panel */
.panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 920px;
  height: 100%;
  max-height: 340px;
  display: flex;
  flex-direction: column;
  background: var(--panel-bg);
  border: 1px solid var(--gold-border);
  border-radius: 12px;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.5) inset,
    0 20px 60px rgba(0, 0, 0, 0.65),
    0 0 40px var(--gold-glow);
  overflow: hidden;
}

.panel::before,
.panel::after {
  content: "";
  position: absolute;
  width: 24px;
  height: 24px;
  border-color: var(--gold-light);
  border-style: solid;
  opacity: 0.7;
  pointer-events: none;
}

.panel::before {
  top: 6px;
  left: 6px;
  border-width: 2px 0 0 2px;
}

.panel::after {
  bottom: 6px;
  right: 6px;
  border-width: 0 2px 2px 0;
}

/* Header */
.panel-head {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 14px 20px 12px;
  border-bottom: 1px solid rgba(212, 168, 67, 0.2);
  background: linear-gradient(180deg, rgba(212, 168, 67, 0.08) 0%, transparent 100%);
}

.head-deco {
  width: 60px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold));
  position: relative;
}

.head-deco--right {
  background: linear-gradient(90deg, var(--gold), transparent);
}

.head-deco::after {
  content: "";
  position: absolute;
  top: -3px;
  width: 7px;
  height: 7px;
  border: 1px solid var(--gold);
  transform: rotate(45deg);
  background: var(--bg-mid);
}

.head-deco--left::after { right: 0; }
.head-deco--right::after { left: 0; }

.head-center {
  text-align: center;
  padding: 0 16px;
}

.head-center h1 {
  font-size: 20px;
  font-weight: 700;
  color: var(--gold-light);
  letter-spacing: 0.18em;
  text-shadow: 0 1px 8px rgba(212, 168, 67, 0.35);
}

.head-center p {
  margin-top: 3px;
  font-size: 11px;
  color: var(--text-sub);
  letter-spacing: 0.1em;
}

.head-time {
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  color: var(--text-sub);
  letter-spacing: 0.04em;
}

.time-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--online);
  box-shadow: 0 0 8px rgba(76, 217, 100, 0.7);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* Grid body + pagination */
.panel-body {
  flex: 1;
  min-height: 0;
  padding: 10px 8px 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.grid-viewport {
  flex: 1;
  min-width: 0;
  height: 100%;
  overflow: hidden;
}

.service-grid {
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 10px;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.service-grid.is-switching {
  opacity: 0;
  transform: translateX(8px);
}

.service-grid.is-switching--back {
  transform: translateX(-8px);
}

.page-btn {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(212, 168, 67, 0.35);
  border-radius: 50%;
  background: rgba(212, 168, 67, 0.08);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, opacity 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.page-btn svg {
  width: 16px;
  height: 16px;
  stroke: var(--gold-light);
  fill: none;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.page-btn:active:not(:disabled) {
  background: rgba(212, 168, 67, 0.2);
  border-color: var(--gold-border);
}

.page-btn:disabled {
  opacity: 0.25;
  cursor: not-allowed;
}

/* Pager bar */
.pager {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 2px 16px 4px;
}

.pager-dots {
  display: flex;
  align-items: center;
  gap: 6px;
}

.pager-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(212, 168, 67, 0.25);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

.pager-dot.is-active {
  background: var(--gold-light);
  transform: scale(1.25);
  box-shadow: 0 0 8px rgba(240, 208, 128, 0.45);
}

.pager-info {
  font-size: 10px;
  color: var(--text-sub);
  letter-spacing: 0.08em;
  min-width: 36px;
}

/* Service card */
.service-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  background: var(--card-bg);
  border: 1px solid rgba(212, 168, 67, 0.22);
  border-radius: var(--radius);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) inset;
}

.service-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 12px;
  right: 12px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(240, 208, 128, 0.35), transparent);
}

.service-card:active {
  background: var(--card-hover);
  border-color: var(--gold-border);
  box-shadow: 0 0 16px var(--gold-glow), 0 2px 8px rgba(0, 0, 0, 0.3) inset;
  transform: scale(0.98);
}

.card-num {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #4a3828, #2a1e14);
  border: 1.5px solid var(--gold-dim);
  box-shadow: 0 0 12px rgba(212, 168, 67, 0.12);
  font-size: 14px;
  font-weight: 700;
  color: var(--gold-light);
  letter-spacing: 0;
}

.card-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.card-name {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.card-status {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  color: var(--text-sub);
}

.status-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--online);
  box-shadow: 0 0 6px rgba(76, 217, 100, 0.6);
}

.card-arrow {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  opacity: 0.35;
}

.card-arrow svg {
  width: 100%;
  height: 100%;
  stroke: var(--gold-light);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.service-card:active .card-arrow {
  opacity: 0.8;
}

/* Footer */
.panel-foot {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 8px 16px 10px;
}

.foot-line {
  flex: 1;
  max-width: 80px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(212, 168, 67, 0.25));
}

.foot-line:last-child {
  background: linear-gradient(90deg, rgba(212, 168, 67, 0.25), transparent);
}

.panel-foot p {
  font-size: 10px;
  color: var(--text-sub);
  letter-spacing: 0.06em;
  white-space: nowrap;
  opacity: 0.75;
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(8, 5, 3, 0.82);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s, visibility 0.25s;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  width: 100%;
  max-width: 340px;
  background: linear-gradient(165deg, #2e2118, #1a120c);
  border: 1px solid var(--gold-border);
  border-radius: 10px;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.7);
  overflow: hidden;
}

.modal-top {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(212, 168, 67, 0.18);
  background: linear-gradient(180deg, rgba(212, 168, 67, 0.1), transparent);
}

.modal-badge {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #4a3828, #2a1e14);
  border: 1.5px solid var(--gold-dim);
  font-size: 13px;
  font-weight: 700;
  color: var(--gold-light);
}

.modal-top h2 {
  flex: 1;
  font-size: 16px;
  font-weight: 600;
  color: var(--gold-light);
  letter-spacing: 0.1em;
}

.modal-close {
  width: 28px;
  height: 28px;
  border: 1px solid rgba(212, 168, 67, 0.3);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  position: relative;
}

.modal-close::before,
.modal-close::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 12px;
  height: 1.5px;
  background: var(--text-sub);
  transform: translate(-50%, -50%) rotate(45deg);
}

.modal-close::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.modal-content {
  padding: 16px;
}

.modal-tip {
  font-size: 12px;
  color: var(--text-sub);
  line-height: 1.7;
  margin-bottom: 14px;
}

.modal-qq-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(212, 168, 67, 0.15);
  border-radius: var(--radius);
}

.modal-qq-row span {
  font-size: 12px;
  color: var(--text-sub);
}

.modal-qq-row strong {
  font-size: 16px;
  color: var(--gold-light);
  letter-spacing: 0.06em;
}

.modal-btn {
  width: 100%;
  margin-top: 14px;
  padding: 12px;
  border: none;
  border-radius: var(--radius);
  background: linear-gradient(180deg, #e8c050 0%, #b8861a 100%);
  color: #2a1808;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.14em;
  cursor: pointer;
  font-family: inherit;
  box-shadow: 0 4px 12px rgba(184, 134, 26, 0.35);
}

.modal-btn:active {
  filter: brightness(0.92);
  transform: scale(0.98);
}

/* Portrait hint */
.rotate-hint {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 999;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: var(--bg-deep);
  color: var(--text-sub);
  font-size: 14px;
}

.rotate-phone {
  width: 52px;
  height: 32px;
  border: 2px solid var(--gold);
  border-radius: 4px;
  animation: rotate-phone 2.4s ease-in-out infinite;
}

@keyframes rotate-phone {
  0%, 100% { transform: rotate(0deg); }
  40%, 60% { transform: rotate(90deg); }
}

@media (orientation: portrait) {
  .rotate-hint { display: flex; }
  .scene { display: none; }
}

/* Compact landscape */
@media (max-height: 340px) {
  .panel { max-height: 100%; border-radius: 8px; }
  .head-center h1 { font-size: 17px; }
  .head-time { display: none; }
  .panel-body { padding: 8px 4px 4px; gap: 4px; }
  .page-btn { width: 28px; height: 28px; }
  .service-grid { gap: 8px; }
  .pager { padding: 0 12px 2px; }
  .card-num { width: 32px; height: 32px; font-size: 12px; }
  .card-name { font-size: 13px; }
}

@media (min-width: 780px) {
  .panel { max-height: 360px; }
  .head-center h1 { font-size: 22px; }
  .service-grid { gap: 12px; }
  .card-num { width: 42px; height: 42px; font-size: 15px; }
  .card-name { font-size: 15px; }
}
