/* =============================================
   撈女日記 - Hong Kong Hustle
   Hong Kong Neon Cyberpunk Aesthetic
   ============================================= */

/* === CSS Variables === */
:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #12121a;
  --bg-card: #1a1a2e;
  --bg-card-hover: #222240;
  --neon-pink: #ff2d95;
  --neon-cyan: #00f0ff;
  --neon-yellow: #ffe600;
  --neon-green: #39ff14;
  --neon-red: #ff3131;
  --neon-purple: #b44dff;
  --neon-orange: #ff6b2b;
  --text-primary: #e0e0e0;
  --text-secondary: #8888aa;
  --text-dim: #555577;
  --border-color: #2a2a4a;
  --glow-pink: 0 0 10px rgba(255, 45, 149, 0.5), 0 0 20px rgba(255, 45, 149, 0.3);
  --glow-cyan: 0 0 10px rgba(0, 240, 255, 0.5), 0 0 20px rgba(0, 240, 255, 0.3);
  --glow-yellow: 0 0 10px rgba(255, 230, 0, 0.5), 0 0 20px rgba(255, 230, 0, 0.3);
  --font-zh: "Noto Serif TC", "PingFang TC", "Microsoft JhengHei", serif;
  --font-ui: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", -apple-system, sans-serif;
  --transition-fast: 0.15s ease;
  --transition-normal: 0.3s ease;
}

/* === Reset & Base === */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-ui);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

#app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  position: relative;
  overflow: hidden;
}

/* === Screens === */
.screen {
  display: none;
  min-height: 100vh;
  min-height: 100dvh;
  position: relative;
  flex-direction: column;
}

.screen.active {
  display: flex;
}

/* === Title Screen === */
#screen-title {
  justify-content: center;
  align-items: center;
  text-align: center;
  overflow: hidden;
}

.title-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: url('../images/hk-skyline.png') center bottom / cover no-repeat;
  opacity: 0.35;
}

