/* ==================== 全局样式 ==================== */

:root {
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --secondary: #6b7280;
  --secondary-hover: #4b5563;
  --success: #10b981;
  --danger: #ef4444;
  --bg-primary: #ffffff;
  --bg-secondary: #f9fafb;
  --text-primary: #1f2937;
  --text-secondary: #6b7280;
  --border: #e5e7eb;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.08);
  --radius: 8px;
  --radius-lg: 12px;
}

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

html, body {
  height: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  line-height: 1.6;
}

/* ==================== 布局 ==================== */

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Tab 导航 */
.tabs {
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--bg-primary);
  border-bottom: 2px solid var(--border);
  overflow-x: auto;
  padding: 0 20px;
  height: 60px;
}

.logo {
  margin: 0;
  margin-right: 24px;
  padding: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  flex-shrink: 0;
  text-decoration: none;
  transition: transform 0.3s ease;
}

.logo:hover {
  transform: scale(1.05);
}

.logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 6px;
}

.tab-btn {
  padding: 0 20px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  border-bottom: 3px solid transparent;
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
  white-space: nowrap;
}

.tab-btn:hover {
  color: var(--text-primary);
}

.tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

/* 主内容区 */
.content {
  flex: 1;
  padding: 20px 20px;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

/* 卡片 */
.card {
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-lg);
  animation: slideIn 0.3s ease;
}

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

