/* KunQiong AI Formatter - Modern Styles with Header/Footer */

/* CSS Variables */
:root {
  --primary-color: #1e88e5;
  --primary-dark: #1565c0;
  --primary-light: #e3f2fd;
  --header-height: 72px;
  --header-bg: #ffffff;
  --footer-bg: #1d2939;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --border-color: #e2e8f0;
  --shadow-sm: 0 2px 10px rgba(0,0,0,0.1);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: linear-gradient(180deg, #f0f8ff 0%, #f5f7fa 15%);
  min-height: 100vh;
  color: var(--text-primary);
  line-height: 1.6;
}

/* Header Styles */
.header {
  background: var(--header-bg);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--header-height);
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 32px;
}

.header-left {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.logo a {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--primary-color);
  transition: transform 0.2s ease;
}

.logo a:hover {
  transform: scale(1.02);
}

.logo-img {
  height: 38px;
  width: auto;
  object-fit: contain;
}

/* Navigation */
.nav {
  display: flex;
  gap: 16px;
  margin-left: 32px;
  align-items: center;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: #ccc transparent;
  white-space: nowrap;
  padding: 8px 0;
}

.nav::-webkit-scrollbar {
  height: 4px;
}

.nav::-webkit-scrollbar-track {
  background: transparent;
}

.nav::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 2px;
}

.nav-link {
  text-decoration: none;
  color: #333;
  font-size: 14px;
  font-weight: 400;
  padding: 10px 4px;
  position: relative;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--primary-color);
}

.nav-link:hover::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background-color: var(--primary-color);
  animation: slideIn 0.2s ease;
}

@keyframes slideIn {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

.nav-link.active {
  color: var(--primary-color);
  font-weight: 500;
}

.nav-link.active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background-color: var(--primary-color);
}

.nav-item-wrapper {
  display: flex;
  align-items: center;
  gap: 0;
}

.category-dropdown-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px;
  margin-left: -2px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-color);
  transition: all 0.2s ease;
  border-radius: 4px;
}

.category-dropdown-toggle:hover {
  background-color: rgba(30, 136, 229, 0.1);
}

/* Header Right Section */
.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-login-btn {
  text-decoration: none;
  color: #fff;
  font-size: 14px;
  font-weight: 400;
  padding: 10px 20px;
  border-radius: 8px;
  transition: all 0.2s ease;
  background: linear-gradient(135deg, #1e88e5 0%, #1976d2 100%);
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  box-shadow: 0 2px 8px rgba(30, 136, 229, 0.25);
  cursor: pointer;
}

.header-login-btn:hover {
  background: linear-gradient(135deg, #1976d2 0%, #1565c0 100%);
  box-shadow: 0 4px 12px rgba(30, 136, 229, 0.35);
  transform: translateY(-1px);
}

.header-search-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  border-radius: 8px;
}

.header-search-btn:hover {
  background-color: #f5f5f5;
}

.header-search-icon {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: 1px solid var(--primary-color);
  color: var(--primary-color);
  font-size: 20px;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.mobile-menu-btn:hover {
  background-color: rgba(30, 136, 229, 0.1);
}

/* Main Content Area */
.main-content {
  min-height: calc(100vh - 300px);
  padding: 5px 20px 10px 20px; /* 功能模块与导航、尾部间距再减半 */
}

.content-wrapper {
  max-width: 1200px;
  margin: 0 auto;
}

/* Tool Card Container */
.tool-container {
  background: white;
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  overflow: visible;
  border: 1px solid rgba(226, 232, 240, 0.8);
}

.tool-header {
  background: linear-gradient(135deg, rgba(30, 136, 229, 0.05) 0%, rgba(227, 242, 253, 0.1) 100%);
  padding: 24px 32px;
  border-bottom: 1px solid var(--border-color);
  position: relative;
  overflow: visible;
  z-index: 20;
}

.tool-title-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.tool-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.tool-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 8px;
}

.lang-selector {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lang-selector label {
  font-size: 14px;
  color: var(--text-secondary);
  white-space: nowrap;
}

.lang-selector select {
  height: 36px;
  min-width: 140px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: white;
  padding: 0 12px;
  font-size: 14px;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.lang-selector select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(30, 136, 229, 0.1);
}

/* Tool Body */
.tool-body {
  padding: 32px;
}

.form-group {
  margin-bottom: 24px;
}

.input-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

/* 粘贴、清空按钮成组靠右 */
.input-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.form-label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 0;
}

.paste-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: linear-gradient(135deg, #1e88e5 0%, #1976d2 100%);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(30, 136, 229, 0.3);
}

.paste-btn:hover {
  background: linear-gradient(135deg, #1976d2 0%, #1565c0 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(30, 136, 229, 0.4);
}

.paste-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(30, 136, 229, 0.3);
}

.paste-btn svg {
  flex-shrink: 0;
}

.clear-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: linear-gradient(135deg, #64748b 0%, #475569 100%);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(100, 116, 139, 0.3);
}

.clear-btn:hover {
  background: linear-gradient(135deg, #475569 0%, #334155 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(100, 116, 139, 0.4);
}

.clear-btn:active {
  transform: translateY(0);
}

.clear-btn svg {
  flex-shrink: 0;
}

.form-textarea {
  width: 100%;
  height: 280px;
  min-height: 280px;
  max-height: 280px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  background: white;
  padding: 16px;
  font-size: 14px;
  color: var(--text-primary);
  resize: none;
  overflow-x: hidden;
  overflow-y: auto;
  overflow-wrap: break-word;
  word-wrap: break-word;
  transition: all 0.2s ease;
  font-family: inherit;
}

.form-textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(30, 136, 229, 0.1);
}

.form-textarea::placeholder {
  color: #94a3b8;
}


.form-select {
  height: 42px;
  width: 100%;
  max-width: 320px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: white;
  padding: 0 12px;
  font-size: 14px;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.form-select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(30, 136, 229, 0.1);
}

/* Export Buttons */
.export-section {
  margin-bottom: 24px;
}

.export-section-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
}