.skyline {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40%;
  background:
    /* Buildings - varying heights */
    linear-gradient(to top, #0f0f1a 0%, transparent 100%),
    /* Building 1 */
    linear-gradient(to bottom, transparent 30%, #1a1a2e 30%, #1a1a2e 100%) no-repeat 5% bottom / 8% 70%,
    linear-gradient(to bottom, transparent 45%, #151528 45%, #151528 100%) no-repeat 15% bottom / 6% 55%,
    linear-gradient(to bottom, transparent 20%, #1e1e35 20%, #1e1e35 100%) no-repeat 23% bottom / 10% 80%,
    linear-gradient(to bottom, transparent 35%, #181830 35%, #181830 100%) no-repeat 35% bottom / 7% 65%,
    linear-gradient(to bottom, transparent 15%, #1c1c32 15%, #1c1c32 100%) no-repeat 44% bottom / 12% 85%,
    linear-gradient(to bottom, transparent 40%, #161628 40%, #161628 100%) no-repeat 58% bottom / 5% 60%,
    linear-gradient(to bottom, transparent 25%, #1a1a2e 25%, #1a1a2e 100%) no-repeat 65% bottom / 9% 75%,
    linear-gradient(to bottom, transparent 10%, #1f1f38 10%, #1f1f38 100%) no-repeat 76% bottom / 11% 90%,
    linear-gradient(to bottom, transparent 50%, #141425 50%, #141425 100%) no-repeat 88% bottom / 7% 50%,
    linear-gradient(to bottom, transparent 30%, #1b1b30 30%, #1b1b30 100%) no-repeat 96% bottom / 6% 70%;
}

.skyline::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg,
    transparent,
    var(--neon-pink) 20%,
    var(--neon-cyan) 50%,
    var(--neon-pink) 80%,
    transparent
  );
  box-shadow: 0 0 20px var(--neon-pink), 0 0 40px var(--neon-cyan);
}

.neon-grid {
  position: absolute;
  bottom: 0;
  left: -50%;
  right: -50%;
  height: 30%;
  background:
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 48px,
      rgba(255, 45, 149, 0.05) 48px,
      rgba(255, 45, 149, 0.05) 50px
    ),
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 48px,
      rgba(0, 240, 255, 0.05) 48px,
      rgba(0, 240, 255, 0.05) 50px
    );
  transform: perspective(500px) rotateX(60deg);
  transform-origin: center top;
}

.title-content {
  position: relative;
  z-index: 1;
  padding: 2rem;
}

.neon-title {
  margin-bottom: 1.5rem;
}

.title-zh {
  display: block;
  font-family: var(--font-zh);
  font-size: 3.5rem;
  font-weight: 900;
  color: var(--neon-pink);
  text-shadow:
    0 0 10px var(--neon-pink),
    0 0 30px rgba(255, 45, 149, 0.6),
    0 0 60px rgba(255, 45, 149, 0.3);
  letter-spacing: 0.15em;
  animation: neonFlicker 3s infinite alternate;
}

.title-en {
  display: block;
  font-size: 1.3rem;
  font-weight: 300;
  color: var(--neon-cyan);
  text-shadow: var(--glow-cyan);
  letter-spacing: 0.4em;
  text-transform: uppercase;
  margin-top: 0.5rem;
}

.title-tagline {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 3rem;
  letter-spacing: 0.05em;
}

/* === Buttons === */
.btn {
  display: inline-block;
  padding: 0.85rem 2.5rem;
  border: 2px solid var(--border-color);
  border-radius: 4px;
  background: transparent;
  color: var(--text-primary);
  font-family: var(--font-ui);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-normal);
  letter-spacing: 0.1em;
  position: relative;
  overflow: hidden;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  border-color: var(--neon-pink);
  color: var(--neon-pink);
}

.btn-primary:hover {
  background: rgba(255, 45, 149, 0.15);
  box-shadow: var(--glow-pink);
}

.btn-secondary {
  border-color: var(--neon-cyan);
  color: var(--neon-cyan);
  margin-top: 1rem;
}

.btn-secondary:hover {
  background: rgba(0, 240, 255, 0.1);
  box-shadow: var(--glow-cyan);
}

.btn-back {
  border: none;
  color: var(--neon-cyan);
  padding: 0.5rem 1rem;
  font-size: 1rem;
}

.btn-back:hover {
  color: #fff;
  text-shadow: var(--glow-cyan);
}

.btn-action {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 1rem 1.2rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--bg-card);
  color: var(--text-primary);
  font-family: var(--font-ui);
  font-size: 0.95rem;
  cursor: pointer;
  transition: all var(--transition-normal);
  text-align: left;
}

.btn-action:hover {
  border-color: var(--neon-pink);
  background: var(--bg-card-hover);
  box-shadow: inset 0 0 20px rgba(255, 45, 149, 0.05);
}

.btn-action:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn-action:disabled:hover {
  border-color: var(--border-color);
  background: var(--bg-card);
  box-shadow: none;
}

.btn-action .action-icon {
  font-size: 1.5rem;
  min-width: 2rem;
  text-align: center;
}

.btn-action .action-info {
  flex: 1;
}

.btn-action .action-name {
  display: block;
  font-weight: 600;
  margin-bottom: 0.15rem;
}

.btn-action .action-desc {
  display: block;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.btn-action .action-cost {
  font-size: 0.8rem;
  color: var(--neon-yellow);
  white-space: nowrap;
}

.neon-glow {
  box-shadow: var(--glow-pink);
}

.pulse {
  animation: pulse 2s infinite;
}

/* === Stats Bar === */
.stats-bar {
  display: grid;
  grid-template-columns: auto 1fr repeat(3, 1fr);
  gap: 0.5rem;
  padding: 0.6rem 0.8rem;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
  padding: 0.2rem 0.3rem;
}

.stat-label {
  font-size: 0.6rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.stat-value {
  font-size: 0.95rem;
  font-weight: 700;
}

.stat-value-small {
  font-size: 0.7rem;
  font-weight: 600;
}

.stat-day .stat-value {
  color: var(--neon-cyan);
}

.stat-day .stat-sub {
  font-size: 0.7rem;
  color: var(--neon-yellow);
}

.stat-money .stat-value {
  color: var(--neon-yellow);
  text-shadow: var(--glow-yellow);
  font-family: 'Courier New', monospace;
}

.stat-bar-container {
  width: 100%;
  height: 4px;
  background: var(--bg-primary);
  border-radius: 2px;
  overflow: hidden;
}

.stat-bar {
  height: 100%;
  border-radius: 2px;
  transition: width var(--transition-normal);
}

.energy-bar {
  background: linear-gradient(90deg, var(--neon-orange), var(--neon-yellow));
}

.mental-bar {
  background: linear-gradient(90deg, var(--neon-red), var(--neon-purple));
}

.charm-bar {
  background: linear-gradient(90deg, var(--neon-pink), var(--neon-cyan));
}

.stat-energy .stat-value-small { color: var(--neon-yellow); }
.stat-mental .stat-value-small { color: var(--neon-purple); }
.stat-charm .stat-value-small { color: var(--neon-cyan); }

/* === Phase Indicator === */
.phase-indicator {
  padding: 0.75rem 1rem;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
}

.phase-dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
}

.phase-dot {
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.8rem;
  color: var(--text-dim);
  background: var(--bg-primary);
  transition: all var(--transition-normal);
}

.phase-dot.active {
  color: var(--neon-pink);
  background: rgba(255, 45, 149, 0.15);
  border: 1px solid var(--neon-pink);
  box-shadow: var(--glow-pink);
}

.phase-dot.completed {
  color: var(--text-secondary);
  background: rgba(255, 45, 149, 0.05);
  border: 1px solid rgba(255, 45, 149, 0.3);
}

/* === Action Area === */
.action-area {
  padding: 1rem;
}

.section-title {
  font-family: var(--font-zh);
  font-size: 1.1rem;
  color: var(--neon-cyan);
  margin-bottom: 0.8rem;
  padding-left: 0.5rem;
  border-left: 3px solid var(--neon-cyan);
}

.action-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

/* === Mark List === */
.mark-list-section {
  padding: 1rem;
  flex: 1;
}

.mark-count {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.mark-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.mark-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  cursor: pointer;
  transition: all var(--transition-normal);
}

.mark-card:hover {
  border-color: var(--neon-pink);
  background: var(--bg-card-hover);
}

.mark-card.mark-suspicious {
  border-color: var(--neon-orange);
}

.mark-card.mark-angry {
  border-color: var(--neon-red);
}

.mark-card.mark-lost {
  opacity: 0.4;
  pointer-events: none;
}

.mark-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  background: var(--bg-secondary);
  border: 2px solid var(--border-color);
  flex-shrink: 0;
  overflow: hidden;
}

.mark-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mark-avatar-large {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  background: var(--bg-secondary);
  border: 2px solid var(--border-color);
  overflow: hidden;
}

.mark-avatar-large img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mark-info {
  flex: 1;
  min-width: 0;
}

.mark-name {
  font-weight: 600;
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mark-details {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 0.1rem;
}

.mark-type-badge {
  font-size: 0.7rem;
  padding: 0.15rem 0.5rem;
  border-radius: 10px;
  margin-top: 0.2rem;
  display: inline-block;
}

.badge-taker {
  background: rgba(255, 49, 49, 0.15);
  color: var(--neon-red);
  border: 1px solid rgba(255, 49, 49, 0.3);
}

.badge-matcher {
  background: rgba(255, 230, 0, 0.1);
  color: var(--neon-yellow);
  border: 1px solid rgba(255, 230, 0, 0.3);
}

.badge-giver {
  background: rgba(57, 255, 20, 0.1);
  color: var(--neon-green);
  border: 1px solid rgba(57, 255, 20, 0.3);
}

.badge-unknown {
  background: rgba(136, 136, 170, 0.1);
  color: var(--text-secondary);
  border: 1px solid rgba(136, 136, 170, 0.3);
}

.mark-trust-mini {
  width: 50px;
  text-align: right;
  flex-shrink: 0;
}

.mark-trust-mini .trust-number {
  font-size: 0.85rem;
  font-weight: 700;
}

.mark-trust-mini .trust-bar-mini {
  width: 100%;
  height: 3px;
  background: var(--bg-primary);
  border-radius: 2px;
  margin-top: 0.2rem;
  overflow: hidden;
}

.mark-trust-mini .trust-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--neon-red), var(--neon-yellow), var(--neon-green));
  border-radius: 2px;
  transition: width var(--transition-normal);
}

.mark-mood-icon {
  font-size: 0.85rem;
  flex-shrink: 0;
}

/* === Location Screen === */
.location-header {
  padding: 1rem;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
}

.location-header .neon-text {
  font-family: var(--font-zh);
  font-size: 1.5rem;
  color: var(--neon-cyan);
  text-shadow: var(--glow-cyan);
}

.location-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 0.3rem;
}

.location-marks {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.location-mark-card {
  padding: 1.2rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  cursor: pointer;
  transition: all var(--transition-normal);
}

.location-mark-card:hover {
  border-color: var(--neon-pink);
  box-shadow: 0 0 15px rgba(255, 45, 149, 0.1);
}

.location-mark-top {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.6rem;
}

.location-mark-name {
  font-weight: 700;
  font-size: 1.1rem;
}

.location-mark-age {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.location-mark-occupation {
  color: var(--neon-yellow);
  font-size: 0.85rem;
}

.location-mark-traits {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.trait-tag {
  font-size: 0.7rem;
  padding: 0.15rem 0.5rem;
  border-radius: 10px;
  background: rgba(0, 240, 255, 0.08);
  color: var(--neon-cyan);
  border: 1px solid rgba(0, 240, 255, 0.2);
}

/* === Chat Screen === */
.chat-header {
  padding: 0.8rem 1rem;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.chat-mark-info {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex: 1;
}

.chat-mark-info h3 {
  font-size: 1rem;
}

.chat-status {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.chat-trust-display {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.15rem;
  min-width: 60px;
}

.trust-label {
  font-size: 0.65rem;
  color: var(--text-dim);
}

.trust-bar-container {
  width: 100%;
  height: 4px;
  background: var(--bg-primary);
  border-radius: 2px;
  overflow: hidden;
}

.trust-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--neon-red), var(--neon-yellow), var(--neon-green));
  border-radius: 2px;
  transition: width 0.5s ease;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.chat-bubble {
  max-width: 80%;
  padding: 0.8rem 1rem;
  border-radius: 16px;
  font-size: 0.9rem;
  line-height: 1.5;
  animation: fadeSlideIn 0.3s ease;
}

.chat-bubble.mark-msg {
  align-self: flex-start;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-bottom-left-radius: 4px;
}

.chat-bubble.player-msg {
  align-self: flex-end;
  background: rgba(255, 45, 149, 0.15);
  border: 1px solid rgba(255, 45, 149, 0.3);
  border-bottom-right-radius: 4px;
}

.chat-bubble.system-msg {
  align-self: center;
  background: rgba(0, 240, 255, 0.1);
  border: 1px solid rgba(0, 240, 255, 0.2);
  font-size: 0.8rem;
  color: var(--neon-cyan);
  text-align: center;
}

.chat-choices {
  padding: 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
}

.chat-choice-btn {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background: var(--bg-card);
  color: var(--text-primary);
  font-family: var(--font-ui);
  font-size: 0.9rem;
  cursor: pointer;
  text-align: left;
  transition: all var(--transition-normal);
  line-height: 1.4;
}

.chat-choice-btn:hover {
  border-color: var(--neon-pink);
  background: var(--bg-card-hover);
}

.chat-choice-btn .choice-category {
  font-size: 0.7rem;
  color: var(--neon-cyan);
  display: block;
  margin-bottom: 0.2rem;
}

/* === Extraction Screen === */
.extraction-header {
  padding: 1rem;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  text-align: center;
}

.extraction-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-top: 1rem;
  padding: 0 1rem;
}

.extraction-step {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  background: var(--bg-primary);
  border: 2px solid var(--border-color);
  color: var(--text-dim);
  transition: all var(--transition-normal);
  flex-shrink: 0;
}

.extraction-step.active {
  border-color: var(--neon-pink);
  color: var(--neon-pink);
  box-shadow: var(--glow-pink);
}

.extraction-step.completed {
  border-color: var(--neon-green);
  color: var(--neon-green);
  background: rgba(57, 255, 20, 0.1);
}

.extraction-step.failed {
  border-color: var(--neon-red);
  color: var(--neon-red);
  background: rgba(255, 49, 49, 0.1);
}

.extraction-connector {
  width: 30px;
  height: 2px;
  background: var(--border-color);
  flex-shrink: 0;
}

.extraction-content {
  flex: 1;
  padding: 1.5rem 1rem;
  display: flex;
  flex-direction: column;
}

.extraction-narrative {
  flex: 1;
  padding: 1rem;
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text-primary);
}

.extraction-narrative .extract-amount {
  color: var(--neon-yellow);
  font-weight: 700;
  font-size: 1.3rem;
  text-shadow: var(--glow-yellow);
}

.extraction-choices {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.5rem 0;
}

/* === Day Summary === */
#screen-summary {
  justify-content: center;
  align-items: center;
  padding: 1rem;
}

.summary-panel {
  width: 100%;
  max-width: 400px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 1.5rem;
  text-align: center;
}

.summary-content {
  margin: 1.5rem 0;
  text-align: left;
}

.summary-item {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(42, 42, 74, 0.5);
  font-size: 0.9rem;
}

.summary-item .summary-label {
  color: var(--text-secondary);
}

.summary-item .summary-value {
  font-weight: 600;
}

.summary-value.positive {
  color: var(--neon-green);
}

.summary-value.negative {
  color: var(--neon-red);
}

.summary-events {
  margin-top: 1rem;
  padding: 0.8rem;
  background: var(--bg-primary);
  border-radius: 8px;
}

.summary-events h4 {
  font-size: 0.85rem;
  color: var(--neon-cyan);
  margin-bottom: 0.5rem;
}

.summary-event-item {
  font-size: 0.8rem;
  color: var(--text-secondary);
  padding: 0.2rem 0;
}

/* === Game Over Screen === */
#screen-gameover {
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 2rem;
}

.gameover-title {
  margin-bottom: 1rem;
}

.gameover-rank {
  margin: 1.5rem 0;
}

.gameover-rank .rank-title {
  font-family: var(--font-zh);
  font-size: 2rem;
  color: var(--neon-yellow);
  text-shadow: var(--glow-yellow);
}

.gameover-rank .rank-subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-top: 0.3rem;
}

