/* SkillUp Studio - 莫比乌斯环概念地图生成器 */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background: #0a0a1a;
  color: rgba(255, 255, 255, 0.85);
  font-family: 'Microsoft YaHei', 'PingFang SC', -apple-system, 'Segoe UI', sans-serif;
  line-height: 1.6;
  min-height: 100vh;
}

/* Header */
.site-header {
  text-align: center;
  padding: 48px 20px 32px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.site-header h1 {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: 4px;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 8px;
}

.site-header h1 .brand {
  color: #4ECDC4;
}

.site-header .subtitle {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.45);
  letter-spacing: 2px;
  margin-bottom: 16px;
}

/* Header Nav */
.header-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.header-nav .nav-link {
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
  font-size: 13px;
  padding: 6px 14px;
  border-radius: 6px;
  transition: all 0.2s;
  letter-spacing: 1px;
}

.header-nav .nav-link:hover,
.header-nav .nav-link.active {
  color: rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.08);
}

.header-nav .register-btn {
  background: linear-gradient(135deg, #D4A853, #B8860B);
  color: #0a0a1a;
  font-weight: 600;
  font-size: 13px;
  padding: 8px 20px;
  border-radius: 8px;
  text-decoration: none;
  letter-spacing: 2px;
  transition: all 0.25s;
  box-shadow: 0 2px 8px rgba(212, 168, 83, 0.3);
  margin-left: 12px;
}

.header-nav .register-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(212, 168, 83, 0.5);
  opacity: 1;
}

/* Geo redirect banner */
.geo-banner {
  display: none;
  text-align: center;
  padding: 10px 20px;
  background: linear-gradient(135deg, rgba(212, 168, 83, 0.15), rgba(184, 134, 11, 0.1));
  border-bottom: 1px solid rgba(212, 168, 83, 0.2);
  font-size: 13px;
  color: rgba(212, 168, 83, 0.9);
  letter-spacing: 1px;
}

.geo-banner.show { display: block; }

.geo-banner a {
  color: #D4A853;
  font-weight: 600;
  text-decoration: underline;
}

/* Main container */
.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 32px 20px 64px;
}

/* Section */
.section {
  margin-bottom: 36px;
}

.section-title {
  font-size: 16px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 16px;
  padding-left: 12px;
  border-left: 3px solid #4ECDC4;
  letter-spacing: 1px;
}

/* Step indicator */
.step-num {
  display: inline-block;
  background: rgba(78, 205, 196, 0.15);
  color: #4ECDC4;
  font-size: 12px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  margin-right: 8px;
  vertical-align: middle;
}

/* Preset cards grid */
.preset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
  contain: layout style;
}

/* Hot section */
.hot-section {
  margin-bottom: 24px;
  position: relative;
}

.hot-label {
  font-size: 12px;
  font-weight: 600;
  color: #FF6B6B;
  letter-spacing: 2px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.hot-label::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  background: #FF6B6B;
  border-radius: 50%;
  animation: pulse-dot 1.5s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(1.3); }
}

.hot-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: linear-gradient(135deg, #FF6B6B, #E55A5A);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  letter-spacing: 1px;
  z-index: 2;
}

.hot-badge.new-badge {
  background: linear-gradient(135deg, #4ECDC4, #3DBDB5);
}

/* Category tabs */
.category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.cat-tab {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.5);
  font-size: 13px;
  font-family: inherit;
  padding: 6px 16px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.25s ease;
  letter-spacing: 1px;
  white-space: nowrap;
}

.cat-tab:hover {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.7);
  border-color: rgba(255, 255, 255, 0.15);
}

.cat-tab.active {
  background: rgba(78, 205, 196, 0.12);
  border-color: rgba(78, 205, 196, 0.4);
  color: #4ECDC4;
  font-weight: 600;
}

.preset-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 16px;
  cursor: pointer;
  transition: border-color 0.25s ease, background 0.25s ease;
  position: relative;
  overflow: hidden;
}

/* 卡片隐藏：直接从布局中移除，不做过渡动画（避免 grid 布局混乱） */
.preset-card.card-hidden {
  display: none;
}

/* 卡片出现动画（仅用于 Tab 切换后新出现的卡片） */
.preset-card.card-appear {
  animation: cardReveal 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes cardReveal {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.preset-card:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(78, 205, 196, 0.3);
  transform: translateY(-1px);
}

.preset-card.selected {
  border-color: #4ECDC4;
  background: rgba(78, 205, 196, 0.08);
  box-shadow: 0 0 20px rgba(78, 205, 196, 0.1);
}

.preset-card .card-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 6px;
  color: rgba(255, 255, 255, 0.9);
}

.preset-card .card-meta {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.4);
}

.preset-card .card-desc {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 8px;
  line-height: 1.5;
}

.preset-card .check-mark {
  position: absolute;
  top: 10px;
  right: 12px;
  color: #4ECDC4;
  font-size: 18px;
  display: none;
}

.preset-card.selected .check-mark {
  display: block;
}

