/* === Reset & Base === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { width: 100%; height: 100%; overflow: hidden; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
  background: linear-gradient(135deg, #c0392b 0%, #8e1e1e 30%, #5a1010 60%, #1a0a0a 100%);
  color: #fff;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
}

/* === App Layout === */
#app { width: 100%; height: 100%; display: flex; flex-direction: column; position: relative; }
.screen { display: none; flex: 1; flex-direction: column; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.screen.active { display: flex; }

/* Footer */
.app-footer {
  position: fixed; bottom: 0; left: 0; right: 0;
  text-align: center; padding: 8px; font-size: 11px;
  color: rgba(255,255,255,0.3); background: rgba(0,0,0,0.2);
  z-index: 10;
}

/* === Buttons === */
.btn {
  display: inline-block; border: none; border-radius: 8px;
  cursor: pointer; font-weight: 600; transition: all 0.2s;
  font-family: inherit; outline: none;
}
.btn:active { transform: scale(0.96); opacity: 0.9; }
.btn-primary {
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  color: #fff; box-shadow: 0 4px 15px rgba(231,76,60,0.4);
  position: relative; overflow: hidden;
}
.btn-primary::after {
  content: ''; position: absolute; top: 50%; left: 50%;
  width: 0; height: 0; border-radius: 50%;
  background: rgba(255,255,255,0.2); transform: translate(-50%,-50%);
  transition: width 0.6s, height 0.6s;
}
.btn-primary:active::after { width: 300px; height: 300px; }
.btn-primary:hover { box-shadow: 0 6px 20px rgba(231,76,60,0.5); transform: translateY(-1px); }
.btn-large { padding: 14px 48px; font-size: 18px; border-radius: 12px; }
.btn-secondary {
  background: transparent; color: rgba(255,255,255,0.7);
  border: 1px solid rgba(255,255,255,0.2); padding: 10px 32px; font-size: 14px;
}
.btn-back {
  background: transparent; color: rgba(255,255,255,0.7);
  border: none; font-size: 15px; padding: 8px 12px;
}
.btn-reset {
  background: transparent; color: rgba(255,255,255,0.4);
  border: 1px solid rgba(255,255,255,0.15); font-size: 12px;
  padding: 6px 12px; border-radius: 6px;
}
.btn-small {
  background: rgba(255,255,255,0.1); color: rgba(255,255,255,0.8);
  border: 1px solid rgba(255,255,255,0.2); font-size: 13px;
  padding: 6px 14px; border-radius: 6px;
}

/* === Screen: Home — Full-Screen Cover + Mode Selection === */
#screen-home { position: relative; overflow: hidden; }
.home-container {
  display: flex; flex-direction: column;
  height: 100%; width: 100%;
  position: relative; z-index: 1;
}
.home-cover {
  position: absolute; top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 0; overflow: hidden;
  flex: 0 0 auto; /* removed from flow */
}
.cover-img {
  width: 100%; height: 100%; object-fit: cover; object-position: center top;
  display: block;
}
.home-modes {
  display: flex; flex-direction: row; gap: 16px;
  width: 100%; padding: 20px 20px 24px; box-sizing: border-box;
  background: linear-gradient(to top, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.15) 70%, transparent 100%);
  flex-shrink: 0; margin-top: auto;
  position: relative; z-index: 1;
}
.btn-mode {
  flex: 1; display: flex; align-items: center; justify-content: center;
  padding: 18px 12px; border-radius: 14px; border: 2px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.08); color: #fff; font-size: 22px; font-weight: 800;
  transition: all 0.25s; cursor: pointer; letter-spacing: 2px;
  -webkit-tap-highlight-color: transparent;
}
.btn-mode:active { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.3); transform: scale(0.96); }
.btn-solo { border-color: rgba(241,196,15,0.4); }
.btn-pk { border-color: rgba(231,76,60,0.5); }
.mode-icon { font-size: 36px; }
.mode-name { font-size: 20px; font-weight: 700; }
.mode-desc { font-size: 12px; color: rgba(255,255,255,0.5); }