.gameover-stats {
  margin: 1.5rem 0;
  text-align: left;
  max-width: 350px;
  margin-left: auto;
  margin-right: auto;
}

.gameover-stat {
  display: flex;
  justify-content: space-between;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border-color);
}

.gameover-stat .stat-name {
  color: var(--text-secondary);
}

.gameover-stat .stat-val {
  font-weight: 700;
  color: var(--neon-yellow);
}

/* === Event Popup === */
.event-popup {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  animation: fadeIn 0.3s ease;
}

.event-popup.hidden {
  display: none;
}

.event-popup-content {
  background: var(--bg-secondary);
  border: 1px solid var(--neon-pink);
  border-radius: 16px;
  padding: 2rem 1.5rem;
  max-width: 350px;
  width: 90%;
  text-align: center;
  box-shadow: 0 0 30px rgba(255, 45, 149, 0.2);
  animation: popIn 0.3s ease;
}

.event-icon {
  font-size: 3rem;
  margin-bottom: 0.8rem;
}

.event-title {
  font-family: var(--font-zh);
  font-size: 1.2rem;
  color: var(--neon-cyan);
  margin-bottom: 0.8rem;
}

.event-text {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

/* === Toast Notifications === */
.toast-container {
  position: fixed;
  top: 70px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
  max-width: 460px;
  width: 95%;
}

.toast {
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  font-size: 0.85rem;
  text-align: center;
  animation: toastIn 0.3s ease, toastOut 0.3s ease 2.5s forwards;
  pointer-events: auto;
}

.toast-money {
  background: rgba(255, 230, 0, 0.15);
  border: 1px solid rgba(255, 230, 0, 0.4);
  color: var(--neon-yellow);
}

.toast-trust {
  background: rgba(57, 255, 20, 0.1);
  border: 1px solid rgba(57, 255, 20, 0.3);
  color: var(--neon-green);
}

.toast-danger {
  background: rgba(255, 49, 49, 0.15);
  border: 1px solid rgba(255, 49, 49, 0.4);
  color: var(--neon-red);
}

.toast-info {
  background: rgba(0, 240, 255, 0.1);
  border: 1px solid rgba(0, 240, 255, 0.3);
  color: var(--neon-cyan);
}

/* === Tutorial Screen === */
#screen-tutorial {
  justify-content: center;
  align-items: center;
  padding: 1rem;
}

