/* ============================================================
   智能对联工具 - 中国风红金主题
   ============================================================ */

:root {
  --primary: #c41e3a;
  --primary-light: #d9363e;
  --secondary: #8b4513;
  --gold: #d4af37;
  --gold-light: #e6c55a;
  --bg-paper: #fef6e4;
  --bg-warm: #f5e6d3;
  --text-dark: #2c1810;
  --text-muted: #6b5447;
  --shadow: rgba(196, 30, 58, 0.15);
  --green: #4caf50;
  --green-dark: #2e7d32;
  --blue: #1976d2;
  --orange: #f57c00;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'STKaiti', 'KaiTi', 'Microsoft YaHei', 'PingFang SC', serif;
  background: linear-gradient(135deg, #c41e3a 0%, #8b4513 50%, #2c1810 100%);
  min-height: 100vh;
  padding: 40px 20px;
  position: relative;
  overflow-x: hidden;
}

body::before,
body::after {
  content: '';
  position: fixed;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, transparent 70%);
  border-radius: 50%;
  z-index: 0;
  pointer-events: none;
}

body::before {
  top: -100px;
  left: -100px;
  animation: float 20s ease-in-out infinite;
}

body::after {
  bottom: -100px;
  right: -100px;
  animation: float 25s ease-in-out infinite reverse;
}

/* ============================================================
   Container & Card
   ============================================================ */

.container {
  max-width: 1000px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.header-decoration {
  text-align: center;
  margin-bottom: 30px;
}

.site-logo {
  display: inline-block;
  width: 56px;
  height: 56px;
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
  animation: sealPop 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  object-fit: contain;
}

.main-card {
  background: linear-gradient(to bottom, #fef6e4 0%, #f5e6d3 100%);
  border-radius: 24px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.5);
  overflow: hidden;
  border: 2px solid var(--gold);
  position: relative;
}

.main-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 8px;
  background: repeating-linear-gradient(
    90deg,
    var(--primary) 0px,
    var(--primary) 20px,
    var(--gold) 20px,
    var(--gold) 40px
  );
  z-index: 2;
}

/* ============================================================
   Header
   ============================================================ */

.header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: white;
  padding: 40px 30px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.header::before,
.header::after {
  content: '\1F3EE';
  position: absolute;
  font-size: 60px;
  opacity: 0.15;
  animation: swing 3s ease-in-out infinite;
}

.header::before {
  top: -10px;
  left: 30px;
}

.header::after {
  top: -10px;
  right: 30px;
  animation-delay: 1.5s;
}

.header h1 {
  font-size: 36px;
  margin-bottom: 12px;
  text-shadow: 3px 3px 6px rgba(0,0,0,0.3);
  letter-spacing: 6px;
  position: relative;
  display: inline-block;
}

.header h1::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 2px;
  background: linear-gradient(to right, transparent, var(--gold), transparent);
}

.subtitle {
  font-size: 15px;
  opacity: 0.95;
  margin-top: 16px;
  letter-spacing: 2px;
  font-weight: 300;
}

/* ============================================================
   Tab Navigation
   ============================================================ */

.tab-nav {
  display: flex;
  background: linear-gradient(to bottom, #3d1a0f, #2c1810);
  border-bottom: 3px solid var(--gold);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.tab-btn {
  flex: 1;
  padding: 16px 12px;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  position: relative;
  font-family: inherit;
  white-space: nowrap;
  letter-spacing: 2px;
}

.tab-btn:hover {
  color: var(--gold);
  background: rgba(212, 175, 55, 0.1);
}

.tab-btn.active {
  color: var(--gold);
  background: rgba(212, 175, 55, 0.15);
}

.tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 20%;
  right: 20%;
  height: 3px;
  background: var(--gold);
  border-radius: 3px 3px 0 0;
}

/* Sub-tab Navigation (Games) */
.sub-tab-nav {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.sub-tab-btn {
  padding: 10px 20px;
  border: 2px solid var(--gold);
  background: white;
  color: var(--text-dark);
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  font-family: inherit;
}

.sub-tab-btn:hover {
  background: var(--bg-paper);
  border-color: var(--primary);
}

.sub-tab-btn.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* ============================================================
   Tab Content
   ============================================================ */

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

.sub-tab-content {
  display: none;
}

.sub-tab-content.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

.content {
  padding: 32px;
}

/* ============================================================
   Form Elements
   ============================================================ */

.input-group {
  margin-bottom: 24px;
}

.input-row {
  display: flex;
  gap: 16px;
}

.input-group.half {
  flex: 1;
}

.input-group label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  font-weight: 600;
  color: var(--text-dark);
  font-size: 15px;
}

.input-group label::before {
  content: '';
  width: 4px;
  height: 16px;
  background: var(--primary);
  border-radius: 2px;
  flex-shrink: 0;
}

.input-group input,
.input-group select {
  width: 100%;
  padding: 14px 18px;
  border: 2px solid var(--gold);
  border-radius: 10px;
  font-size: 16px;
  transition: all 0.3s;
  background: white;
  color: var(--text-dark);
  font-family: inherit;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.input-group input:focus,
.input-group select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 4px 16px var(--shadow), 0 0 0 3px rgba(196, 30, 58, 0.1);
  transform: translateY(-1px);
}

.input-group input::placeholder {
  color: #aaa;
}

/* ============================================================
   Buttons
   ============================================================ */

.button-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 24px;
  margin-bottom: 24px;
}