.export-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.export-label-inline {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  margin-right: 4px;
  flex-shrink: 0;
}

.export-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.export-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: white;
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.export-btn:hover:not(:disabled) {
  background: #f8fafc;
  border-color: var(--primary-color);
  color: var(--primary-color);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(30, 136, 229, 0.15);
}

.export-btn:active:not(:disabled) {
  transform: translateY(0);
}

.export-btn:disabled {
  cursor: not-allowed;
  opacity: 0.5;
  background: #f1f5f9;
}

.export-btn-active {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
  box-shadow: 0 2px 8px rgba(30, 136, 229, 0.35);
}

.export-btn-active:hover:not(:disabled) {
  background: #1976d2;
  border-color: #1976d2;
  color: white;
}

.export-btn-primary {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
  margin-left: 8px;
}

.export-btn-primary:hover:not(:disabled) {
  background: #1976d2;
  border-color: #1976d2;
  color: white;
}

/* 开始格式化：单独一行、大按钮、居中 */
.start-format-row {
  margin-bottom: 24px;
  display: flex;
  justify-content: center;
}

.export-btn-start-format {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 32px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 10px;
  background: linear-gradient(135deg, #1e88e5 0%, #1976d2 100%);
  border: none;
  color: white;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(30, 136, 229, 0.35);
}

.export-btn-start-format:hover:not(:disabled) {
  background: linear-gradient(135deg, #1976d2 0%, #1565c0 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(30, 136, 229, 0.4);
}

.export-btn-start-format:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

/* 转换中遮罩 + 旋转动画 */
.converting-overlay {
  position: fixed;
  inset: 0;
  z-index: 3000;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.converting-overlay.hidden {
  display: none !important;
}

.converting-overlay-inner {
  background: white;
  border-radius: 16px;
  padding: 32px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  box-shadow: var(--shadow-lg);
  min-width: 260px;
}

.converting-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--border-color);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: converting-spin 0.9s linear infinite;
}

@keyframes converting-spin {
  to {
    transform: rotate(360deg);
  }
}

.converting-message {
  margin: 0;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
}

/* 下载区 */
.download-area {
  margin-top: 16px;
  padding: 16px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 12px;
}

.download-area.hidden {
  display: none !important;
}

.download-area-buttons {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  margin-top: 8px;
}

.download-rightclick-hint {
  margin: 0;
  font-size: 12px;
  color: var(--text-secondary);
}

.format-error-hint {
  margin-top: 12px;
  font-size: 14px;
  color: #b91c1c;
  font-weight: 500;
}

.format-error-hint.hidden {
  display: none !important;
}

.format-success-hint {
  font-size: 14px;
  color: var(--success-color, #0d9488);
  font-weight: 500;
  margin: 8px 0 4px 0;
}

.format-success-hint.hidden {
  display: none;
}

/* Word Options Panel */
.options-panel {
  background: #f8fafc;
  border-radius: 12px;
  padding: 20px;
  border: 1px solid var(--border-color);
  margin-bottom: 24px;
}

.options-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.radio-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}

.radio-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-size: 14px;
  color: var(--text-primary);
}

