/* ================================================================
   style.css -- Yooox 3D Convert & SKP Optimize (Dark Theme)
   ================================================================ */

:root {
  --ysc-bg:            #0a0a0f;
  --ysc-surface:       #141420;
  --ysc-surface2:      #1a1a2e;
  --ysc-border:        #2a2a3e;
  --ysc-border-hover:  #3a3a50;
  --ysc-text:          #e0e0e8;
  --ysc-text-dim:      #8888a0;
  --ysc-text-muted:    #606078;
  --ysc-accent:        #6c5ce7;
  --ysc-accent-hover:  #7c6cf7;
  --ysc-accent-glow:   rgba(108,92,231,.25);
  --ysc-success:       #00b894;
  --ysc-success-dim:   rgba(0,184,148,.12);
  --ysc-danger:        #e17055;
  --ysc-danger-dim:    rgba(225,112,85,.12);
  --ysc-warning:       #fdcb6e;
  --ysc-warning-dim:   rgba(253,203,110,.10);
  --ysc-radius:        12px;
  --ysc-radius-sm:     8px;
}

/* -- Container -------------------------------------------------- */
.yooox-convert-wrap {
  max-width: 860px;
  margin: 0 auto;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans SC", sans-serif;
  color: #e0e0e8 !important;
}
/* 强制所有子元素亮色文字，覆盖主题默认深色 */
.yooox-convert-wrap,
.yooox-convert-wrap *:not(a) {
  color: #e0e0e8 !important;
}
.yooox-convert-wrap .card-desc,
.yooox-convert-wrap .drop-text,
.yooox-convert-wrap .fsize,
.yooox-convert-wrap .opt-desc,
.yooox-convert-wrap .ratio-ticks span,
.yooox-convert-wrap #yooox-balance-display {
  color: #8888a0 !important;
}
.yooox-convert-wrap .card-price,
.yooox-convert-wrap .opt-value-badge,
.yooox-convert-wrap .ratio-hint strong {
  color: #6c5ce7 !important;
}
.yooox-convert-wrap .drop-text span {
  color: #6c5ce7 !important;
}
.yooox-convert-wrap .yooox-tab-btn {
  color: #8888a0 !important;
}
.yooox-convert-wrap .yooox-tab-btn.active,
.yooox-convert-wrap .yooox-tab-btn:hover {
  color: #6c5ce7 !important;
}
.yooox-convert-wrap .yooox-submit-btn {
  color: #fff !important;
}
.yooox-convert-wrap .yooox-error-box {
  color: #e17055 !important;
}
.yooox-convert-wrap .yooox-fee-bar strong {
  color: #fdcb6e !important;
}
.yooox-convert-wrap .yooox-del-btn {
  color: #606078 !important;
}
.yooox-convert-wrap .yooox-del-btn:hover {
  color: #e17055 !important;
}
.yooox-convert-wrap a {
  color: #6c5ce7 !important;
}

/* -- Tabs ------------------------------------------------------- */
.yooox-tabs {
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--ysc-border);
  margin-bottom: 28px;
  gap: 0;
}
.yooox-tab-btn {
  padding: 12px 22px;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: var(--ysc-text-dim);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color .2s, border-color .2s;
}
.yooox-tab-btn.active,
.yooox-tab-btn:hover {
  color: var(--ysc-accent);
  border-bottom-color: var(--ysc-accent);
}

/* -- Panels ----------------------------------------------------- */
.yooox-panel { display: none; }
.yooox-panel.active { display: block; }

/* -- Service Cards ---------------------------------------------- */
.yooox-service-cards {
  display: flex;
  gap: 12px;
  margin-bottom: 22px;
}
.yooox-service-card {
  flex: 1;
  min-width: 160px;
  border: 1.5px solid var(--ysc-border);
  border-radius: var(--ysc-radius);
  padding: 14px 16px;
  cursor: pointer;
  transition: border-color .2s, background .2s, box-shadow .2s;
  background: var(--ysc-surface);
  position: relative;
}
.yooox-service-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
}
.yooox-service-card:hover {
  border-color: var(--ysc-border-hover);
  background: var(--ysc-surface2);
}
.yooox-service-card:has(input:checked) {
  border-color: var(--ysc-accent);
  background: linear-gradient(145deg, rgba(108,92,231,.10) 0%, var(--ysc-surface) 100%);
  box-shadow: 0 0 20px var(--ysc-accent-glow);
}
.yooox-service-card .card-title {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 4px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--ysc-text);
}
.yooox-service-card .card-desc  { font-size: 12px; color: var(--ysc-text-dim); line-height: 1.5; }
.yooox-service-card .card-price { color: var(--ysc-accent); font-weight: 700; font-size: 14px; }