#screen-tutorial .panel {
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 1.5rem;
}

.tutorial-content {
  margin: 1rem 0;
}

.tutorial-section {
  margin-bottom: 1.2rem;
}

.tutorial-section h3 {
  color: var(--neon-pink);
  font-size: 1rem;
  margin-bottom: 0.4rem;
}

.tutorial-section p,
.tutorial-section li {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.tutorial-section ul {
  padding-left: 1.2rem;
}

.highlight {
  color: var(--neon-yellow);
}

.text-danger { color: var(--neon-red); }
.text-warning { color: var(--neon-yellow); }
.text-success { color: var(--neon-green); }

/* === Neon Text === */
.neon-text {
  color: var(--neon-cyan);
  text-shadow: var(--glow-cyan);
}

/* === Animations === */
@keyframes neonFlicker {
  0%, 19%, 21%, 23%, 25%, 54%, 56%, 100% {
    text-shadow:
      0 0 10px var(--neon-pink),
      0 0 30px rgba(255, 45, 149, 0.6),
      0 0 60px rgba(255, 45, 149, 0.3);
  }
  20%, 24%, 55% {
    text-shadow:
      0 0 5px var(--neon-pink),
      0 0 15px rgba(255, 45, 149, 0.3);
  }
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 5px rgba(255, 45, 149, 0.3); }
  50% { box-shadow: 0 0 20px rgba(255, 45, 149, 0.6), 0 0 40px rgba(255, 45, 149, 0.2); }
}

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