/* === Solo Level Selection === */
.solo-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; background: rgba(0,0,0,0.3);
}
.solo-title { font-size: 18px; font-weight: 700; }
.level-list {
  flex: 1; display: grid; grid-template-columns: 1fr;
  gap: 14px; padding: 24px 20px; align-content: start;
}
@media (min-width: 480px) {
  .level-list { grid-template-columns: 1fr 1fr; }
}
.level-card {
  display: flex; flex-direction: column; align-items: center;
  padding: 24px 20px; border-radius: 16px;
  background: rgba(255,255,255,0.06); border: 2px solid rgba(255,255,255,0.12);
  cursor: pointer; transition: all 0.2s; position: relative;
}
.level-card:active:not(.locked) { background: rgba(255,255,255,0.12); }
.level-card.completed { border-color: rgba(241,196,15,0.4); background: rgba(241,196,15,0.05); }
.level-card.locked { opacity: 0.45; cursor: not-allowed; }
.level-emoji { font-size: 40px; margin-bottom: 8px; }
.level-name { font-size: 20px; font-weight: 700; margin-bottom: 4px; }
.level-subtitle { font-size: 13px; color: rgba(255,255,255,0.5); margin-bottom: 8px; }
.level-stars { font-size: 24px; letter-spacing: 4px; }
.level-lock {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
  background: rgba(0,0,0,0.7); padding: 8px 16px; border-radius: 8px;
  font-size: 13px; white-space: nowrap;
}
.hongyazi-tag {
  display: inline-block; background: #e74c3c; color: #fff;
  font-size: 10px; padding: 2px 6px; border-radius: 4px;
  vertical-align: middle; margin-left: 4px;
}