.button-group.single {
  grid-template-columns: 1fr;
  max-width: 300px;
  margin-left: auto;
  margin-right: auto;
}

.btn {
  padding: 14px 24px;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  font-family: inherit;
  letter-spacing: 1px;
}

.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255,255,255,0.25);
  transform: translate(-50%, -50%);
  transition: width 0.5s, height 0.5s;
}

.btn:active::before {
  width: 300px;
  height: 300px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, #a01729 100%);
  color: white;
  border: 2px solid var(--gold);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(196, 30, 58, 0.4);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn-secondary {
  background: linear-gradient(135deg, var(--secondary) 0%, #6d3710 100%);
  color: white;
  border: 2px solid var(--gold);
}

.btn-secondary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(139, 69, 19, 0.4);
}

.btn-secondary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn-small {
  padding: 8px 16px;
  font-size: 14px;
  border-radius: 8px;
}

/* ============================================================
   Accordion (Knowledge Tab)
   ============================================================ */

.accordion {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.accordion-item {
  border: 2px solid var(--gold);
  border-radius: 12px;
  overflow: hidden;
  background: white;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.accordion-header {
  width: 100%;
  padding: 18px 20px;
  background: linear-gradient(135deg, #fff8f0, #fff);
  border: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 17px;
  font-weight: 700;
  color: var(--primary);
  font-family: inherit;
  transition: background 0.3s;
}

.accordion-header:hover {
  background: linear-gradient(135deg, #fff0e0, #fff8f0);
}

.accordion-icon {
  font-size: 22px;
  font-weight: 700;
  transition: transform 0.3s;
  color: var(--gold);
  width: 24px;
  text-align: center;
}

.accordion-item.open .accordion-icon {
  transform: rotate(45deg);
}

.accordion-body {
  display: none;
  padding: 20px;
  border-top: 1px solid rgba(212, 175, 55, 0.3);
  line-height: 1.8;
  color: var(--text-dark);
  font-size: 15px;
}

.accordion-item.open .accordion-body {
  display: block;
  animation: slideDown 0.3s ease;
}

.knowledge-card {
  background: var(--bg-paper);
  border-radius: 10px;
  padding: 16px;
  margin: 12px 0;
  border-left: 4px solid var(--primary);
}

.knowledge-card h4 {
  color: var(--primary);
  margin-bottom: 10px;
  font-size: 16px;
}

.knowledge-card ul {
  list-style: none;
  padding: 0;
}

.knowledge-card ul li {
  padding: 6px 0;
  padding-left: 18px;
  position: relative;
}

.knowledge-card ul li::before {
  content: '\2022';
  color: var(--gold);
  position: absolute;
  left: 0;
  font-weight: bold;
}

.knowledge-card p {
  line-height: 1.8;
}

.example-card {
  border-left-color: var(--gold);
  background: linear-gradient(135deg, #fffbf0, #fff8e8);
}

.example-line {
  font-family: 'STKaiti', 'KaiTi', serif;
  font-size: 16px;
  padding: 6px 0;
  color: var(--text-dark);
  letter-spacing: 1px;
}

.famous-author {
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 8px;
}

.comment {
  color: var(--text-muted);
  font-size: 14px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed rgba(0,0,0,0.1);
}

/* ============================================================
   Result Display
   ============================================================ */

.result-card {
  background: linear-gradient(135deg, #fff8f0 0%, #fff 100%);
  padding: 24px;
  border-radius: 14px;
  margin-top: 20px;
  margin-bottom: 16px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
  border: 2px solid var(--gold);
  position: relative;
  animation: resultAppear 0.5s ease;
}

.result-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(to right, var(--primary), var(--gold), var(--primary));
  border-radius: 14px 14px 0 0;
}

.result-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.couplet-line {
  font-size: 18px;
  line-height: 2;
  margin: 10px 0;
  padding: 12px 16px;
  background: white;
  border-radius: 8px;
  border-left: 4px solid var(--primary);
  transition: all 0.3s;
}

.couplet-line:hover {
  transform: translateX(6px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.couplet-text {
  font-size: 22px;
  letter-spacing: 4px;
  font-weight: 500;
  color: var(--text-dark);
}

.couplet-label {
  font-size: 13px;
  color: var(--text-muted);
  margin-right: 8px;
}

.heng-pi {
  margin-top: 16px;
  padding: 14px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  border-radius: 8px;
  text-align: center;
  color: white;
  font-size: 22px;
  letter-spacing: 6px;
  font-weight: bold;
  box-shadow: 0 4px 12px var(--shadow);
}

.explanation {
  margin-top: 16px;
  padding: 14px;
  background: #f0f7ff;
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.8;
  border-left: 4px solid var(--blue);
}

/* ============================================================
   Review Results
   ============================================================ */

.review-scores {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 16px 0;
}

.score-item {
  background: white;
  padding: 14px;
  border-radius: 10px;
  text-align: center;
  border: 1px solid rgba(212, 175, 55, 0.3);
}

.score-label {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.score-stars {
  font-size: 20px;
  color: var(--gold);
  letter-spacing: 2px;
}

.score-overall {
  text-align: center;
  padding: 16px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: 10px;
  color: white;
  margin: 16px 0;
}

.score-overall .big-score {
  font-size: 36px;
  font-weight: bold;
}

.score-overall .score-label {
  color: rgba(255,255,255,0.8);
}

.review-section {
  margin: 12px 0;
  padding: 14px;
  background: white;
  border-radius: 8px;
  border-left: 4px solid var(--gold);
}

.review-section h4 {
  color: var(--primary);
  font-size: 15px;
  margin-bottom: 8px;
}

.review-section p {
  color: var(--text-dark);
  font-size: 14px;
  line-height: 1.8;
}

.suggestion-box {
  margin-top: 16px;
  padding: 16px;
  background: linear-gradient(135deg, #e8f5e9, #c8e6c9);
  border-radius: 10px;
  border: 1px solid var(--green);
}

.suggestion-box h4 {
  color: var(--green-dark);
  margin-bottom: 8px;
}

.suggestion-box p {
  color: #1b5e20;
  font-size: 14px;
  line-height: 1.8;
}

/* ============================================================
   Games Common
   ============================================================ */

.game-header {
  text-align: center;
  margin-bottom: 20px;
}

.game-header h3 {
  font-size: 22px;
  color: var(--primary);
  margin-bottom: 6px;
}

.game-header p {
  color: var(--text-muted);
  font-size: 14px;
}

.game-controls {
  margin-bottom: 20px;
}

.game-controls label {
  display: block;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 10px;
  font-size: 15px;
}

.difficulty-btns {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

.diff-btn {
  padding: 8px 20px;
  border: 2px solid var(--gold);
  background: white;
  border-radius: 20px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.3s;
  font-family: inherit;
  color: var(--text-dark);
}

.diff-btn:hover {
  border-color: var(--primary);
  background: #fff0f0;
}

.diff-btn.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.keyword-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

.keyword-btn {
  width: 44px;
  height: 44px;
  border: 2px solid var(--gold);
  background: white;
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
  font-weight: 700;
  transition: all 0.3s;
  font-family: inherit;
  color: var(--text-dark);
}

.keyword-btn:hover {
  border-color: var(--primary);
  background: #fff0f0;
  transform: scale(1.1);
}

.keyword-btn.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  transform: scale(1.1);
}

.feihua-custom {
  margin-bottom: 16px;
}

.feihua-custom input {
  width: 120px;
  padding: 10px 16px;
  border: 2px solid var(--gold);
  border-radius: 10px;
  font-size: 18px;
  text-align: center;
  font-family: inherit;
  background: white;
}

.feihua-custom input:focus {
  outline: none;
  border-color: var(--primary);
}

.game-question {
  padding: 20px;
  background: linear-gradient(135deg, #fff8f0, #fff);
  border: 2px solid var(--gold);
  border-radius: 12px;
  margin-bottom: 16px;
  text-align: center;
}

.game-question .question-label {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.game-question .question-text {
  font-size: 24px;
  letter-spacing: 4px;
  color: var(--text-dark);
  font-weight: 600;
  line-height: 1.8;
}

.game-question .question-hint {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 10px;
  font-style: italic;
}

.game-input {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  align-items: stretch;
}

.game-input input {
  flex: 1;
  padding: 14px 18px;
  border: 2px solid var(--gold);
  border-radius: 10px;
  font-size: 16px;
  font-family: inherit;
  background: white;
}

.game-input input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(196, 30, 58, 0.1);
}

.game-input .btn {
  white-space: nowrap;
  min-width: 80px;
}

.game-input.column {
  flex-direction: column;
}

.game-input.column .btn {
  align-self: center;
  min-width: 160px;
}

.hidden {
  display: none !important;
}

/* Game Score */
.game-score {
  display: flex;
  justify-content: center;
  gap: 24px;
  padding: 12px;
  background: linear-gradient(135deg, #fff8f0, #fff);
  border-radius: 10px;
  border: 1px solid rgba(212, 175, 55, 0.3);
  margin-top: 16px;
  font-size: 15px;
  color: var(--text-dark);
}

.game-score strong {
  color: var(--primary);
  font-size: 18px;
}

/* Game History (Feihualing) */
.game-history {
  max-height: 400px;
  overflow-y: auto;
  margin-bottom: 16px;
  padding: 16px;
  background: white;
  border-radius: 10px;
  border: 1px solid rgba(212, 175, 55, 0.3);
}

.history-item {
  padding: 10px 14px;
  margin: 6px 0;
  border-radius: 10px;
  font-size: 15px;
  line-height: 1.6;
  animation: fadeIn 0.3s ease;
}

.history-item.ai {
  background: linear-gradient(135deg, #f0f7ff, #e3f2fd);
  border-left: 3px solid var(--blue);
  margin-right: 40px;
}

.history-item.user {
  background: linear-gradient(135deg, #fff0f0, #fce4ec);
  border-right: 3px solid var(--primary);
  margin-left: 40px;
  text-align: right;
}

.history-item.invalid {
  opacity: 0.6;
  text-decoration: line-through;
}

.history-item .role {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.history-item .source {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Game Result Card */
.game-result-card {
  padding: 20px;
  border-radius: 12px;
  margin-top: 16px;
  animation: resultAppear 0.4s ease;
}

.game-result-card.success {
  background: linear-gradient(135deg, #e8f5e9, #c8e6c9);
  border: 2px solid var(--green);
}

.game-result-card.fail {
  background: linear-gradient(135deg, #fff3e0, #ffe0b2);
  border: 2px solid var(--orange);
}

.game-result-card.info {
  background: linear-gradient(135deg, #e3f2fd, #bbdefb);
  border: 2px solid var(--blue);
}

.game-result-card h4 {
  font-size: 18px;
  margin-bottom: 10px;
}

.game-result-card.success h4 { color: var(--green-dark); }
.game-result-card.fail h4 { color: var(--orange); }
.game-result-card.info h4 { color: var(--blue); }

.game-result-card p {
  font-size: 14px;
  line-height: 1.8;
  color: var(--text-dark);
}

.score-big {
  font-size: 48px;
  font-weight: bold;
  text-align: center;
  margin: 16px 0;
}

.score-big.high { color: var(--green-dark); }
.score-big.medium { color: var(--orange); }
.score-big.low { color: var(--primary); }

.score-detail {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin: 16px 0;
}

.score-detail-item {
  background: rgba(255,255,255,0.7);
  padding: 10px;
  border-radius: 8px;
  text-align: center;
}

.score-detail-item .label {
  font-size: 13px;
  color: var(--text-muted);
}

.score-detail-item .value {
  font-size: 20px;
  font-weight: bold;
  color: var(--primary);
}

/* Fill in the blank game */
.blank-inputs {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 16px 0;
  justify-content: center;
}

.blank-input-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.blank-input-group label {
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 600;
  white-space: nowrap;
}

.blank-input-group label::before {
  display: none;
}

.blank-input {
  width: 60px;
  height: 48px;
  border: 2px solid var(--gold);
  border-radius: 8px;
  font-size: 22px;
  text-align: center;
  font-family: inherit;
  background: white;
  color: var(--text-dark);
}

.blank-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(196, 30, 58, 0.1);
}

/* ============================================================
   Loading
   ============================================================ */

.loading {
  text-align: center;
  padding: 50px 20px;
}

.loading-spinner {
  display: inline-block;
  width: 44px;
  height: 44px;
  border: 4px solid rgba(196, 30, 58, 0.2);
  border-top: 4px solid var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.loading-text {
  margin-top: 16px;
  color: var(--text-muted);
  font-size: 15px;
}

/* Alert / Tip */
.vca-tip {
  padding: 16px 20px;
  background: linear-gradient(135deg, #fff3cd, #ffe69c);
  border-left: 5px solid #ffb020;
  border-radius: 10px;
  color: #664d03;
  font-size: 15px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  animation: fadeIn 0.3s ease;
  margin-top: 16px;
}

.vca-tip.error {
  background: linear-gradient(135deg, #fee, #fdd);
  border-left-color: var(--primary);
  color: #8b0000;
}

/* ============================================================
   Module Description Box
   ============================================================ */

.module-desc {
  margin-top: 32px;
  padding: 24px 28px;
  background: linear-gradient(135deg, #fdfaf3 0%, #f8f0e0 100%);
  border: 1px solid rgba(212, 175, 55, 0.35);
  border-radius: 14px;
  position: relative;
  line-height: 1.9;
}

.module-desc::before {
  content: '';
  position: absolute;
  top: 0;
  left: 24px;
  right: 24px;
  height: 2px;
  background: linear-gradient(to right, transparent, var(--gold), transparent);
  border-radius: 2px;
}

.module-desc-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 14px;
  padding-top: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.module-desc p {
  font-size: 14px;
  color: var(--text-dark);
  margin-bottom: 10px;
}

.module-desc p:last-child {
  margin-bottom: 0;
}

.module-desc .desc-highlight {
  color: var(--primary);
  font-weight: 600;
}

.module-desc ul {
  list-style: none;
  padding: 0;
  margin: 8px 0;
}

.module-desc ul li {
  font-size: 14px;
  color: var(--text-dark);
  padding: 4px 0 4px 20px;
  position: relative;
  line-height: 1.8;
}

.module-desc ul li::before {
  content: '\25C6';
  color: var(--gold);
  position: absolute;
  left: 0;
  font-size: 10px;
  top: 7px;
}

.module-desc .desc-tag {
  display: inline-block;
  padding: 2px 10px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1px;
  margin-right: 6px;
  vertical-align: middle;
}

.module-desc .desc-divider {
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(212, 175, 55, 0.3), transparent);
  margin: 14px 0;
}

.module-desc .desc-footer {
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px dashed rgba(212, 175, 55, 0.3);
}

/* ============================================================
   Footer
   ============================================================ */

.footer {
  text-align: center;
  margin-top: 30px;
  color: rgba(255,255,255,0.5);
  font-size: 13px;
  letter-spacing: 1px;
}

.footer p {
  margin: 4px 0;
}

.footer a {
  color: var(--gold-light);
  text-decoration: none;
}

.footer a:hover {
  text-decoration: underline;
}

/* ============================================================
   Animations
   ============================================================ */

@keyframes float {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(20px, 20px); }
}

@keyframes swing {
  0%, 100% { transform: rotate(-5deg); }
  50% { transform: rotate(5deg); }
}

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

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

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

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

@keyframes sealPop {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  60% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 768px) {
  body {
    padding: 16px 8px;
  }

  .header h1 {
    font-size: 26px;
    letter-spacing: 3px;
  }

  .subtitle {
    font-size: 13px;
  }

  .content {
    padding: 20px 16px;
  }

  .tab-btn {
    font-size: 14px;
    padding: 14px 8px;
    letter-spacing: 1px;
  }

  .input-row {
    flex-direction: column;
    gap: 0;
  }

  .button-group {
    grid-template-columns: 1fr;
  }

  .site-logo {
    width: 44px;
    height: 44px;
  }

  .couplet-text {
    font-size: 18px;
    letter-spacing: 2px;
  }

  .heng-pi {
    font-size: 18px;
    letter-spacing: 4px;
  }

  .review-scores {
    grid-template-columns: 1fr;
  }

  .score-detail {
    grid-template-columns: 1fr;
  }

  .game-input {
    flex-direction: column;
  }

  .game-score {
    flex-direction: column;
    align-items: center;
    gap: 8px;
  }

  .history-item.ai {
    margin-right: 16px;
  }

  .history-item.user {
    margin-left: 16px;
  }

  .sub-tab-nav {
    justify-content: center;
  }

  .difficulty-btns {
    justify-content: center;
  }

  .keyword-options {
    justify-content: center;
  }

  .game-question .question-text {
    font-size: 20px;
    letter-spacing: 2px;
  }
}

@media (max-width: 480px) {
  .header h1 {
    font-size: 22px;
  }

  .tab-btn {
    font-size: 13px;
    padding: 12px 6px;
  }

  .content {
    padding: 16px 12px;
  }

  .blank-inputs {
    flex-direction: column;
    align-items: center;
  }
}