/* -- Drop Zone -------------------------------------------------- */
.yooox-drop-zone {
  border: 2px dashed var(--ysc-border);
  border-radius: var(--ysc-radius);
  padding: 36px 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color .25s, background .25s, box-shadow .25s;
  background: var(--ysc-surface);
  margin-bottom: 16px;
}
.yooox-drop-zone:hover,
.yooox-drop-zone.drag-over {
  border-color: var(--ysc-accent);
  background: rgba(108,92,231,.06);
  box-shadow: 0 0 30px var(--ysc-accent-glow);
}
.yooox-drop-zone .drop-icon { font-size: 32px; display: block; margin-bottom: 8px; }
.yooox-drop-zone .drop-text { font-size: 14px; color: var(--ysc-text-dim); }
.yooox-drop-zone .drop-text span { color: var(--ysc-accent); font-weight: 500; }
.yooox-drop-zone small {
  color: var(--ysc-text-muted);
  margin-top: 8px;
  display: block;
  font-size: 11px;
  letter-spacing: .02em;
}

/* -- File List -------------------------------------------------- */
#yooox-file-list { margin-bottom: 14px; min-height: 36px; }
.yooox-file-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--ysc-surface);
  border: 1px solid var(--ysc-border);
  border-radius: var(--ysc-radius-sm);
  margin-bottom: 6px;
  font-size: 13px;
  transition: border-color .15s;
}
.yooox-file-item:hover { border-color: var(--ysc-border-hover); }
.yooox-file-item .ficon { font-size: 16px; flex-shrink: 0; }
.yooox-file-item .fname { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ysc-text); }
.yooox-file-item .fsize { color: var(--ysc-text-dim); font-size: 12px; white-space: nowrap; }
.yooox-file-item .fstatus { font-size: 12px; color: var(--ysc-text-dim); white-space: nowrap; min-width: 70px; text-align: right; }
.yooox-del-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--ysc-text-muted);
  padding: 0 2px;
  font-size: 16px;
  line-height: 1;
  transition: color .15s;
  border-radius: 4px;
}
.yooox-del-btn:hover { color: var(--ysc-danger); }

/* 下载按钮（处理完成后替换 × 按钮）*/
.yooox-convert-wrap .yooox-dl-btn,
a.yooox-dl-btn,
button.yooox-dl-btn {
  display: inline-block;
  padding: 3px 10px;
  background: #6c5ce7 !important;
  color: #fff !important;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none !important;
  white-space: nowrap;
  transition: background .15s;
  line-height: 1.6;
}
.yooox-convert-wrap .yooox-dl-btn:hover,
a.yooox-dl-btn:hover,
button.yooox-dl-btn:hover { background: #a29bfe !important; color: #fff !important; }
button.yooox-dl-btn { border: none; cursor: pointer; }
.yooox-dl-zip { background: #00b894; }
.yooox-dl-zip:hover { background: #55efc4 !important; color: #111 !important; }
.yooox-file-item .fsize-out { color: #6c5ce7; }

/* SketchUp 获取模型按钮 */
.yooox-su-get-btn {
  padding: 7px 16px;
  background: #2d3a6a;
  color: #a0b4ff;
  border: 1px solid #4a5fa0;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s;
}
.yooox-su-get-btn:hover { background: #3a4d8a; }
.yooox-su-get-btn:disabled { opacity: .5; cursor: default; }

/* -- Optimize Options ------------------------------------------- */
.yooox-optimize-opts {
  background: var(--ysc-surface);
  border: 1px solid var(--ysc-border);
  border-radius: var(--ysc-radius);
  padding: 18px 20px;
  margin-bottom: 18px;
}
.opt-header {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 12px;
}
.opt-title { font-size: 13px; font-weight: 600; color: var(--ysc-text); }
.opt-value-badge {
  font-size: 18px;
  font-weight: 700;
  color: var(--ysc-accent);
  line-height: 1;
}
.opt-desc { font-size: 12px; color: var(--ysc-text-dim); margin-left: auto; }

.ratio-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 5px;
  border-radius: 3px;
  background: linear-gradient(to right, var(--ysc-accent) var(--ratio-pct, 37.5%), var(--ysc-border) var(--ratio-pct, 37.5%));
  outline: none;
  cursor: pointer;
  display: block;
  margin: 8px 0 6px;
}
.ratio-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--ysc-surface2);
  border: 2px solid var(--ysc-accent);
  box-shadow: 0 0 8px var(--ysc-accent-glow);
  cursor: pointer;
  transition: box-shadow .15s;
}
.ratio-slider::-webkit-slider-thumb:hover {
  box-shadow: 0 0 14px rgba(108,92,231,.5);
}
.ratio-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--ysc-surface2);
  border: 2px solid var(--ysc-accent);
  box-shadow: 0 0 8px var(--ysc-accent-glow);
  cursor: pointer;
}
.ratio-ticks {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--ysc-text-muted);
  margin-top: 2px;
}
.ratio-hint {
  font-size: 12px;
  color: var(--ysc-text-dim);
  margin-top: 8px;
  padding: 8px 12px;
  background: rgba(108,92,231,.08);
  border-radius: var(--ysc-radius-sm);
  border-left: 3px solid var(--ysc-accent);
}
.ratio-hint strong { color: var(--ysc-accent); }

