/* Minecraft 风格 - 深色主题 */
:root {
  --bg: #0F172A;
  --card: #1E293B;
  --green: #22C55E;
  --green-dark: #15803D;
  --orange: #F97316;
  --text: #E2E8F0;
  --text-dim: #94A3B8;
  --border: #334155;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  padding: 20px;
  line-height: 1.6;
}

.site-nav {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.pill {
  background: var(--card);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 14px;
  color: var(--text-dim);
}

.pill strong { color: var(--green); }

.hero {
  text-align: center;
  margin-bottom: 24px;
}

.hero h1 {
  font-size: 28px;
  margin-bottom: 8px;
  color: var(--green);
}

.subtitle {
  color: var(--text-dim);
  margin-bottom: 16px;
}

.progress {
  background: var(--card);
  height: 12px;
  border-radius: 6px;
  overflow: hidden;
  margin: 0 auto 8px;
  max-width: 300px;
}

.progress div {
  background: linear-gradient(90deg, var(--green), #4ADE80);
  height: 100%;
  transition: width 0.3s ease;
}

.progress-text {
  font-size: 14px;
  color: var(--text-dim);
}

.panel {
  background: var(--card);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
  border: 1px solid var(--border);
}

.panel .hd {
  margin-bottom: 16px;
}

.panel h2 {
  font-size: 16px;
  color: var(--text);
}

.template-box {
  background: #0F172A;
  padding: 20px;
  border-radius: 8px;
  text-align: center;
  font-size: 18px;
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.template-text .blank {
  display: inline-block;
  min-width: 80px;
  border-bottom: 2px dashed var(--orange);
  margin: 0 4px;
  padding: 4px 8px;
  text-align background: rgba(: center;
 249, 115, 22, 0.1);
}

.template-text .blank.filled {
  background: rgba(34, 197, 94, 0.2);
  border-bottom-color: var(--green);
}

.craft-area {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  min-height: 50px;
  padding: 16px;
  background: #0F172A;
  border-radius: 8px;
  margin-bottom: 12px;
}

.slot {
  min-width: 80px;
  min-height: 36px;
  border: 2px dashed var(--border);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.slot.drag-over {
  border-color: var(--green);
  background: rgba(34, 197, 94, 0.1);
}

.slot .word {
  cursor: grab;
}

.word-pool {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.word {
  background: var(--green-dark);
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 14px;
  cursor: grab;
  transition: all 0.2s;
  user-select: none;
}

.word:hover {
  background: var(--green);
  transform: scale(1.05);
}

.word.dragging {
  opacity: 0.5;
}

.word.used {
  opacity: 0.3;
  pointer-events: none;
}

.hint {
  text-align: center;
  font-size: 13px;
  color: var(--text-dim);
}

.actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin: 24px 0;
  flex-wrap: wrap;
}

.btn {
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 16px;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
}

.btn.primary {
  background: var(--green);
  color: #052012;
  font-weight: 700;
}

.btn.primary:hover {
  background: #4ADE80;
}

.btn:not(.primary):not(.ghost) {
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn:not(.primary):not(.ghost):hover {
  background: var(--border);
}

.btn.ghost {
  background: transparent;
  color: var(--text-dim);
}

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

.badge-panel {
  text-align: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--orange), #FBBF24);
  padding: 12px 24px;
  border-radius: 12px;
  margin-top: 12px;
}

.badge-icon {
  font-size: 24px;
}

.badge-name {
  font-weight: 700;
  color: #0F172A;
}

/* 弹窗 */
.modal {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.8);
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.modal.show { display: flex; }

.box {
  background: var(--card);
  border-radius: 16px;
  max-width: 400px;
  width: 90%;
  overflow: hidden;
}

.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.top .btn.ghost {
  padding: 4px 8px;
}

.body {
  padding: 24px;
  text-align: center;
  font-size: 18px;
}

.result-good {
  color: var(--green);
  font-size: 20px;
  font-weight: 700;
}

/* 成功动画 */
@keyframes successPop {
  0% { transform: scale(0.8); opacity: 0; }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); opacity: 1; }
}

.success-anim {
  animation: successPop 0.5s ease;
}

/* 审题小助手 */
.topic-input {
  width: 100%;
  padding: 14px;
  border-radius: 8px;
  border: 2px solid #334155;
  background: #0F172A;
  color: #E2E8F0;
  font-size: 16px;
  resize: vertical;
  min-height: 80px;
}

.topic-input:focus {
  outline: none;
  border-color: #22C55E;
}

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

.card {
  background: #0F172A;
  border-radius: 8px;
  padding: 16px;
  border-left: 4px solid #22C55E;
}

.card-title {
  font-weight: 700;
  color: #22C55E;
  margin-bottom: 8px;
}

.card-content {
  color: #E2E8F0;
  line-height: 1.6;
}

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

.topic-item {
  background: #0F172A;
  padding: 12px 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.topic-item:hover {
  background: #22C55E;
  color: #052012;
}

/* Tab 导航 */
.tabs { display: flex; gap: 8px; margin-right: auto; }
.tab { 
  padding: 10px 16px; 
  border-radius: 8px; 
  background: rgba(148,163,184,.12); 
  color: #94A3B8; 
  font-size: 14px; 
  cursor: pointer; 
  border: none;
  transition: all 0.2s;
}
.tab:hover { background: rgba(148,163,184,.2); }
.tab.active { background: #22C55E; color: #052012; font-weight: 700; }
.tab-content { display: none; }
.tab-content.active { display: block; }

.brand { margin-left: auto; color: #94A3B8; font-size: 14px; }
.brand strong { color: #22C55E; }

/* 看图写话 */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; margin-bottom: 6px; color: #94A3B8; font-size: 14px; }
.text-input {
  width: 100%;
  padding: 12px;
  border-radius: 8px;
  border: 2px solid #334155;
  background: #0F172A;
  color: #E2E8F0;
  font-size: 15px;
}
.text-input:focus { outline: none; border-color: #22C55E; }
.result-box {
  background: #0F172A;
  padding: 20px;
  border-radius: 8px;
  font-size: 16px;
  line-height: 1.8;
  color: #E2E8F0;
  border-left: 4px solid #22C55E;
}