@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes popIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

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

@keyframes toastOut {
  from { opacity: 1; }
  to { opacity: 0; transform: translateY(-10px); }
}

@keyframes moneyPop {
  0% { transform: scale(1); }
  50% { transform: scale(1.3); color: var(--neon-green); }
  100% { transform: scale(1); }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-4px); }
  40% { transform: translateX(4px); }
  60% { transform: translateX(-3px); }
  80% { transform: translateX(3px); }
}

.money-pop {
  animation: moneyPop 0.4s ease;
}

.shake {
  animation: shake 0.4s ease;
}

@keyframes slideInRight {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

.slide-in {
  animation: slideInRight 0.3s ease;
}

/* === Scrollbar === */
::-webkit-scrollbar {
  width: 4px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 2px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--neon-pink);
}

/* === Responsive === */
@media (min-width: 481px) {
  #app {
    border-left: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
  }
}

@media (max-width: 380px) {
  .stats-bar {
    gap: 0.3rem;
    padding: 0.4rem 0.5rem;
  }

  .stat-value {
    font-size: 0.8rem;
  }

  .title-zh {
    font-size: 2.5rem;
  }

  .btn-action {
    padding: 0.7rem 0.8rem;
  }
}

/* === Empty state === */
.empty-state {
  text-align: center;
  padding: 2rem;
  color: var(--text-dim);
  font-size: 0.9rem;
}

.empty-state .empty-icon {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

/* === Mark detail popup === */
.mark-detail-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  display: flex;
  justify-content: center;
  align-items: center;
  animation: fadeIn 0.2s ease;
}

.mark-detail-panel {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 1.5rem;
  max-width: 380px;
  width: 90%;
}

.mark-detail-panel h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.mark-detail-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin: 1rem 0;
}

.mark-detail-stat {
  background: var(--bg-primary);
  border-radius: 8px;
  padding: 0.6rem;
  text-align: center;
}

.mark-detail-stat .mds-label {
  font-size: 0.7rem;
  color: var(--text-dim);
  display: block;
}

.mark-detail-stat .mds-value {
  font-size: 1.1rem;
  font-weight: 700;
  display: block;
  margin-top: 0.2rem;
}

.mark-detail-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 1rem;
}

.mark-detail-actions .btn {
  width: 100%;
  text-align: center;
}

/* Loading dots */
.typing-indicator {
  display: flex;
  gap: 4px;
  padding: 0.5rem;
  align-self: flex-start;
}

.typing-indicator span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-dim);
  animation: typingDot 1.4s infinite;
}