.radio-label input[type="radio"] {
  width: 16px;
  height: 16px;
  accent-color: var(--primary-color);
}

.checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-size: 14px;
  color: var(--text-primary);
}

.checkbox-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--primary-color);
}

.hint-text {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 8px;
}

/* Status Bar */
.status-bar {
  background: #f1f5f9;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 14px;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.download-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  border-radius: 8px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  margin-top: 12px;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.download-link:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.hidden {
  display: none !important;
}

/* Download Section */
.download-section {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border-color);
}

.section-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

.download-os-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 12px;
}

.download-os-tab {
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  background: #f1f5f9;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.download-os-tab:hover {
  background: #e2e8f0;
  color: var(--text-primary);
}

.download-os-tab.active {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: #fff;
}

.download-linux-hint {
  font-size: 13px;
  color: var(--text-secondary);
  margin: -6px 0 12px 0;
  line-height: 1.5;
}

.download-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.download-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: white;
  color: var(--text-primary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.download-btn:hover {
  background: #f8fafc;
  border-color: var(--primary-color);
  color: var(--primary-color);
}

/* Language Footer Links */
.lang-footer {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border-color);
}

.lang-links {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.8;
}

.lang-links a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s ease;
}

.lang-links a:hover {
  color: var(--primary-color);
}

.lang-links .current-lang {
  color: var(--primary-color);
  font-weight: 500;
}

/* Custom Format Modal */
.custom-format-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.custom-format-modal {
  background: white;
  border-radius: 16px;
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.custom-format-modal-inner {
  display: flex;
  flex-direction: column;
  max-height: 90vh;
}

.custom-format-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-color);
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
}

.custom-format-modal-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.custom-format-modal-close {
  background: none;
  border: none;
  font-size: 24px;
  color: #6b7280;
  cursor: pointer;
  padding: 4px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.custom-format-modal-close:hover {
  background: #f5f5f5;
  color: var(--text-primary);
}

.custom-format-modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

.custom-format-fieldset {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
}

.custom-format-legend {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  padding: 0 8px;
}

.custom-format-rows {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.custom-format-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.custom-format-label {
  font-size: 13px;
  color: var(--text-secondary);
  min-width: 120px;
  flex-shrink: 0;
}

.custom-format-input {
  height: 36px;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  padding: 0 10px;
  font-size: 13px;
  color: var(--text-primary);
}

.custom-format-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(30, 136, 229, 0.1);
}

.custom-format-input-text {
  flex: 1;
}

.custom-format-input-select {
  min-width: 120px;
}

.custom-format-input-num {
  width: 80px;
}

.custom-format-unit {
  font-size: 12px;
  color: var(--text-secondary);
}

.custom-format-modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  background: #f9fafb;
}