.card h2 {
  font-size: 24px;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.desc {
  color: var(--text-secondary);
  margin-bottom: 8px;
  font-size: 14px;
}

.section {
  margin-bottom: 8px;
}

.section h3 {
  font-size: 16px;
  margin-bottom: 12px;
  color: var(--text-primary);
  font-weight: 600;
}

.divider {
  height: 1px;
  background: var(--border);
  margin: 24px 0;
}

/* Tab 内容切换 */
.tab-content {
  display: none;
  animation: fadeIn 0.3s ease;
}

.tab-content.active {
  display: block;
}

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

/* ==================== 表单元素 ==================== */

.input-group {
  display: flex;
  gap: 12px;
  margin-bottom: 7px;
  flex-wrap: wrap;
}

.input {
  flex: 1;
  min-width: 200px;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  font-family: inherit;
  transition: all 0.2s ease;
  background: var(--bg-secondary);
}

.input:focus {
  outline: none;
  border-color: var(--primary);
  background: var(--bg-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.input[type="datetime-local"] {
  font-family: inherit;
}

/* 按钮 */
.btn {
  padding: 12px 24px;
  border: none;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

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

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-secondary {
  background: var(--secondary);
  color: white;
}

.btn-secondary:hover {
  background: var(--secondary-hover);
  transform: translateY(-2px);
}

.btn-outline {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.btn-outline:hover {
  background: var(--border);
  border-color: var(--primary);
  color: var(--primary);
}

.btn-copy {
  background: var(--primary);
  color: white;
}

.btn-copy:hover {
  background: var(--primary-hover);
}

/* 复制按钮（小） */
.btn-copy-small {
  background: none;
  border: none;
  font-size: 16px;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 4px;
  transition: all 0.2s ease;
  opacity: 0.6;
}

.btn-copy-small:hover {
  opacity: 1;
  background: rgba(37, 99, 235, 0.1);
  transform: scale(1.1);
}

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

.button-group {
  display: flex;
  gap: 12px;
  margin-bottom: 7px;
  flex-wrap: wrap;
}

/* JSON 工具中的按钮组移除 margin-bottom 以保持对齐 */
.json-input-panel > .button-group {
  margin-bottom: 0;
}

.icon {
  font-size: 16px;
}

/* 复选框 */
.checkbox-group {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
  padding: 8px 12px;
  border-radius: var(--radius);
  transition: background 0.2s ease;
}

.checkbox:hover {
  background: var(--bg-secondary);
}

.checkbox input[type="checkbox"] {
  cursor: pointer;
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
}

.checkbox span {
  font-size: 14px;
  color: var(--text-primary);
}

/* 滑块 */
.slider {
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: var(--border);
  outline: none;
  margin: 12px 0;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

.slider::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--primary);
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  box-shadow: 0 4px 8px rgba(37, 99, 235, 0.3);
}

.slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--primary);
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.slider::-moz-range-thumb:hover {
  transform: scale(1.2);
  box-shadow: 0 4px 8px rgba(37, 99, 235, 0.3);
}

.slider-labels {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-secondary);
}

.label-block {
  display: block;
  font-weight: 500;
  margin-bottom: 12px;
  color: var(--text-primary);
}

/* ==================== 结果显示 ==================== */

.result {
  background: var(--bg-secondary);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 7px;
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
}

.result-placeholder {
  color: var(--text-secondary);
  font-size: 14px;
  text-align: center;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.info-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px;
  background: var(--bg-secondary);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.label {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* 值加复制按钮 */
.value-with-copy {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.value-with-copy .value {
  flex: 1;
  word-break: break-all;
}

.value {
  font-size: 14px;
  color: var(--text-primary);
  font-weight: 600;
  word-break: break-all;
}

/* 密码框 */
.password-box {
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  padding: 20px;
  border: 2px solid var(--border);
  margin-top: 16px;
}

.password-content {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
}

.password-input {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: 'Courier New', monospace;
  font-size: 16px;
  font-weight: 600;
  background: var(--bg-primary);
  color: var(--text-primary);
}

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

.copy-feedback {
  color: var(--success);
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  animation: slideDown 0.3s ease;
}

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

/* 错误提示 */
.error {
  background: #fee2e2;
  border: 1px solid #fca5a5;
  color: #991b1b;
  padding: 12px 16px;
  border-radius: var(--radius);
  margin-bottom: 16px;
  font-size: 14px;
  animation: slideIn 0.3s ease;
}

/* 页脚 */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 24px 20px;
  text-align: center;
  color: var(--text-secondary);
  font-size: 14px;
  margin-top: auto;
}

.footer-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  justify-content: center;
}

.footer-content p {
  margin: 0;
  font-size: 14px;
}

.icp-info {
  font-size: 12px;
  color: var(--text-secondary);
}

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

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

/* Textarea */
.textarea {
  display: block;
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: 'Courier New', monospace;
  font-size: 13px;
  resize: vertical;
  min-height: 200px;
  background: var(--bg-primary);
  color: var(--text-primary);
  transition: border-color 0.2s ease;
  margin-bottom: 12px;
}

.textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.textarea:read-only {
  background: var(--bg-secondary);
  cursor: not-allowed;
}

/* JSON 工具 */
.json-card {
  padding: 0;
  overflow: hidden;
}

.json-header {
  padding: 20px;
  border-bottom: 1px solid var(--border);
}

.json-header h2 {
  margin: 0 0 4px 0;
}

.json-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  min-height: 720px;
  align-items: stretch;
}

.json-panel {
  padding: 10px;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
  height: 100%;
  box-sizing: border-box;
}

.json-panel:last-child {
  border-right: none;
  position: relative;
}

.json-input-panel {
  justify-content: space-between;
  box-sizing: border-box;
}

.json-input-panel .textarea {
  flex: 1;
  min-height: 0;
  margin-bottom: 0;
}

.json-input-panel > .button-group {
  flex-shrink: 0;
  order: 10;
}

.json-input-panel > .validation-info,
.json-input-panel > .error {
  flex-shrink: 0;
}

.json-output-panel {
  box-sizing: border-box;
}

/* JSON 视图 */
.json-view {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
  flex: 1;
  overflow: hidden;
  height: 100%;
  box-sizing: border-box;
}

.json-view > .btn {
  flex-shrink: 0;
  margin-top: auto;
}

.json-view > .copy-feedback {
  flex-shrink: 0;
}

.json-view > .json-tree {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

/* 树形视图 */
.json-tree {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  font-family: 'Courier New', monospace;
  font-size: 13px;
  line-height: 1.8;
  word-break: break-all;
  display: block;
}

.json-tree-item {
  display: block;
}

.json-tree-line {
  padding: 2px 0;
  cursor: default;
  user-select: none;
}

.json-tree-line.json-tree-line-collapsible {
  cursor: pointer;
}

.json-tree-line.json-tree-line-collapsible:hover {
  background-color: var(--bg-secondary);
}

.json-tree-indent {
  display: inline-block;
  user-select: none;
}

.json-tree-toggle {
  cursor: pointer;
  user-select: none;
  display: inline-block;
  width: 12px;
  margin-right: 4px;
  color: var(--text-secondary);
  font-size: 11px;
}

.json-tree-toggle.expanded {
  color: var(--primary);
}

.json-tree-toggle.collapsed {
  color: var(--text-secondary);
}

.json-tree-key {
  color: var(--primary);
  font-weight: 500;
}

.json-tree-colon {
  color: var(--text-primary);
  margin: 0 4px;
}

.json-tree-bracket {
  color: var(--text-secondary);
  font-weight: 600;
  margin: 0 2px;
}

.json-tree-count {
  color: var(--text-secondary);
  font-size: 11px;
  margin-left: 4px;
  font-style: italic;
}

.json-tree-string {
  color: #10b981;
}

.json-tree-number {
  color: #f59e0b;
}

.json-tree-boolean {
  color: #8b5cf6;
  font-weight: 600;
}

.json-tree-null {
  color: var(--text-secondary);
  font-style: italic;
}

.json-tree-children {
  display: none;
}

.json-tree-children.show {
  display: block;
}

/* 折叠状态 */
.json-tree-children:not(.show) {
  display: none !important;
}

/* JSON 树形视图header */
.json-view-header {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 100;
}

/* JSON 全屏展示 */
.json-fullscreen {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  background: var(--bg-secondary);
  display: flex;
  flex-direction: column;
  border-radius: 0;
}

.json-fullscreen-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9998;
  background: rgba(0, 0, 0, 0.5);
}

.json-fullscreen-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.json-fullscreen-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

.json-fullscreen-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--text-secondary);
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.json-fullscreen-close:hover {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.json-fullscreen-content {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  overflow-x: auto;
}

.json-fullscreen-content .json-tree {
  background: transparent;
  border: none;
  padding: 0;
  font-size: 14px;
  line-height: 1.8;
}

/* 验证信息 */
.validation-info {
  background: var(--bg-secondary);
  border-radius: var(--radius);
  padding: 12px;
  gap: 8px;
  display: flex;
  flex-direction: column;
}

.validation-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.validation-label {
  font-weight: 600;
  color: var(--text-secondary);
  min-width: 60px;
}

.validation-value {
  flex: 1;
  word-break: break-all;
}

/* ==================== 响应式 ==================== */

@media (max-width: 768px) {
  .container {
    min-height: auto;
  }

  .logo {
    width: 32px;
    height: 32px;
    margin-right: 16px;
  }

  .tabs {
    padding: 0 16px;
  }

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

  .content {
    padding: 20px;
  }

  .card {
    padding: 20px;
  }

  .card h2 {
    font-size: 20px;
  }

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

  .input {
    min-width: 100%;
  }

  .button-group {
    flex-direction: column;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }

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

  .info-grid {
    grid-template-columns: 1fr;
  }

  .password-content {
    flex-direction: column;
  }

  /* JSON 工具响应式 */
  .json-container {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .json-panel {
    border-right: none;
    border-bottom: 1px solid var(--border);
    min-height: 300px;
  }

  .json-panel:last-child {
    border-bottom: none;
  }

  .json-input-panel .textarea {
    min-height: 200px;
  }

  .json-view .textarea {
    min-height: 200px;
  }

  .json-tree {
    min-height: 200px;
  }
}

@media (max-width: 480px) {
  .header {
    padding: 20px 12px;
  }


  .card {
    padding: 16px;
  }

  .card h2 {
    font-size: 18px;
  }

  .desc {
    font-size: 13px;
  }

  .btn {
    padding: 10px 16px;
    font-size: 13px;
  }
}

/* ==================== 加密/解密工具样式 ==================== */

/* 算法按钮网格 */
.algorithm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.algo-btn {
  padding: 10px 12px;
  border: 2px solid #e5e7eb;
  border-radius: 6px;
  background: white;
  color: #6b7280;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.algo-btn:hover {
  border-color: #3b82f6;
  color: #3b82f6;
  background: #f0f4ff;
}

.algo-btn.active {
  border-color: #3b82f6;
  background: #3b82f6;
  color: white;
}

/* 加密容器 */
.encrypt-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 20px;
}

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

.encrypt-panel .label-block {
  margin-bottom: 4px;
  font-weight: 500;
  font-size: 14px;
  color: #374151;
}

.encrypt-panel .textarea {
  flex: 1;
  min-height: 300px;
  padding: 12px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 13px;
  resize: vertical;
}

.encrypt-panel .button-group {
  margin-top: 0;
}

/* 信息框 */
.info-box {
  padding: 12px;
  background: #eff6ff;
  border-left: 4px solid #3b82f6;
  border-radius: 4px;
  font-size: 13px;
  color: #1e40af;
  margin-top: 12px;
}

/* 响应式 */
@media (max-width: 768px) {
  .algorithm-grid {
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  }

  .encrypt-container {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .encrypt-panel .textarea {
    min-height: 250px;
  }
}

@media (max-width: 480px) {
  .algorithm-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .algo-btn {
    padding: 8px 10px;
    font-size: 12px;
  }

  .encrypt-panel .textarea {
    min-height: 200px;
  }
}

/* ==================== RSA 密钥配置样式 ==================== */

#rsaConfig .label-block {
  margin-top: 12px;
  font-weight: 500;
  color: #374151;
}

#rsaConfig .label-block:first-of-type {
  margin-top: 0;
}

#rsaConfig textarea {
  padding: 12px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 12px;
  line-height: 1.5;
  resize: vertical;
  word-break: break-all;
}