.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingDot {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-6px); opacity: 1; }
}

/* Mark type reveal images */
.mark-type-reveal {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem;
  animation: fadeInUp 0.5s ease;
}
.mark-type-reveal img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--neon-pink);
  box-shadow: 0 0 15px rgba(255, 45, 149, 0.4);
}
.mark-type-reveal.type-giver img { border-color: var(--neon-cyan); box-shadow: 0 0 15px rgba(0, 240, 255, 0.4); }
.mark-type-reveal.type-matcher img { border-color: var(--neon-yellow); box-shadow: 0 0 15px rgba(255, 230, 0, 0.4); }

/* Player avatar in chat */
.player-chat-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--neon-pink);
  flex-shrink: 0;
}

/* Title screen player image */
.title-player-img {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--neon-pink);
  box-shadow: 0 0 20px rgba(255, 45, 149, 0.5);
  margin: 1rem auto;
  display: block;
  animation: neonPulse 2s ease-in-out infinite;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* === Feature 1: Daily Vibe Banner === */
.vibe-banner {
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.08), rgba(255, 45, 149, 0.08));
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 0.5rem 0.8rem;
  margin: 0.3rem 0.8rem 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.82rem;
  animation: fadeInUp 0.4s ease;
}
.vibe-name {
  font-weight: 700;
  color: var(--neon-cyan);
  white-space: nowrap;
}
.vibe-desc {
  color: var(--text-secondary);
  font-size: 0.78rem;
}

/* === Feature 2: Quirk Display === */
.quirk-revealed, .quirk-hidden {
  margin: 0.5rem 0;
  padding: 0.5rem 0.7rem;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
}
.quirk-revealed {
  background: rgba(180, 77, 255, 0.1);
  border: 1px solid rgba(180, 77, 255, 0.3);
}
.quirk-hidden {
  background: rgba(85, 85, 119, 0.15);
  border: 1px dashed var(--border-color);
}
.quirk-badge {
  font-weight: 700;
  color: var(--neon-purple);
  white-space: nowrap;
}
.quirk-badge.quirk-unknown {
  color: var(--text-dim);
}
.quirk-desc {
  color: var(--text-secondary);
  font-size: 0.78rem;
}

/* === Feature 3: Breakdown Choice === */
.breakdown-choice {
  border-color: var(--neon-red) !important;
  color: var(--neon-red) !important;
  animation: pulse 1s infinite;
  background: rgba(255, 49, 49, 0.08) !important;
}
.breakdown-choice:hover {
  background: rgba(255, 49, 49, 0.2) !important;
  box-shadow: 0 0 15px rgba(255, 49, 49, 0.3);
}

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

/* === Feature 4: Gambit Button === */
.btn-gambit {
  background: linear-gradient(135deg, rgba(255, 230, 0, 0.15), rgba(255, 107, 43, 0.15));
  border: 2px solid var(--neon-orange);
  color: var(--neon-yellow);
  padding: 0.8rem 1.2rem;
  border-radius: 10px;
  font-family: var(--font-ui);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
  animation: pulse 1.5s infinite;
}
.btn-gambit:hover {
  background: linear-gradient(135deg, rgba(255, 230, 0, 0.3), rgba(255, 107, 43, 0.3));
  box-shadow: 0 0 20px rgba(255, 230, 0, 0.3);
  transform: scale(1.02);
}

/* === Feature 5: Loan Shark Info === */
.loan-shark-info {
  background: rgba(255, 49, 49, 0.1);
  border: 1px solid rgba(255, 49, 49, 0.3);
  border-radius: 8px;
  padding: 0.4rem 0.8rem;
  margin: 0.2rem 0.8rem 0.3rem;
  font-size: 0.82rem;
  color: var(--neon-red);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  animation: pulse 2s infinite;
}
.btn-action-loan {
  border-color: var(--neon-red) !important;
  background: rgba(255, 49, 49, 0.08) !important;
}
.btn-action-loan:hover:not(:disabled) {
  background: rgba(255, 49, 49, 0.15) !important;
  box-shadow: 0 0 15px rgba(255, 49, 49, 0.2);
}

/* =============================================
   NARRATIVE / STORY SYSTEM STYLES
   ============================================= */

/* === Backstory Selection Screen === */
#screen-backstory {
  justify-content: center;
  align-items: center;
  padding: 1.5rem;
  background: linear-gradient(180deg, var(--bg-primary) 0%, #0d0d18 50%, var(--bg-primary) 100%);
}

.backstory-content {
  width: 100%;
  max-width: 440px;
  text-align: center;
}

.backstory-content .neon-text {
  font-family: var(--font-zh);
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.backstory-intro {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.backstory-cards {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.backstory-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 1.4rem;
  cursor: pointer;
  transition: all 0.4s ease;
  text-align: left;
  position: relative;
  overflow: hidden;
}

.backstory-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 45, 149, 0.03), rgba(0, 240, 255, 0.03));
  opacity: 0;
  transition: opacity 0.4s ease;
}