.custom-format-modal-ok {
  padding: 10px 24px;
  background: linear-gradient(135deg, #1e88e5 0%, #1976d2 100%);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.custom-format-modal-ok:hover {
  background: linear-gradient(135deg, #1976d2 0%, #1565c0 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(30, 136, 229, 0.3);
}

.custom-format-inline-btn {
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  background: white;
  font-size: 12px;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.custom-format-inline-btn:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

/* Footer Styles */
.footer {
  background-color: var(--footer-bg);
  margin-top: auto;
  padding: 50px 20px 30px;
}

.footer .container {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-content {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 30px;
}

.footer-brand-section {
  max-width: 280px;
}

.footer-logo {
  height: 40px;
  width: auto;
  object-fit: contain;
  margin-bottom: 16px;
}

.footer-desc {
  font-size: 13px;
  color: #94a3b8;
  line-height: 1.7;
  margin-bottom: 20px;
}

.footer-section h4 {
  margin-bottom: 20px;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
}

.footer-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-section ul li {
  margin-bottom: 12px;
}

.footer-section ul li a {
  text-decoration: none;
  color: #94a3b8;
  font-size: 14px;
  transition: color 0.3s;
}

.footer-section ul li a:hover {
  color: #3b82f6;
}

.contact-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #94a3b8;
  font-size: 14px;
}

.contact-icon-img {
  width: 18px;
  height: 18px;
  object-fit: contain;
  flex-shrink: 0;
}

.footer-bottom {
  padding: 20px 0;
  border-top: 1px solid #374151;
  text-align: center;
}

.copyright-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  color: #64748b;
  font-size: 13px;
}

.copyright-links a {
  color: #94a3b8;
  text-decoration: none;
  transition: color 0.3s;
}

.copyright-links a:hover {
  color: #3b82f6;
}

.separator {
  color: #475569;
}

/* Responsive Design */
@media (max-width: 1200px) {
  .nav {
    gap: 12px;
    margin-left: 20px;
  }

  .header-container {
    padding: 0 20px;
  }
}

@media (max-width: 992px) {
  .nav {
    gap: 10px;
    margin-left: 16px;
  }

  .nav-link {
    font-size: 13px;
    padding: 8px 2px;
  }
  
  .footer-content {
    grid-template-columns: 1fr 1fr;
    gap: 30px;
  }
  
  .footer-brand-section {
    grid-column: span 2;
    max-width: 100%;
  }
}

@media (max-width: 768px) {
  :root {
    --header-height: 60px;
  }
  
  .nav {
    display: none;
  }
  
  .header-right {
    gap: 8px;
  }
  
  .header-container {
    padding: 0 16px;
  }
  
  .header-search-btn {
    display: flex;
  }
  
  .mobile-menu-btn {
    display: flex;
  }
  
  .header-login-btn {
    padding: 8px 16px;
    font-size: 13px;
    height: 36px;
  }
  
  .main-content {
    padding: 2px 16px 5px 16px; /* 功能模块与导航、尾部间距再减半 */
  }
  
  .tool-header {
    padding: 20px 24px;
  }
  
  .tool-title {
    font-size: 22px;
  }
  
  .tool-body {
    padding: 24px;
  }
  
  .export-buttons {
    gap: 8px;
  }
  
  .export-btn {
    padding: 8px 16px;
    font-size: 13px;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 24px;
  }
  
  .footer-brand-section {
    grid-column: span 1;
  }
  
  .contact-list li {
    justify-content: center;
  }
  
  .custom-format-modal {
    margin: 16px;
    max-height: calc(100vh - 32px);
  }
  
  .custom-format-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
  
  .custom-format-label {
    min-width: auto;
  }
  
  .custom-format-input {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .tool-title-section {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .tool-title {
    font-size: 20px;
  }
  
  .tool-body {
    padding: 20px;
  }
  
  .form-textarea {
    height: 200px;
    min-height: 200px;
    max-height: 200px;
    overflow-x: hidden;
    overflow-y: auto;
  }
  
  .options-panel {
    padding: 16px;
  }
  
  .radio-group {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
}

/* Language Selector - Simple Version (No Search) */
.lang-native-hidden {
  display: none !important;
}

.lang-select-simple {
  position: relative;
  display: inline-block;
  z-index: 10001;
  min-width: 140px;
}

.lang-select-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: 140px;
  height: 36px;
  padding: 0 12px;
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 14px;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.lang-select-trigger:hover {
  border-color: var(--primary-color);
}

.lang-select-trigger[aria-expanded="true"] {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(30, 136, 229, 0.1);
}

.lang-select-trigger-text {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lang-select-trigger-arrow {
  margin-left: 8px;
  font-size: 12px;
  color: var(--text-secondary);
  transition: transform 0.2s ease;
}

.lang-select-trigger[aria-expanded="true"] .lang-select-trigger-arrow {
  transform: rotate(180deg);
}

.lang-select-panel {
  position: absolute;
  top: 100%;
  left: 0;
  width: 240px;
  max-height: min(320px, calc(100vh - 120px));
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  z-index: 10002;
  overflow: hidden;
  margin-top: 4px;
}

.lang-select-panel.hidden {
  display: none;
}

.lang-select-list {
  max-height: 300px;
  overflow-y: auto !important;
  overflow-x: hidden;
  padding: 4px;
  scrollbar-width: auto;
  scrollbar-color: #94a3b8 #f1f5f9;
  overscroll-behavior: contain;
}

.lang-select-list::-webkit-scrollbar {
  width: 12px !important;
  display: block !important;
  -webkit-appearance: auto;
}

.lang-select-list::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 7px;
  border: 1px solid #e2e8f0;
}

.lang-select-list::-webkit-scrollbar-thumb {
  background: #64748b;
  border-radius: 7px;
  border: 2px solid #f1f5f9;
  min-height: 40px;
}

.lang-select-list::-webkit-scrollbar-thumb:hover {
  background: #475569;
}

.lang-select-item {
  display: block;
  width: 100%;
  padding: 8px 12px;
  background: transparent;
  border: none;
  text-align: left;
  font-size: 14px;
  color: var(--text-primary);
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.lang-select-item:hover {
  background: var(--primary-light);
  color: var(--primary-color);
}

.lang-select-item.active {
  background: var(--primary-color);
  color: white;
}

.lang-select-empty {
  padding: 12px;
  text-align: center;
  color: var(--text-secondary);
  font-size: 13px;
}