/* -- Fee Bar ---------------------------------------------------- */
.yooox-fee-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--ysc-warning-dim);
  border: 1px solid rgba(253,203,110,.25);
  border-radius: var(--ysc-radius-sm);
  margin-bottom: 16px;
  font-size: 13px;
  color: var(--ysc-text);
}
.yooox-fee-bar strong { color: var(--ysc-warning); font-size: 15px; }

/* -- Submit Button ---------------------------------------------- */
.yooox-submit-btn {
  padding: 12px 36px;
  background: linear-gradient(135deg, var(--ysc-accent), #5a4bd1);
  color: #fff;
  border: none;
  border-radius: var(--ysc-radius-sm);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all .25s;
  box-shadow: 0 4px 16px var(--ysc-accent-glow);
  letter-spacing: .02em;
}
.yooox-submit-btn:hover {
  background: linear-gradient(135deg, var(--ysc-accent-hover), #6c5ce7);
  box-shadow: 0 6px 24px rgba(108,92,231,.4);
  transform: translateY(-1px);
}
.yooox-submit-btn:disabled {
  background: var(--ysc-border);
  color: var(--ysc-text-muted);
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

/* -- Action Row ------------------------------------------------- */
.yooox-action-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 6px;
}
#yooox-balance-display { font-size: 12px; color: var(--ysc-text-dim); }

/* -- Progress --------------------------------------------------- */
.yooox-progress-wrap { margin-top: 20px; }
.yooox-progress-track {
  width: 100%;
  height: 6px;
  background: var(--ysc-border);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 6px;
}
.yooox-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--ysc-accent), #a29bfe);
  border-radius: 3px;
  transition: width .4s ease;
}
#yooox-upload-bar {
  height: 100%;
  background: #a29bfe;
  width: 0%;
  transition: width .2s;
  border-radius: 2px;
}
#yooox-progress-text {
  font-size: 13px;
  color: var(--ysc-text-dim);
  margin-bottom: 6px;
}

/* -- Error Box -------------------------------------------------- */
.yooox-error-box {
  background: var(--ysc-danger-dim);
  border: 1px solid rgba(225,112,85,.3);
  border-radius: var(--ysc-radius-sm);
  padding: 14px 18px;
  color: var(--ysc-danger);
  font-size: 13px;
  margin-top: 16px;
}

/* -- Results Box ------------------------------------------------ */
.yooox-results-box {
  background: var(--ysc-success-dim);
  border: 1px solid rgba(0,184,148,.25);
  border-radius: var(--ysc-radius);
  padding: 20px 22px;
  margin-top: 20px;
  font-size: 14px;
  line-height: 1.8;
  color: var(--ysc-text);
}
.yooox-results-box a { color: var(--ysc-accent); text-decoration: none; font-weight: 500; }
.yooox-results-box a:hover { text-decoration: underline; color: var(--ysc-accent-hover); }

/* -- History Table ---------------------------------------------- */
.yooox-history-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.yooox-history-table th {
  background: var(--ysc-surface);
  padding: 10px 12px;
  text-align: left;
  border-bottom: 2px solid var(--ysc-border);
  font-weight: 600;
  color: var(--ysc-text-dim);
}
.yooox-history-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--ysc-border);
  color: #e0e0e8 !important;
}
.yooox-history-table tr:hover td { background: var(--ysc-surface); }
.yooox-history-table a { color: var(--ysc-accent) !important; text-decoration: none; }
.yooox-history-table a:hover { text-decoration: underline; }

/* -- Hint text -------------------------------------------------- */
.yooox-hint {
  font-size: 12px;
  color: #8888a0 !important;
  margin: 8px 0;
  text-align: center;
}

/* -- Login Notice ----------------------------------------------- */
.yooox-login-notice {
  text-align: center;
  padding: 48px 32px;
  background: var(--ysc-surface);
  border: 1px dashed var(--ysc-border);
  border-radius: var(--ysc-radius);
  font-size: 15px;
  color: var(--ysc-text-dim);
}
.yooox-login-notice a {
  color: var(--ysc-accent);
  font-weight: 500;
  text-decoration: none;
}
.yooox-login-notice a:hover { text-decoration: underline; }

/* -- Responsive ------------------------------------------------- */
@media (max-width: 640px) {
  .yooox-service-cards { flex-direction: column; }
  .yooox-action-row { flex-direction: column; gap: 10px; align-items: stretch; }
  .yooox-submit-btn { width: 100%; text-align: center; display: block; }
  .yooox-convert-wrap { padding: 0 8px; }
}