/* Upload area */
.upload-area {
  border: 2px dashed rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 28px;
  text-align: center;
  transition: all 0.3s ease;
  cursor: pointer;
}

.upload-area:hover,
.upload-area.drag-over {
  border-color: rgba(78, 205, 196, 0.4);
  background: rgba(78, 205, 196, 0.03);
}

.upload-area .upload-icon {
  font-size: 28px;
  color: rgba(255, 255, 255, 0.3);
  margin-bottom: 8px;
}

.upload-area .upload-text {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.5);
}

.upload-area .upload-hint {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.3);
  margin-top: 4px;
}

.upload-area input[type="file"] {
  display: none;
}

/* Config panel */
.config-panel {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 20px;
}

.config-row {
  margin-bottom: 16px;
}

.config-row:last-child {
  margin-bottom: 0;
}

.config-label {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 8px;
  display: block;
}

.title-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 10px 14px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
}

.title-input:focus {
  border-color: #4ECDC4;
}

.title-input::placeholder {
  color: rgba(255, 255, 255, 0.25);
}

/* Emptiness checkboxes */
.emptiness-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.emptiness-item {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 6px 12px;
  cursor: pointer;
  transition: all 0.2s;
  user-select: none;
}

.emptiness-item:hover {
  background: rgba(255, 255, 255, 0.07);
}

.emptiness-item input[type="checkbox"] {
  accent-color: #4ECDC4;
  cursor: pointer;
}

.emptiness-item label {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
}

.btn-toggle-all {
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.5);
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  margin-left: 8px;
  vertical-align: middle;
}

.btn-toggle-all:hover {
  border-color: rgba(255, 255, 255, 0.3);
  color: rgba(255, 255, 255, 0.7);
}

/* Generate button */
.btn-generate {
  display: block;
  width: 100%;
  padding: 16px;
  background: #4ECDC4;
  color: #0a0a1a;
  font-size: 17px;
  font-weight: 600;
  font-family: inherit;
  letter-spacing: 2px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-generate:hover {
  background: #5de0d7;
  box-shadow: 0 4px 24px rgba(78, 205, 196, 0.3);
  transform: translateY(-1px);
}

.btn-generate:active {
  transform: translateY(0);
}

.btn-generate:disabled {
  background: rgba(78, 205, 196, 0.3);
  color: rgba(10, 10, 26, 0.5);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Result area */
.result-area {
  margin-top: 24px;
  display: none;
}

.result-area.show {
  display: block;
}

.result-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(78, 205, 196, 0.2);
  border-radius: 12px;
  padding: 24px;
  animation: fadeIn 0.4s ease;
}

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

.result-card .result-title {
  font-size: 16px;
  font-weight: 600;
  color: #4ECDC4;
  margin-bottom: 12px;
}

.result-stats {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.stat-item {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
}

.stat-item .stat-val {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 600;
}

.btn-download {
  display: inline-block;
  padding: 10px 24px;
  background: rgba(78, 205, 196, 0.15);
  border: 1px solid rgba(78, 205, 196, 0.4);
  color: #4ECDC4;
  font-size: 14px;
  font-family: inherit;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.btn-download:hover {
  background: rgba(78, 205, 196, 0.25);
  border-color: #4ECDC4;
}

/* Result actions */
.result-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.result-hint {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.65);
  margin-top: 12px;
  letter-spacing: 0.5px;
}

.hint-highlight {
  color: #4FC3F7;
  font-weight: 700;
  background: rgba(79, 195, 247, 0.12);
  padding: 1px 4px;
  border-radius: 3px;
}

.btn-preview {
  display: inline-block;
  padding: 10px 24px;
  background: #4ECDC4;
  border: 1px solid #4ECDC4;
  color: #0a0a1a;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-preview:hover {
  background: #5de0d7;
  box-shadow: 0 2px 12px rgba(78, 205, 196, 0.3);
}

/* Error message */
.error-msg {
  background: rgba(255, 107, 107, 0.08);
  border: 1px solid rgba(255, 107, 107, 0.2);
  border-radius: 8px;
  padding: 16px;
  color: #FF6B6B;
  font-size: 13px;
  margin-top: 16px;
  display: none;
}

.error-msg.show {
  display: block;
  animation: fadeIn 0.3s ease;
}

/* Preview overlay */
.preview-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  background: #0a0a1a;
  display: none;
  flex-direction: column;
  isolation: isolate;
  overscroll-behavior: contain;
}

.preview-overlay.show {
  display: flex;
}

.preview-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.preview-label {
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 1px;
}

.btn-close-preview {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.7);
  font-size: 22px;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  line-height: 1;
  padding: 0;
}

.btn-close-preview:hover {
  background: rgba(255, 107, 107, 0.15);
  border-color: rgba(255, 107, 107, 0.3);
  color: #FF6B6B;
}

.preview-iframe {
  flex: 1;
  width: 100%;
  min-height: 0;
  border: none;
  background: #0a0a1a;
}

/* Divider */
.divider {
  text-align: center;
  margin: 16px 0;
  position: relative;
  color: rgba(255, 255, 255, 0.25);
  font-size: 12px;
}