/* === Quiz Common === */
.quiz-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 16px; background: rgba(0,0,0,0.3);
}
.quiz-progress { font-size: 14px; color: rgba(255,255,255,0.7); }
.quiz-score { color: #f1c40f; font-weight: 700; margin-left: 8px; }
.quiz-timer {
  font-size: 20px; font-weight: 700; padding: 4px 12px;
  border-radius: 20px; background: rgba(255,255,255,0.1);
  min-width: 56px; text-align: center; transition: all 0.3s;
}
.quiz-timer.safe { background: #27ae60; }
.quiz-timer.warn { background: #f39c12; }
.quiz-timer.danger { background: #e74c3c; animation: pulse 0.5s ease-in-out infinite; }
.quiz-timer.urgent { animation: pulse 0.5s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.6; transform: scale(1.08); } }
.quiz-body { flex: 1; padding: 20px; display: flex; flex-direction: column; transition: opacity 0.35s ease; }
.quiz-body.fade-out { opacity: 0; }
.quiz-question {
  font-size: 17px; font-weight: 600; line-height: 1.6;
  padding: 16px 18px; background: rgba(255,255,255,0.08); border-radius: 12px;
  margin-bottom: 20px; border-left: 4px solid #e74c3c;
}
.quiz-options { display: flex; flex-direction: column; gap: 10px; }
.quiz-option.feedback-flash { animation: feedbackFlash 0.4s ease; }
@keyframes feedbackFlash { 0% { transform: scale(1); } 30% { transform: scale(1.02); } 100% { transform: scale(1); } }
.quiz-option {
  padding: 13px 16px; border-radius: 10px; font-size: 15px;
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.12);
  cursor: pointer; transition: all 0.15s;
  display: flex; align-items: center; gap: 12px;
}
.quiz-option:active { background: rgba(231,76,60,0.3); border-color: #e74c3c; }
.quiz-option.correct { background: rgba(39,174,96,0.3); border-color: #27ae60; color: #27ae60; }
.quiz-option.wrong { background: rgba(231,76,60,0.3); border-color: #e74c3c; color: #e74c3c; }
.quiz-option.disabled { pointer-events: none; opacity: 0.7; }
.quiz-option.pk-chosen { border-color: #f1c40f; background: rgba(241,196,15,0.2); }
.quiz-option-prefix {
  width: 28px; height: 28px; border-radius: 50%;
  background: rgba(255,255,255,0.12); display: flex;
  align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; flex-shrink: 0;
}

/* === Solo: Promotion Animation === */
.promo-container {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; height: 100%; padding: 40px 20px;
  text-align: center; position: relative; overflow: hidden;
}
.promo-container::before {
  content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  background: radial-gradient(ellipse at center, rgba(241,196,15,0.1) 0%, transparent 70%);
  pointer-events: none;
}
.promo-stars {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  pointer-events: none; overflow: hidden;
}
.promo-star {
  position: absolute; width: 4px; height: 4px;
  background: #f1c40f; border-radius: 50%;
  animation: starFloat linear infinite;
}
@keyframes starFloat {
  0% { transform: translateY(0) translateX(0); opacity: 0; }
  20% { opacity: 0.6; }
  100% { transform: translateY(-100vh) translateX(40px); opacity: 0; }
}
.promo-badge {
  font-size: 80px; animation: promoBounce 0.6s ease-out, glowPulse 2s ease-in-out 0.6s infinite;
  filter: drop-shadow(0 0 20px rgba(241,196,15,0.5));
}
@keyframes promoBounce {
  0% { transform: scale(0); opacity: 0; }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); opacity: 1; }
}
@keyframes glowPulse {
  0%, 100% { filter: drop-shadow(0 0 20px rgba(241,196,15,0.3)); }
  50% { filter: drop-shadow(0 0 40px rgba(241,196,15,0.6)); }
}
.promo-title { font-size: 28px; font-weight: 800; margin: 20px 0 8px; color: #f1c40f; }
.promo-rank { font-size: 36px; font-weight: 800; margin-bottom: 8px; }
.promo-desc { font-size: 16px; color: rgba(255,255,255,0.5); margin-bottom: 40px; }

/* === Result Common === */
.result-container {
  display: flex; flex-direction: column; align-items: center;
  padding: 40px 20px 60px; text-align: center; min-height: 100%;
}
.result-icon { font-size: 56px; margin-bottom: 12px; }
.result-title { font-size: 24px; font-weight: 700; margin-bottom: 16px; }
.result-score { font-size: 48px; font-weight: 800; margin-bottom: 20px; color: #f1c40f; }
.result-stars { font-size: 36px; letter-spacing: 8px; margin-bottom: 16px; }
.result-stars span { animation: starPop 0.4s ease-out; }
.result-stars span:nth-child(2) { animation-delay: 0.2s; }
.result-stars span:nth-child(3) { animation-delay: 0.4s; }
@keyframes starPop { 0% { transform: scale(0) rotate(-30deg); opacity: 0; } 60% { transform: scale(1.3) rotate(5deg); } 100% { transform: scale(1) rotate(0); opacity: 1; } }
.result-ai-tip { font-size: 13px; color: rgba(255,255,255,0.6); font-style: italic; margin-bottom: 20px; max-width: 320px; line-height: 1.5; }
.result-detail {
  display: flex; gap: 24px; margin-bottom: 24px;
  background: rgba(255,255,255,0.06); border-radius: 12px; padding: 16px 24px;
}
.result-item { text-align: center; }
.result-label { display: block; font-size: 12px; color: rgba(255,255,255,0.5); margin-bottom: 4px; }
.result-value { font-size: 20px; font-weight: 700; }
.result-analysis {
  width: 100%; max-width: 420px; margin-bottom: 32px; text-align: left;
}
.result-analysis h3 {
  font-size: 14px; color: rgba(255,255,255,0.5); margin-bottom: 12px; text-align: center;
}
.analysis-item {
  background: rgba(255,255,255,0.05); border-radius: 8px;
  padding: 10px 14px; margin-bottom: 8px; font-size: 13px; line-height: 1.5;
}
.analysis-item .analysis-q { color: rgba(255,255,255,0.9); margin-bottom: 4px; }
.analysis-item .analysis-a { color: rgba(255,255,255,0.5); font-size: 12px; }
.analysis-item.analysis-correct { border-left: 3px solid #27ae60; }
.analysis-item.analysis-wrong { border-left: 3px solid #e74c3c; }
#btn-solo-replay, #btn-solo-next-level, #btn-pk-again { margin-bottom: 10px; }
#btn-solo-next-level { background: linear-gradient(135deg, #f1c40f, #e67e22); }

/* === PK Login === */
.pk-login-container {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; height: 100%; padding: 40px 24px; gap: 12px;
}
.pk-login-logo { font-size: 56px; }
.pk-login-title { font-size: 24px; font-weight: 800; }
.pk-login-desc { font-size: 14px; color: rgba(255,255,255,0.5); margin-bottom: 16px; }
.pk-login-form { width: 100%; max-width: 300px; display: flex; flex-direction: column; gap: 6px; }
.pk-label { font-size: 13px; color: rgba(255,255,255,0.6); }
.pk-input {
  width: 100%; padding: 12px 14px; border-radius: 8px; border: 1px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.08); color: #fff; font-size: 16px; outline: none;
  font-family: inherit;
}
.pk-input:focus { border-color: #e74c3c; }
.pk-hint { font-size: 12px; color: rgba(255,255,255,0.35); margin-top: 12px; }

/* === PK Lobby === */
.pk-lobby-container {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; height: 100%; padding: 40px 24px; gap: 16px;
}
.pk-lobby-logo { font-size: 56px; }
.pk-lobby-title { font-size: 24px; font-weight: 800; margin-bottom: 24px; }
.pk-divider {
  display: flex; align-items: center; width: 100%; max-width: 260px; gap: 12px;
  color: rgba(255,255,255,0.3); font-size: 13px;
}
.pk-divider::before, .pk-divider::after {
  content: ''; flex: 1; height: 1px; background: rgba(255,255,255,0.15);
}
.pk-join-group {
  display: flex; gap: 8px; width: 100%; max-width: 300px;
}
.pk-join-group .pk-input { flex: 1; }

/* === PK Waiting === */
.pk-waiting-container {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; height: 100%; padding: 40px 24px; gap: 16px;
}
.pk-waiting-spin {
  font-size: 56px; animation: spin 2s linear infinite;
}
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.pk-room-info {
  display: flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,0.08); padding: 12px 20px; border-radius: 12px;
  font-size: 16px;
}
.pk-room-id-display { font-size: 28px; font-weight: 800; letter-spacing: 6px; color: #f1c40f; }
.pk-players-list {
  display: flex; flex-direction: column; gap: 10px; margin-top: 16px; width: 100%; max-width: 300px;
}
.pk-player-tag {
  display: flex; align-items: center; gap: 10px;
  background: rgba(255,255,255,0.06); padding: 12px 16px; border-radius: 10px;
  font-size: 16px; border: 1px solid rgba(255,255,255,0.1);
}
.pk-player-avatar { font-size: 24px; }
.pk-you-tag {
  background: #e74c3c; color: #fff; font-size: 11px;
  padding: 2px 8px; border-radius: 10px; margin-left: auto;
}

/* === PK Battle === */
.pk-battle-top {
  padding: 10px 16px; background: rgba(0,0,0,0.3);
}
.pk-battle-players { display: flex; justify-content: space-around; }
.pk-battle-player { text-align: center; }
.pk-bp-avatar { font-size: 32px; }
.pk-bp-name { font-size: 13px; color: rgba(255,255,255,0.7); }
.pk-bp-score { font-size: 22px; font-weight: 800; color: #f1c40f; }
.pk-battle-mid {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 16px; background: rgba(0,0,0,0.15);
}
.pk-timer { }
.pk-status { font-size: 13px; color: rgba(255,255,255,0.5); }
.pk-status.pk-correct { color: #27ae60; }
.pk-status.pk-wrong { color: #e74c3c; }

/* === PK Result === */
.pk-result-scores {
  display: flex; align-items: center; justify-content: center; gap: 20px;
  margin-bottom: 24px; padding: 20px;
  background: rgba(255,255,255,0.06); border-radius: 16px;
}
.pk-r-player { text-align: center; }
.pk-r-name { font-size: 14px; color: rgba(255,255,255,0.6); margin-bottom: 4px; }
.pk-r-score { font-size: 40px; font-weight: 800; color: #f1c40f; }
.pk-r-label { font-size: 12px; color: rgba(255,255,255,0.5); }
.pk-r-vs { font-size: 24px; font-weight: 800; color: rgba(255,255,255,0.3); }

/* === Mobile === */
@media (max-width: 380px) {
  .home-logo { font-size: 56px; }
  .home-title { font-size: 28px; }
  .quiz-question { font-size: 16px; }
  .result-score { font-size: 40px; }
  .pk-r-score { font-size: 32px; }
}

/* === Home Header / User Profile === */
.home-header {
  display: flex; align-items: center; justify-content: flex-end;
  padding: 12px 16px; min-height: 48px;
}
.user-profile {
  display: flex; align-items: center; gap: 8px;
  padding: 4px 12px 4px 4px;
  background: rgba(255,255,255,0.08); border-radius: 24px;
  cursor: pointer; transition: background 0.2s;
}
.user-profile:hover { background: rgba(255,255,255,0.12); }
.user-avatar { width: 28px; height: 28px; flex-shrink: 0; }
.user-name {
  font-size: 14px; font-weight: 600; color: rgba(255,255,255,0.9);
  max-width: 100px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.btn-login-entry {
  padding: 6px 16px; font-size: 13px;
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  color: #fff; border: none; border-radius: 16px; cursor: pointer;
  font-weight: 600;
}
.btn-login-entry:hover { opacity: 0.9; }

/* === WeChat Login Button === */
.btn-wx-login {
  display: block; width: 100%; padding: 14px 20px;
  font-size: 17px; font-weight: 700;
  background: linear-gradient(135deg, #07C160, #06AD56);
  color: #fff; border: none; border-radius: 12px; cursor: pointer;
  box-shadow: 0 4px 12px rgba(7,193,96,0.3);
  transition: transform 0.15s, box-shadow 0.15s;
}
.btn-wx-login:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(7,193,96,0.4); }
.btn-wx-login:active { transform: translateY(0); }
.btn-wx-login:disabled { opacity: 0.6; cursor: not-allowed; }

/* === PK Lobby User === */
.pk-lobby-user {
  font-size: 15px; color: rgba(255,255,255,0.7); margin-bottom: 20px;
  padding: 8px 16px; background: rgba(255,255,255,0.05);
  border-radius: 10px; text-align: center;
}

/* === Match Search Animation === */
.match-search-animation {
  position: relative; width: 100px; height: 100px;
  margin: 20px auto 16px;
}
.match-spinner {
  font-size: 48px; line-height: 100px; text-align: center;
  animation: matchPulse 1.5s ease-in-out infinite;
}
.match-pulse {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  border-radius: 50%; border: 2px solid rgba(241,196,15,0.3);
  animation: pulseRing 2s ease-out infinite;
}
@keyframes matchPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}
@keyframes pulseRing {
  0% { transform: scale(0.8); opacity: 1; }
  100% { transform: scale(2); opacity: 0; }
}

/* === Match Timer === */
.match-timer {
  font-size: 20px; font-weight: 700; color: #f1c40f;
  text-align: center; margin-bottom: 8px; font-variant-numeric: tabular-nums;
}

/* === Match Progress Bar === */
.match-progress-container {
  width: 240px; max-width: 80%; margin: 16px auto 0;
}
.match-bar-bg {
  height: 6px; background: rgba(255,255,255,0.1);
  border-radius: 3px; overflow: hidden;
}
.match-bar-fill {
  height: 100%; width: 0%; background: linear-gradient(90deg, #f1c40f, #e67e22);
  border-radius: 3px; transition: width 0.5s ease;
}
.match-range-hint {
  font-size: 12px; color: rgba(255,255,255,0.4);
  text-align: center; margin-top: 6px;
}

/* === Level Card Current Highlight === */
.level-card.current {
  border-color: #f1c40f;
  box-shadow: 0 0 20px rgba(241,196,15,0.25);
  position: relative;
}
.level-card.current::after {
  content: '继续闯关';
  position: absolute; top: 8px; right: 12px;
  font-size: 10px; color: #fff;
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  padding: 2px 8px; border-radius: 10px;
  font-weight: 700; animation: pulseTag 2s ease-in-out infinite;
}
@keyframes pulseTag {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* === Answer chained feedback (disabled state) === */
.quiz-option.disabled { pointer-events: none; opacity: 0.8; }
.feedback-flash { animation: flashIn 0.3s ease-out; }
@keyframes flashIn { from { transform: scale(0.95); } to { transform: scale(1); } }

/* === Transitions === */
.screen { animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* === 首页头部 === */
.home-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: linear-gradient(to bottom, rgba(0,0,0,0.5), transparent);
}
.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}
.btn-settings {
  background: rgba(255,255,255,0.15);
  border: none;
  font-size: 20px;
  width: 36px; height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition: background 0.2s;
}
.btn-settings:active { background: rgba(255,255,255,0.3); }

/* === 下拉菜单 === */
.dropdown-menu {
  position: fixed;
  top: 48px;
  right: 12px;
  background: rgba(30, 10, 10, 0.95);
  border: 1px solid rgba(212, 175, 55, 0.4);
  border-radius: 12px;
  padding: 8px 0;
  min-width: 220px;
  z-index: 999;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  backdrop-filter: blur(12px);
  animation: dropdownIn 0.2s ease-out;
}
@keyframes dropdownIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}
.dropdown-item {
  display: flex;
  align-items: center;
  padding: 10px 16px;
  cursor: pointer;
  gap: 12px;
  transition: background 0.15s;
  color: #f0e6d2;
}
.dropdown-item:active { background: rgba(212, 175, 55, 0.15); }
.dd-icon { font-size: 20px; width: 28px; text-align: center; flex-shrink: 0; }
.dd-label { font-size: 15px; font-weight: 500; }
.dd-sub { font-size: 12px; color: #c0a060; margin-top: 2px; }
.dd-toggle {
  margin-left: auto;
  font-size: 13px;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 10px;
  background: rgba(76, 175, 80, 0.3);
  color: #81c784;
}
.dd-toggle.off {
  background: rgba(158, 158, 158, 0.3);
  color: #9e9e9e;
}
.dropdown-divider {
  height: 1px;
  margin: 4px 12px;
  background: rgba(212, 175, 55, 0.2);
}
.dd-timer-row { cursor: default; }
.dd-timer-row:active { background: transparent; }
.dd-timer-controls {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
}
.dd-timer-btn {
  width: 28px; height: 28px;
  border: 1px solid rgba(212, 175, 55, 0.5);
  background: rgba(255,255,255,0.08);
  color: #f0e6d2;
  border-radius: 6px;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.dd-timer-btn:active { background: rgba(212, 175, 55, 0.3); }
.dd-timer-btn:disabled { opacity: 0.3; cursor: not-allowed; }
#dd-timer-val { font-size: 15px; font-weight: 600; min-width: 30px; text-align: center; }

/* ═══════════════════════════════════════════════
   v6.0 学习奖章系统 + 汉阳造步枪图标
   ═══════════════════════════════════════════════ */

/* === 汉阳造步枪交叉图标（纯 CSS 绘制，两支步枪交叉）=== */
.rifle-icon {
  position: relative;
  display: inline-block;
  width: 1em; height: 1em;
  font-size: 56px;
  vertical-align: middle;
  flex-shrink: 0;
}
.rifle-icon i {
  position: absolute; top: 50%; left: 50%;
  width: 0.92em; height: 0.13em;
  border-radius: 0.05em;
  /* 木质枪托 → 钢制枪管 */
  background: linear-gradient(to right,
    #5d3817 0%, #7a4a21 18%, #9c6b30 26%,
    #2b2b2b 28%, #454545 62%, #5f5f5f 82%, #7d7d7d 100%);
  box-shadow: 0 0.02em 0.06em rgba(0,0,0,0.6);
}
.rifle-icon i::before { /* 枪托底板 */
  content: ''; position: absolute;
  left: -0.04em; top: -0.045em;
  width: 0.12em; height: 0.22em;
  background: linear-gradient(to bottom, #6b3e1e, #4a2a10);
  border-radius: 0.03em;
}
.rifle-icon i::after { /* 枪机 / 准星 */
  content: ''; position: absolute;
  right: 0.16em; top: -0.055em;
  width: 0.05em; height: 0.06em;
  background: #1c1c1c;
  border-radius: 0.015em;
}
/* 两支步枪交叉：枪托朝下，枪管交叉朝上 */
.rifle-icon i:first-child { transform: translate(-50%, -50%) rotate(-42deg); }
.rifle-icon i:last-child  { transform: translate(-50%, -50%) scaleX(-1) rotate(-42deg); }
.rifle-icon-sm { font-size: 26px; }
.rifle-icon-xs { font-size: 20px; }
.btn-mode .rifle-icon { margin-right: 10px; }
#btn-start-match .rifle-icon { margin-right: 6px; }

/* === 学习奖章页：顶部状态区 === */
.medal-status {
  display: flex; align-items: center; gap: 16px;
  margin: 20px 20px 0; padding: 18px 20px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(241,196,15,0.25);
  border-radius: 16px;
}
.medal-current-icon {
  font-size: 52px;
  filter: drop-shadow(0 0 12px rgba(241,196,15,0.4));
}
.medal-current-info { flex: 1; min-width: 0; }
.medal-current-name { font-size: 20px; font-weight: 800; margin-bottom: 2px; }
.medal-points { font-size: 14px; color: #f1c40f; font-weight: 700; margin-bottom: 8px; }
.medal-progress-bg {
  height: 8px; background: rgba(255,255,255,0.12);
  border-radius: 4px; overflow: hidden;
}
.medal-progress-fill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, #f1c40f, #e74c3c);
  border-radius: 4px; transition: width 0.6s ease;
}
.medal-progress-hint { font-size: 12px; color: rgba(255,255,255,0.5); margin-top: 6px; }

/* === 开始答题按钮区 === */
.medal-start-wrap { padding: 18px 20px 4px; text-align: center; }

/* === 五枚奖章卡 === */
.medal-list {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 12px; padding: 16px 20px 40px;
}
@media (min-width: 480px) {
  .medal-list { grid-template-columns: repeat(3, 1fr); }
}
.medal-card {
  display: flex; flex-direction: column; align-items: center;
  padding: 18px 12px; border-radius: 14px;
  background: rgba(255,255,255,0.06);
  border: 2px solid rgba(255,255,255,0.12);
  transition: all 0.25s; position: relative;
}
.medal-card.unlocked { background: rgba(241,196,15,0.06); }
.medal-card.current {
  border-color: #f1c40f !important;
  box-shadow: 0 0 18px rgba(241,196,15,0.3);
}
.medal-card.locked { opacity: 0.4; filter: grayscale(0.8); }
.medal-card-icon { font-size: 38px; margin-bottom: 6px; }
.medal-card-name { font-size: 15px; font-weight: 700; margin-bottom: 2px; }
.medal-card-req { font-size: 12px; color: rgba(255,255,255,0.55); margin-bottom: 6px; }
.medal-card-state {
  font-size: 11px; font-weight: 700; padding: 2px 10px; border-radius: 10px;
  background: rgba(255,255,255,0.1); color: rgba(255,255,255,0.6);
}
.medal-card.unlocked .medal-card-state { background: rgba(39,174,96,0.25); color: #2ecc71; }
.medal-card.current .medal-card-state {
  background: linear-gradient(135deg, #e74c3c, #c0392b); color: #fff;
}

/* === 结算页：奖章升级横幅 + PK 积分 === */
.medal-up-banner {
  font-size: 16px; font-weight: 800; color: #f1c40f;
  background: rgba(241,196,15,0.12);
  border: 1px solid rgba(241,196,15,0.45);
  border-radius: 12px; padding: 10px 20px; margin-bottom: 16px;
  animation: promoBounce 0.6s ease-out;
}
.pk-r-points {
  font-size: 15px; font-weight: 700; color: #f1c40f;
  margin: -12px 0 16px;
}