#rsaConfig .checkbox {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: #374151;
  cursor: pointer;
}

#rsaConfig .checkbox input[type="radio"] {
  cursor: pointer;
  width: 16px;
  height: 16px;
}

#rsaConfig .checkbox span {
  cursor: pointer;
}

/* 密钥大小选择 */
#rsaConfig > div:nth-of-type(2),
#rsaConfig > div:nth-of-type(3) {
  padding: 12px;
  background: #f9fafb;
  border-radius: 6px;
  margin-top: 12px;
}

/* RSA 按钮 */
#generateRSAKey {
  background: #8b5cf6;
  border-color: #8b5cf6;
  color: white;
}

#generateRSAKey:hover {
  background: #7c3aed;
  border-color: #7c3aed;
}

#downloadRSAKey {
  background: #06b6d4;
  border-color: #06b6d4;
  color: white;
}

#downloadRSAKey:hover {
  background: #0891b2;
  border-color: #0891b2;
}

/* ==================== 汇率换算工具样式 ==================== */

.exchange-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 20px;
}

.exchange-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px;
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
}

.exchange-panel .section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.exchange-panel .label-block {
  font-weight: 500;
  font-size: 14px;
  color: var(--text-primary);
}

.exchange-panel .input,
.exchange-panel select {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  color: var(--text-primary);
  background: var(--bg-primary);
  transition: all 0.2s ease;
}