.backstory-card:hover {
  border-color: var(--neon-pink);
  box-shadow:
    0 0 20px rgba(255, 45, 149, 0.15),
    0 0 40px rgba(255, 45, 149, 0.05),
    inset 0 0 30px rgba(255, 45, 149, 0.03);
  transform: translateY(-2px);
}

.backstory-card:hover::before {
  opacity: 1;
}

.backstory-card-icon {
  font-size: 2.2rem;
  margin-bottom: 0.5rem;
}

.backstory-card-name {
  font-family: var(--font-zh);
  font-size: 1.3rem;
  color: var(--neon-cyan);
  text-shadow: var(--glow-cyan);
  margin-bottom: 0.6rem;
}

.backstory-card-text {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 0.8rem;
}

.backstory-card-effects {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.backstory-effect {
  font-size: 0.78rem;
  padding: 0.2rem 0.6rem;
  border-radius: 8px;
  background: rgba(0, 240, 255, 0.08);
  color: var(--neon-cyan);
  border: 1px solid rgba(0, 240, 255, 0.15);
}

.backstory-effect.effect-negative {
  background: rgba(255, 49, 49, 0.1);
  color: var(--neon-red);
  border-color: rgba(255, 49, 49, 0.3);
}

/* === Backstory Cinematic Pages === */
.backstory-cinematic {
  text-align: center;
  padding: 1.5rem;
  animation: fadeInUp 0.6s ease;
}

.backstory-player-img {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--neon-pink);
  box-shadow: 0 0 25px rgba(255, 45, 149, 0.4);
  margin-bottom: 1rem;
}

.backstory-page-indicator {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-bottom: 1rem;
  letter-spacing: 1px;
}

.backstory-page-text {
  font-size: 1.05rem;
  color: var(--text-primary);
  line-height: 2;
  margin-bottom: 1.5rem;
  text-align: left;
  padding: 0 0.5rem;
  min-height: 100px;
}

.backstory-next-btn {
  width: 100%;
}

.backstory-epilogue {
  background: linear-gradient(180deg, rgba(255, 45, 149, 0.05) 0%, transparent 100%);
  border-radius: 12px;
  padding: 2rem 1.5rem;
}

.backstory-epilogue-text {
  font-size: 1.2rem;
  color: var(--neon-pink);
  text-shadow: 0 0 10px rgba(255, 45, 149, 0.3);
  line-height: 2;
  margin-bottom: 1rem;
  font-style: italic;
}

/* === Story Event Screen === */
#screen-story-event {
  justify-content: center;
  align-items: center;
  padding: 1.5rem;
  background: radial-gradient(ellipse at center, rgba(10, 10, 20, 0.95) 0%, rgba(5, 5, 12, 1) 100%);
}

.story-event-content {
  width: 100%;
  max-width: 400px;
  text-align: center;
  animation: fadeSlideIn 0.5s ease;
}

.story-event-content .neon-text {
  font-family: var(--font-zh);
  font-size: 1.6rem;
  margin-bottom: 1.2rem;
}

.story-event-text {
  font-size: 1.05rem;
  color: var(--text-primary);
  line-height: 1.9;
  margin-bottom: 2rem;
  font-family: var(--font-zh);
  letter-spacing: 0.02em;
}

.story-event-choices {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.story-choice-btn {
  width: 100%;
  padding: 1rem 1.2rem;
  border: 1px solid rgba(0, 240, 255, 0.3);
  border-radius: 12px;
  background: rgba(0, 240, 255, 0.05);
  color: var(--text-primary);
  font-family: var(--font-zh);
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
  line-height: 1.5;
}

.story-choice-btn:hover {
  border-color: var(--neon-cyan);
  background: rgba(0, 240, 255, 0.12);
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.15);
  transform: translateY(-1px);
}

/* === Final Choice Screen === */
#screen-final-choice {
  justify-content: center;
  align-items: center;
  padding: 2rem;
  background: radial-gradient(ellipse at center bottom, rgba(20, 5, 15, 1) 0%, rgba(5, 5, 12, 1) 100%);
}

.final-choice-content {
  width: 100%;
  max-width: 420px;
  text-align: center;
  animation: fadeSlideIn 0.6s ease;
}

.final-choice-content .neon-text {
  font-family: var(--font-zh);
  font-size: 1.8rem;
  color: var(--neon-pink);
  text-shadow: var(--glow-pink);
  margin-bottom: 1.5rem;
}

.final-choice-buttons {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1rem;
}

.final-choice-btn {
  width: 100%;
  padding: 1.3rem 1.5rem;
  border-radius: 14px;
  font-family: var(--font-zh);
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.4s ease;
  text-align: center;
  line-height: 1.5;
  letter-spacing: 0.05em;
}

.final-choice-btn.choice-warm {
  border: 2px solid var(--neon-cyan);
  background: rgba(0, 240, 255, 0.08);
  color: var(--neon-cyan);
}

.final-choice-btn.choice-warm:hover {
  background: rgba(0, 240, 255, 0.18);
  box-shadow: 0 0 30px rgba(0, 240, 255, 0.25), inset 0 0 20px rgba(0, 240, 255, 0.05);
  transform: scale(1.02);
}