.divider::before,
.divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: calc(50% - 40px);
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
}

.divider::before { left: 0; }
.divider::after { right: 0; }

/* Footer */
.site-footer {
  text-align: center;
  padding: 32px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.3);
  font-size: 12px;
  letter-spacing: 1px;
}

.site-footer a {
  color: rgba(78, 205, 196, 0.6);
  text-decoration: none;
  transition: color 0.2s;
}

.site-footer a:hover {
  color: #4ECDC4;
}

/* Or label */
.or-divider {
  display: flex;
  align-items: center;
  margin: 20px 0;
  gap: 16px;
}

.or-divider::before,
.or-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
}

.or-text {
  color: rgba(78, 205, 196, 0.6);
  font-size: 13px;
  letter-spacing: 1px;
  white-space: nowrap;
}

/* ─── 自由输入模式 ─── */
.mode-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 20px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 10px;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.mode-tab {
  flex: 1;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.45);
  font-size: 14px;
  font-family: inherit;
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.25s ease;
  letter-spacing: 1px;
}

.mode-tab:hover {
  color: rgba(255, 255, 255, 0.7);
}

.mode-tab.active {
  background: rgba(78, 205, 196, 0.12);
  color: #4ECDC4;
  font-weight: 600;
}

.free-input-section {
  margin-bottom: 16px;
}

.free-input-label {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: 8px;
  display: block;
  letter-spacing: 1px;
}

.free-textarea {
  width: 100%;
  min-height: 160px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 14px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 14px;
  font-family: inherit;
  line-height: 1.7;
  resize: vertical;
  outline: none;
  transition: border-color 0.2s;
}

.free-textarea:focus {
  border-color: #4ECDC4;
}

.free-textarea::placeholder {
  color: rgba(255, 255, 255, 0.25);
}

.free-text-count {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.3);
  margin-top: 6px;
  text-align: right;
}

.url-input-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.url-input {
  flex: 1;
}

/* Quota inline hint */
.quota-inline {
  font-size: 11px;
  font-weight: 400;
  color: rgba(78, 205, 196, 0.6);
  letter-spacing: 0.5px;
}

.quota-inline.exhausted {
  color: #FF6B6B;
}

.btn-extract {
  flex-shrink: 0;
  padding: 10px 24px;
  background: linear-gradient(135deg, #4ECDC4, #3DBDB5);
  color: #0a0a1a;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  letter-spacing: 1px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.25s ease;
  white-space: nowrap;
  min-width: 120px;
  line-height: 1.5;
}

.btn-extract:hover:not(:disabled) {
  background: linear-gradient(135deg, #5de0d7, #4ECDC4);
  box-shadow: 0 2px 12px rgba(78, 205, 196, 0.3);
  transform: translateY(-1px);
}

.btn-extract:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-extract-text,
.btn-extract-loading {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(10, 10, 26, 0.3);
  border-top-color: #0a0a1a;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  vertical-align: middle;
  margin-right: 6px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ─── 提取进度条 ─── */
.extract-progress {
  margin: 20px 0;
}

.progress-bar {
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 8px;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #4ECDC4, #5de0d7);
  border-radius: 2px;
  transition: width 0.3s ease;
}

.progress-text {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.4);
  letter-spacing: 1px;
}

/* ─── 提取结果预览 ─── */
.extract-result {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(78, 205, 196, 0.15);
  border-radius: 10px;
  padding: 20px;
  margin-top: 20px;
  animation: fadeIn 0.4s ease;
}

.extract-result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 8px;
}

.extract-result-title {
  font-size: 16px;
  font-weight: 600;
  color: #4ECDC4;
}

.extract-result-badge {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.05);
  padding: 3px 10px;
  border-radius: 12px;
  letter-spacing: 1px;
}

.concept-ring-preview {
  margin-bottom: 14px;
}

.concept-ring-preview:last-child {
  margin-bottom: 0;
}

.ring-preview-label {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.6);
  padding-left: 10px;
  border-left: 3px solid #4ECDC4;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ring-node-count {
  font-size: 11px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.3);
}

.ring-preview-concepts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-left: 14px;
}

.concept-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.75);
  cursor: default;
  transition: all 0.2s;
}

.concept-tag:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(78, 205, 196, 0.3);
}

.tag-wx {
  font-size: 10px;
  color: #4ECDC4;
  background: rgba(78, 205, 196, 0.1);
  padding: 1px 5px;
  border-radius: 3px;
  letter-spacing: 0.5px;
}

/* Responsive */
@media (max-width: 600px) {
  .site-header h1 {
    font-size: 20px;
    letter-spacing: 2px;
  }
  .preset-grid {
    grid-template-columns: 1fr;
  }
  .hot-section .preset-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .category-tabs {
    gap: 6px;
  }
  .cat-tab {
    font-size: 12px;
    padding: 5px 12px;
  }
  .container {
    padding: 20px 16px 48px;
  }
  .url-input-row {
    flex-direction: column;
  }
  .btn-extract {
    width: 100%;
  }
}