.exchange-panel .input:focus,
.exchange-panel select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.exchange-panel select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%236B7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
  background-position: right 8px center;
  background-repeat: no-repeat;
  background-size: 20px;
  padding-right: 32px;
}

/* 汇率结果区域 */
.exchange-result {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: var(--radius-lg);
  color: white;
  text-align: center;
  margin-bottom: 12px;
}

.exchange-result .result-item {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 600;
}

.exchange-result .amount {
  font-size: 28px;
  font-weight: bold;
}

.exchange-result .currency {
  font-size: 16px;
  font-weight: 500;
}

.exchange-arrow {
  font-size: 20px;
  opacity: 0.8;
}

/* 汇率信息框 */
.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.info-row:last-child {
  border-bottom: none;
}

.info-row .label {
  font-weight: 500;
  color: var(--text-secondary);
  min-width: 80px;
}

.info-row .value {
  flex: 1;
  text-align: right;
  word-break: break-all;
  color: var(--text-primary);
}

.info-row .btn-copy-small {
  margin-left: 8px;
}

/* 响应式 */
@media (max-width: 768px) {
  .exchange-container {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .exchange-panel {
    padding: 16px;
  }

  .exchange-result {
    padding: 14px;
  }

  .exchange-result .result-item {
    flex-direction: column;
    gap: 6px;
  }

  .exchange-result .amount {
    font-size: 22px;
  }

  .exchange-result .currency {
    font-size: 14px;
  }
}

/* ==================== 图片工具样式 ==================== */

.image-upload-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 20px;
  background: var(--bg-secondary);
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  text-align: center;
}

.image-file-name {
  font-size: 14px;
  color: var(--success);
  margin: 0;
}

/* 图片容器 */
.image-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 20px;
}

.image-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px;
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
}

.image-panel .section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.image-panel .label-block {
  font-weight: 500;
  font-size: 14px;
  color: var(--text-primary);
}

/* 单选按钮组 */
.radio-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.radio {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-primary);
  cursor: pointer;
}

.radio input[type="radio"] {
  cursor: pointer;
  width: 16px;
  height: 16px;
}

.radio span {
  cursor: pointer;
}

/* 输入组 */
.input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Canvas 画布 */
.image-canvas {
  width: 100%;
  max-width: 400px;
  height: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: white;
  margin-bottom: 12px;
}