.final-choice-btn.choice-cold {
  border: 2px solid var(--neon-red);
  background: rgba(255, 49, 49, 0.08);
  color: var(--neon-red);
}

.final-choice-btn.choice-cold:hover {
  background: rgba(255, 49, 49, 0.18);
  box-shadow: 0 0 30px rgba(255, 49, 49, 0.25), inset 0 0 20px rgba(255, 49, 49, 0.05);
  transform: scale(1.02);
}

/* === Milestone Banner on Dashboard === */
.milestone-banner {
  background: linear-gradient(135deg, rgba(255, 230, 0, 0.06), rgba(255, 45, 149, 0.06));
  border: 1px solid rgba(255, 230, 0, 0.15);
  border-radius: 10px;
  padding: 0.5rem 0.8rem;
  margin: 0.2rem 0.8rem 0.3rem;
  font-size: 0.8rem;
  animation: fadeInUp 0.4s ease;
}

.milestone-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.3rem;
}

.milestone-label {
  color: var(--neon-yellow);
  font-weight: 700;
  font-size: 0.78rem;
}

.milestone-target-text {
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-family: 'Courier New', monospace;
}

.milestone-days-left {
  color: var(--text-dim);
  font-size: 0.72rem;
  text-align: right;
  margin-bottom: 0.2rem;
}

.milestone-progress-bar {
  width: 100%;
  height: 3px;
  background: var(--bg-primary);
  border-radius: 2px;
  overflow: hidden;
}

.milestone-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--neon-yellow), var(--neon-green));
  border-radius: 2px;
  transition: width 0.5s ease;
}

/* Milestone result in event popup */
.milestone-result {
  font-weight: 700;
  font-size: 1.1rem;
  display: inline-block;
  margin-bottom: 0.3rem;
}

.milestone-result.milestone-hit {
  color: var(--neon-green);
  text-shadow: 0 0 10px rgba(57, 255, 20, 0.5);
}

.milestone-result.milestone-miss {
  color: var(--neon-red);
  text-shadow: 0 0 10px rgba(255, 49, 49, 0.5);
}

.milestone-target {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-family: 'Courier New', monospace;
}

/* === 阿琪 Message Overlay === */
.aki-message-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  animation: fadeIn 0.3s ease;
}

.aki-message-panel {
  max-width: 380px;
  width: 90%;
  text-align: center;
  animation: popIn 0.4s ease;
  padding: 1.5rem;
}

.aki-avatar {
  font-size: 3rem;
  margin-bottom: 0.8rem;
  filter: drop-shadow(0 0 10px rgba(255, 182, 193, 0.6));
}

.aki-avatar img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #ff9ec4;
  box-shadow: 0 0 20px rgba(255, 158, 196, 0.4);
}

.aki-bubble {
  background: linear-gradient(135deg, rgba(255, 182, 193, 0.12), rgba(255, 105, 180, 0.08));
  border: 1px solid rgba(255, 182, 193, 0.35);
  border-radius: 16px;
  padding: 1.2rem 1.4rem;
  margin-bottom: 1rem;
  position: relative;
}

.aki-bubble::before {
  content: '';
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-bottom: 8px solid rgba(255, 182, 193, 0.35);
}

.aki-bubble p {
  font-family: var(--font-zh);
  font-size: 0.95rem;
  color: #ffb6c1;
  line-height: 1.8;
  text-shadow: 0 0 8px rgba(255, 182, 193, 0.3);
}

.btn-aki-close {
  display: inline-block;
  padding: 0.6rem 2rem;
  border: 1px solid rgba(255, 182, 193, 0.4);
  border-radius: 8px;
  background: rgba(255, 182, 193, 0.08);
  color: #ffb6c1;
  font-family: var(--font-ui);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-aki-close:hover {
  background: rgba(255, 182, 193, 0.2);
  box-shadow: 0 0 15px rgba(255, 182, 193, 0.3);
}

/* === Ending Text on Game Over === */
.ending-text {
  font-family: var(--font-zh);
  font-size: 1.1rem;
  color: var(--text-primary);
  line-height: 2;
  padding: 1.5rem 1rem;
  margin: 1rem 0;
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.04), rgba(255, 45, 149, 0.04));
  border-left: 3px solid var(--neon-pink);
  border-radius: 0 12px 12px 0;
  text-align: left;
  letter-spacing: 0.03em;
  animation: fadeSlideIn 0.8s ease;
}

.gameover-backstory {
  font-size: 1rem;
  color: var(--neon-cyan);
  margin-bottom: 0.5rem;
}

.gameover-milestones {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin: 1rem auto;
  max-width: 300px;
  text-align: left;
}

.gameover-milestone {
  font-size: 0.82rem;
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
}

.gameover-milestone.milestone-achieved {
  color: var(--neon-green);
  background: rgba(57, 255, 20, 0.06);
}

.gameover-milestone.milestone-failed {
  color: var(--neon-red);
  background: rgba(255, 49, 49, 0.06);
}