/* 响应式 */
@media (max-width: 768px) {
  .image-container {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .image-panel {
    padding: 16px;
  }

  .image-canvas {
    max-width: 100%;
  }

  .radio-group {
    flex-direction: row;
    gap: 16px;
  }
}

/* ==================== 阅后即焚工具样式 ==================== */

.burn-result-card {
  padding: 20px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border-radius: var(--radius-lg);
  color: white;
}

.burn-result-header {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 20px;
}

.burn-result-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.burn-result-content .label-block {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
}

.burn-result-content .info-box {
  padding: 12px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  border: none;
}

.burn-result-content .info-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.burn-result-content .info-row:last-child {
  border-bottom: none;
}

.burn-result-content .info-row .label {
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
  min-width: 80px;
}

.burn-result-content .info-row .value {
  text-align: right;
  word-break: break-all;
  color: rgba(255, 255, 255, 0.8);
}

.input-with-copy {
  display: flex;
  gap: 8px;
  align-items: center;
}

.input-with-copy .input {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.1);
  color: white;
  font-family: 'Monaco', 'Menlo', monospace;
}

.input-with-copy .input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.input-with-copy .input:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.15);
}

/* 一次性阅读查看模式 */
.burn-view-header {
  font-size: 18px;
  font-weight: 600;
  padding: 16px;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: white;
  border-radius: var(--radius-lg);
  text-align: center;
  margin-bottom: 20px;
}

.burn-view-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.burn-view-content .label-block {
  font-weight: 500;
  font-size: 14px;
  color: var(--text-primary);
}

.burn-view-content .info-box {
  padding: 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius);
}

.burn-view-content .info-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

.burn-view-content .info-row:last-child {
  border-bottom: none;
}

.burn-view-content .info-row .label {
  font-weight: 500;
  color: var(--text-secondary);
  min-width: 80px;
}

.burn-view-content .info-row .value {
  text-align: right;
  word-break: break-all;
  color: var(--text-primary);
}

.burn-content-box {
  padding: 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  min-height: 200px;
  max-height: 400px;
  overflow-y: auto;
}

.burn-content-text {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.6;
  color: var(--text-primary);
  font-family: 'Monaco', 'Menlo', monospace;
  font-size: 14px;
}

/* 警告框 */
.burn-warning {
  padding: 12px;
  background: #fef3c7;
  border-left: 4px solid #f59e0b;
  border-radius: 4px;
  color: #92400e;
  font-size: 13px;
  line-height: 1.5;
}

/* 响应式 */
@media (max-width: 768px) {
  .burn-result-card {
    padding: 16px;
  }

  .input-with-copy {
    flex-direction: column;
  }

  .input-with-copy .btn {
    width: 100%;
  }

  .info-row {
    flex-direction: column;
    gap: 4px;
  }

  .info-row .value {
    text-align: left;
  }
}

/* ==================== 个税计算样式 ==================== */

.card-header {
  margin-bottom: 20px;
}

.card-header h3 {
  margin: 0 0 8px 0;
  font-size: 18px;
  color: var(--text-primary);
}

.card-desc {
  margin: 0;
  font-size: 13px;
  color: var(--text-secondary);
}

/* 税计算容器（并排布局） */
.tax-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 16px;
}

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

/* 紧凑的输入组 */
.input-group-compact {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.input-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.input-item label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
}

.input-item input {
  padding: 10px 12px;
  font-size: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.2s;
}

.input-item input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.input-tip {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
  padding: 10px 12px;
  background: #f0f4ff;
  border-left: 3px solid var(--primary);
  border-radius: 4px;
}

/* 税计算结果 */
.tax-result {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 16px;
  background: linear-gradient(135deg, #f0f9ff 0%, #f5f3ff 100%);
  border-radius: var(--radius-lg);
  border: 1px solid #e0f2fe;
  min-height: 200px;
}

.tax-summary {
  text-align: center;
  padding: 12px;
  background: white;
  border-radius: var(--radius);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.summary-label {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.summary-amount {
  font-size: 32px;
  font-weight: bold;
  color: var(--success);
}

.tax-details {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  font-size: 14px;
}

.detail-label {
  color: var(--text-secondary);
  font-weight: 500;
}

.detail-value {
  color: var(--text-primary);
  font-weight: 600;
}

/* 占位符 */
.tax-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  color: var(--text-secondary);
  font-size: 14px;
  background: #f9fafb;
  border-radius: var(--radius-lg);
  border: 1px dashed var(--border);
}

/* 警告提示 */
.tax-warning {
  background: #fffbeb;
  border: 1px solid #f59e0b;
  border-radius: var(--radius);
  padding: 12px 16px;
  color: #92400e;
  font-size: 14px;
  line-height: 1.6;
  margin-top: 12px;
}

.desc {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* ==================== 密码长度控制 ==================== */

.password-length-control {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.password-length-control .input {
  flex: 1;
  min-width: 150px;
}

.password-length-control select.input {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 12px;
  padding-right: 36px;
}

/* ==================== 自定义字符模块 ==================== */

.custom-char-section {
  margin-bottom: 24px;
}

.badge-optional {
  display: inline-block;
  background: #f3f4f6;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 12px;
  margin-left: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.custom-char-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.custom-char-container .input {
  padding: 14px 16px;
  font-size: 15px;
  border: 2px solid var(--border);
  transition: all 0.2s ease;
}

.custom-char-container .input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.08);
}

.custom-char-preview {
  min-height: 38px;
  padding: 10px 12px;
  background: linear-gradient(135deg, #f0f9ff 0%, #f9f5ff 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.custom-char-preview.empty {
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  font-size: 14px;
  font-style: italic;
}

.custom-char-preview .char-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 10px;
  font-family: 'Courier New', monospace;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.custom-char-tip {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  padding: 8px 12px;
  background: #fef3c7;
  border-left: 3px solid #f59e0b;
  border-radius: 4px;
}

/* ==================== 语言切换 ==================== */
.lang-switch {
  margin-left: auto;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.15s, border-color 0.15s;
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.lang-switch:hover {
  color: var(--primary);
  border-color: var(--primary);
}

/* 响应式 */
@media (max-width: 768px) {
  .tax-container {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .summary-amount {
    font-size: 28px;
  }

  .tax-result {
    min-height: auto;
  }

  .detail-row {
    font-size: 13px;
  }

  .lang-switch {
    padding: 4px 8px;
    font-size: 11px;
  }
}

/* ==================== 文档转换工具 ==================== */

/* 转换类型网格 */
.convert-type-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.convert-type-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px 12px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  background: var(--bg-primary);
  gap: 8px;
  min-height: 120px;
}

.convert-type-card:hover {
  border-color: var(--primary);
  background: var(--bg-secondary);
  transform: translateY(-2px);
}

.convert-type-card input[type="radio"] {
  display: none;
}

.convert-type-card input[type="radio"]:checked + .convert-type-icon + .convert-type-name {
  color: var(--primary);
  font-weight: 600;
}

.convert-type-card input[type="radio"]:checked {
  display: none;
}

.convert-type-card input[type="radio"]:checked ~ .convert-type-name {
  color: var(--primary);
  font-weight: 600;
}

.convert-type-icon {
  font-size: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.convert-type-name {
  font-size: 13px;
  font-weight: 500;
  text-align: center;
  color: var(--text-primary);
  transition: color 0.2s ease;
}

/* 结果占位符 */
.convert-result-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 300px;
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  background: var(--bg-secondary);
  padding: 20px;
  text-align: center;
}

.convert-placeholder-icon {
  font-size: 48px;
  margin-bottom: 12px;
  opacity: 0.6;
}

.convert-result-placeholder p {
  color: var(--text-secondary);
  font-size: 14px;
  margin: 0;
}

/* 进度指示器 */
.convert-progress {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 300px;
  gap: 16px;
  padding: 20px;
}

.convert-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: convertSpin 1s linear infinite;
}

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

#convertProgressText {
  color: var(--text-secondary);
  font-size: 14px;
  margin: 0;
}

/* 成功结果盒 */
.convert-success-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
  background: var(--bg-secondary);
  border-radius: var(--radius);
  min-height: 300px;
  justify-content: center;
}

.convert-success-icon {
  font-size: 56px;
  margin-bottom: 12px;
}

.convert-success-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--success);
  margin: 0 0 16px 0;
}

#convertOutputFilename {
  color: var(--primary);
  font-weight: 500;
  word-break: break-all;
}

/* 响应式调整 */
@media (max-width: 768px) {
  .convert-type-grid {
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 10px;
  }

  .convert-type-card {
    min-height: 100px;
    padding: 12px 8px;
    gap: 6px;
  }

  .convert-type-icon {
    font-size: 28px;
  }

  .convert-type-name {
    font-size: 12px;
  }

  .convert-result-placeholder {
    min-height: 250px;
  }

  .convert-placeholder-icon {
    font-size: 40px;
  }

  .convert-spinner {
    width: 40px;
    height: 40px;
    border-width: 3px;
  }

  .convert-success-box {
    min-height: 250px;
  }

  .convert-success-icon {
    font-size: 48px;
  }

  .convert-success-title {
    font-size: 16px;
  }
}
