.btn-base {
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.2s;
}
.btn-base:hover:not(:disabled) {
  opacity: 0.9;
  transform: translateY(-1px);
}
.btn-base:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}
.card-base {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
}
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #f0f2f5;
  height: 100vh;
  overflow: hidden;
}
.app-layout {
  display: flex;
  height: 100vh;
}
.sidebar {
  width: 200px;
  min-width: 200px;
  background: linear-gradient(180deg, #1a1a2e 0%, #16213e 100%);
  color: #ccc;
  display: flex;
  flex-direction: column;
  user-select: none;
  box-shadow: 2px 0 12px rgba(0, 0, 0, 0.15);
  z-index: 10;
  transition: width 0.3s ease, min-width 0.3s ease;
  overflow: hidden;
  position: relative;
}
.sidebar.collapsed {
  width: 56px;
  min-width: 56px;
}
.sidebar.collapsed .sidebar-brand h3,
.sidebar.collapsed .sidebar-brand .brand-sub,
.sidebar.collapsed .sidebar-nav .menu-item .menu-text,
.sidebar.collapsed .sidebar-nav .menu-divider {
  display: none;
}
.sidebar.collapsed .sidebar-nav .menu-item {
  justify-content: center;
  padding: 12px 0;
  border-left: none;
}
.sidebar.collapsed .sidebar-nav .menu-item .menu-icon {
  margin: 0;
}
.sidebar.collapsed .sidebar-brand {
  text-align: center;
  padding: 12px 4px;
}
.sidebar.collapsed .sidebar-toggle {
  font-size: 14px;
}
.sidebar-brand {
  padding: 20px 16px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
}
.sidebar-brand h3 {
  font-size: 15px;
  color: #e0e0e0;
  font-weight: 700;
  letter-spacing: 0.5px;
}
.sidebar-brand .brand-sub {
  font-size: 11px;
  color: #777;
  margin-top: 4px;
}
.sidebar-nav {
  flex: 1;
  padding: 8px 0;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}
.sidebar-nav::-webkit-scrollbar {
  width: 4px;
}
.sidebar-nav::-webkit-scrollbar-track {
  background: transparent;
}
.sidebar-nav::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
}
.sidebar-nav::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.4);
}
.sidebar-nav .menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  cursor: pointer;
  font-size: 14px;
  color: #aaa;
  transition: all 0.2s;
  border-left: 3px solid transparent;
  white-space: nowrap;
}
.sidebar-nav .menu-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #ddd;
}
.sidebar-nav .menu-item.active {
  background: rgba(76, 175, 80, 0.12);
  color: #4caf50;
  border-left-color: #4caf50;
  font-weight: 600;
}
.sidebar-nav .menu-item .menu-icon {
  font-size: 16px;
  width: 22px;
  text-align: center;
  flex-shrink: 0;
}
.sidebar-nav .menu-item.logout {
  color: #e57373;
}
.sidebar-nav .menu-item.logout:hover {
  background: rgba(229, 115, 115, 0.1);
  color: #ef5350;
}
.sidebar-nav .menu-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.06);
  margin: 8px 16px;
}
.sidebar-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 40px;
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: #aaa;
  font-size: 16px;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s, color 0.2s;
  margin-top: auto;
}
.sidebar-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ddd;
}
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 16px 0 0;
  min-height: 0;
  position: relative;
  overflow-y: auto;
}
.content-panel {
  display: none;
  flex-direction: column;
  padding: 0 24px;
}
.content-panel.active {
  display: flex;
  gap: 0;
}
#page-home {
  flex: 1;
  min-height: 0;
  overflow: hidden;
}
.status-bar {
  height: 32px;
  line-height: 32px;
  padding: 0 16px;
  background: #f5f5f5;
  border-top: 1px solid #e0e0e0;
  font-size: 12px;
  color: #666;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.status-bar-content {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.status-bar-btn {
  font-size: 12px;
  padding: 0 4px;
  cursor: pointer;
  border: none;
  background: transparent;
  color: #555;
  flex-shrink: 0;
  line-height: 32px;
  transition: color 0.15s;
  text-decoration: none;
}
.status-bar-btn:hover {
  color: #4caf50;
  text-decoration: underline;
}
.status-bar-info {
  font-size: 12px;
  padding: 0 4px;
  color: #555;
  flex-shrink: 0;
  line-height: 32px;
  white-space: nowrap;
}
.toggle-btn {
  position: relative;
  padding: 14px 28px;
  border: 2px solid transparent;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  outline: none;
  min-width: 200px;
  letter-spacing: 0.5px;
}
.toggle-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.toggle-btn.capture {
  background: #e8f4fd;
  color: #0066cc;
  border-color: #0066cc;
}
.toggle-btn.capture:hover:not(:disabled) {
  background: #0066cc;
  color: #fff;
  box-shadow: 0 4px 16px rgba(0, 102, 204, 0.3);
  transform: translateY(-1px);
}
.toggle-btn.capture.active {
  background: #0066cc;
  color: #fff;
  border-color: #004a99;
}
.toggle-btn.capture.active:hover:not(:disabled) {
  background: #dc3545;
  border-color: #dc3545;
  box-shadow: 0 4px 16px rgba(220, 53, 69, 0.3);
}
.toggle-btn.asr {
  background: #eafaf1;
  color: #28a745;
  border-color: #28a745;
}
.toggle-btn.asr:hover:not(:disabled) {
  background: #28a745;
  color: #fff;
  box-shadow: 0 4px 16px rgba(40, 167, 69, 0.3);
  transform: translateY(-1px);
}
.toggle-btn.asr.active {
  background: #28a745;
  color: #fff;
  border-color: #1e7e34;
}
.toggle-btn.asr.active:hover:not(:disabled) {
  background: #dc3545;
  border-color: #dc3545;
  box-shadow: 0 4px 16px rgba(220, 53, 69, 0.3);
}
.collapsible-panel {
  border: 1px solid #d9d9d9;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}
.collapsible-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: #fafafa;
  user-select: none;
  font-size: 14px;
  font-weight: 600;
  color: #555;
  transition: background 0.2s;
}
.collapsible-header:hover {
  background: #f0f0f0;
}
.collapsible-header .header-left {
  display: flex;
  align-items: center;
  gap: 8px;
}
.collapsible-header .header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}
.collapsible-badge {
  font-size: 11px;
  background: #e8e8e8;
  color: #888;
  padding: 2px 8px;
  border-radius: 10px;
  margin-left: 4px;
}
.collapsible-content {
  padding: 16px;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
}
.collapsible-content.collapsed {
  max-height: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}
.collapsible-content > .collapsible-panel + .collapsible-panel {
  margin-top: 12px;
}
.inner-panel {
  border: none;
  border-radius: 0;
  background: transparent;
}
.inner-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid #e0e0e0;
  font-size: 13px;
  font-weight: 600;
  color: #555;
  user-select: none;
}
.inner-panel-content {
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
}
.inner-panel-content.collapsed {
  max-height: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}
.inner-panel + .inner-panel {
  margin-top: 8px;
}
#resultPanel {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
#resultPanel .collapsible-content {
  flex: 1;
  min-height: 0;
  max-height: none !important;
  display: flex;
  flex-direction: column;
}
.result-box-container {
  display: flex;
  flex: 1;
  min-height: 0;
  background: #1a1a2e;
  color: #e0e0e0;
  border: none;
  overflow: hidden;
}
.result-box-container.translation-hidden .result-right-pane,
.result-box-container.translation-hidden .result-divider {
  display: none;
}
.result-box-container.translation-only .result-left-pane,
.result-box-container.translation-only .result-divider {
  display: none;
}
.result-left-pane,
.result-right-pane {
  overflow-y: auto;
  overflow-x: hidden;
  padding: 12px 16px;
  font-family: "Courier New", monospace;
  font-size: 15px;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-all;
  flex: 1 1 0;
  min-width: 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}
.result-left-pane::-webkit-scrollbar,
.result-right-pane::-webkit-scrollbar {
  width: 4px;
}
.result-left-pane::-webkit-scrollbar-track,
.result-right-pane::-webkit-scrollbar-track {
  background: transparent;
}
.result-left-pane::-webkit-scrollbar-thumb,
.result-right-pane::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
}
.result-left-pane::-webkit-scrollbar-thumb:hover,
.result-right-pane::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.4);
}
.result-right-pane {
  display: flex;
  flex-direction: column;
}
.result-divider {
  width: 4px;
  background: #333;
  cursor: col-resize;
  flex-shrink: 0;
  transition: background 0.15s;
  user-select: none;
}
.result-divider:hover,
.result-divider.dragging {
  background: #4caf50;
}
.result-left-pane .partial,
.result-right-pane .partial {
  color: #888;
}
.result-left-pane .final,
.result-right-pane .final {
  color: #4caf50;
}
.result-left-pane .error,
.result-right-pane .error {
  color: #ff5252;
}
.result-left-pane .info-line,
.result-right-pane .info-line {
  color: #64b5f6;
  font-size: 13px;
}
.result-left-pane .timestamp-line,
.result-right-pane .timestamp-line {
  color: #ffd54f;
  font-size: 13px;
  border-bottom: 1px dashed #444;
  padding-bottom: 6px;
  margin-bottom: 8px;
}
.result-right-pane .translation-line {
  color: #ffd54f;
}
.log-content {
  max-height: 200px;
  overflow-y: auto;
  padding: 8px 16px;
  background: #fff;
  color: #333;
  font-family: "Courier New", monospace;
  font-size: 12px;
  line-height: 1.6;
  border: 1px solid #e0e0e0;
  scrollbar-width: thin;
  scrollbar-color: #c0c0c0 #f0f0f0;
}
.log-content::-webkit-scrollbar {
  width: 6px;
}
.log-content::-webkit-scrollbar-track {
  background: #f0f0f0;
  border-radius: 3px;
}
.log-content::-webkit-scrollbar-thumb {
  background: #c0c0c0;
  border-radius: 3px;
}
.log-content::-webkit-scrollbar-thumb:hover {
  background: #999;
}
.log-content .error,
.log-content .info-line {
  color: #333;
}
.help-content {
  padding: 12px 16px;
  font-size: 14px;
  color: #333;
  line-height: 1.8;
}
.help-content .help-scene {
  color: #666;
  margin-bottom: 12px;
}
.help-content .help-steps {
  background: #f0f5ff;
  border-left: 4px solid #0066cc;
  padding: 12px 16px;
  border-radius: 4px;
  color: #333;
}
canvas {
  width: 100%;
  height: 140px;
  background: #0d0d1a;
  border-radius: 0;
  display: block;
  border: none;
}
.panel-header-btn {
  font-size: 12px;
  padding: 4px 10px;
  cursor: pointer;
  border: 1px solid #d9d9d9;
  border-radius: 4px;
  background: #fff;
  color: #555;
  transition: background 0.2s;
}
.panel-header-btn:hover {
  background: #f0f0f0;
}
.settings-desc {
  font-size: 14px;
  color: #555;
  margin: 8px 0 16px;
}
.settings-card {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 28px 32px;
  width: 100%;
  max-width: 100%;
}
.settings-body {
  font-size: 13px;
}
.settings-section {
  margin-bottom: 28px;
}
.settings-section:last-of-type {
  margin-bottom: 0;
}
.settings-section-title {
  font-size: 16px;
  font-weight: 700;
  color: #333;
  margin-bottom: 4px;
}
.settings-section-hint {
  font-size: 13px;
  color: #888;
  margin-bottom: 14px;
}
.display-mode-diagram {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.dm-diagram-item {
  flex: 1;
  min-width: 140px;
  max-width: 200px;
  text-align: center;
  cursor: pointer;
  padding: 10px;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  transition: border-color 0.2s, box-shadow 0.2s;
  position: relative;
  overflow: hidden;
}
.dm-diagram-item:hover {
  border-color: #a5d6a7;
  box-shadow: 0 2px 8px rgba(76, 175, 80, 0.08);
}
.dm-diagram-item.active {
  border-color: #4caf50;
  box-shadow: 0 2px 12px rgba(76, 175, 80, 0.25);
  background: rgba(76, 175, 80, 0.04);
}
.dm-diagram-item.active::after {
  content: "";
  position: absolute;
  bottom: 0;
  right: 0;
  width: 24px;
  height: 24px;
  background-image: url(4f23ce529f5416299f52.svg);
  background-size: cover;
  z-index: 1;
}
.dm-diagram-box {
  background: #1a1a2e;
  border-radius: 4px;
  padding: 12px 10px;
  margin-bottom: 8px;
  min-height: 54px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.dm-dual-box {
  flex-direction: row;
  gap: 4px;
}
.dm-block {
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  line-height: 1.5;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dm-block-original {
  background: rgba(0, 204, 102, 0.2);
  color: #00cc66;
  border: 1px solid rgba(0, 204, 102, 0.4);
}
.dm-block-translation {
  background: rgba(255, 213, 79, 0.2);
  color: #ffd54f;
  border: 1px solid rgba(255, 213, 79, 0.4);
}
.dm-diagram-label {
  font-size: 12px;
  font-weight: 600;
  color: #555;
}
.display-mode-radios {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.display-mode-card {
  flex: 1;
  min-width: 120px;
  padding: 14px 12px;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  cursor: pointer;
  text-align: center;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  position: relative;
  overflow: hidden;
}
.display-mode-card:hover {
  border-color: #a5d6a7;
  box-shadow: 0 1px 4px rgba(76, 175, 80, 0.08);
}
.display-mode-card.active {
  border-color: #4caf50;
  background: rgba(76, 175, 80, 0.06);
  box-shadow: 0 1px 6px rgba(76, 175, 80, 0.12);
}
.display-mode-card.active::after {
  content: "";
  position: absolute;
  bottom: 0;
  right: 0;
  width: 24px;
  height: 24px;
  background-image: url(4f23ce529f5416299f52.svg);
  background-size: cover;
  z-index: 1;
}
.display-mode-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.dm-card-icon {
  font-size: 22px;
}
.dm-card-text {
  font-size: 14px;
  font-weight: 700;
  color: #333;
}
.dm-card-desc {
  font-size: 11px;
  color: #888;
}
.lang-card-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
}
.lang-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 14px 8px;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.lang-card:hover {
  border-color: #90caf9;
  background: rgba(0, 102, 204, 0.03);
}
.lang-card.checked,
.lang-card.active {
  border-color: #4caf50;
  background: rgba(76, 175, 80, 0.06);
  box-shadow: 0 1px 6px rgba(76, 175, 80, 0.12);
}
.lang-card.checked::after,
.lang-card.active::after {
  content: "";
  position: absolute;
  bottom: 0;
  right: 0;
  width: 24px;
  height: 24px;
  background-image: url(4f23ce529f5416299f52.svg);
  background-size: cover;
  z-index: 1;
}
.lang-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.lang-flag {
  font-size: 26px;
}
.lang-name {
  font-size: 13px;
  font-weight: 600;
  color: #333;
}
.lang-code {
  font-size: 10px;
  color: #888;
  background: #fafafa;
  padding: 1px 6px;
  border-radius: 3px;
}
.translate-settings-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}
.translate-settings-overlay.show {
  display: flex;
}
.translate-settings-dialog {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  width: 520px;
  max-width: 95vw;
  max-height: 90vh;
  overflow-y: auto;
}
.translate-settings-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid #e0e0e0;
  font-size: 15px;
  font-weight: 700;
  color: #333;
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 1;
}
.translate-settings-close {
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  font-size: 16px;
  color: #999;
  cursor: pointer;
  border-radius: 4px;
}
.translate-settings-close:hover {
  color: #333;
}
.translate-settings-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid #e0e0e0;
}
.translate-settings-btn {
  padding: 7px 24px;
  border: none;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
}
.translate-settings-btn:hover {
  opacity: 0.85;
}
.translate-settings-btn.save {
  background: #4caf50;
  color: #fff;
}
.translate-settings-btn.cancel {
  background: #f0f0f0;
  color: #555;
}
.translate-settings-btn.cancel:hover {
  background: #e0e0e0;
}
#resultPanel:fullscreen,
#resultPanel:-webkit-full-screen {
  display: flex;
  flex-direction: column;
  width: 100vw;
  height: 100vh;
  background: #fff;
  padding: 16px 24px;
  box-sizing: border-box;
  margin: 0;
  border: none;
  border-radius: 0;
}
#resultPanel:fullscreen .collapsible-content,
#resultPanel:-webkit-full-screen .collapsible-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  max-height: none !important;
}
#resultPanel:fullscreen .result-box-container,
#resultPanel:-webkit-full-screen .result-box-container {
  flex: 1;
  max-height: none;
  min-height: 0;
}
#resultPanel:fullscreen .result-single-pane,
#resultPanel:-webkit-full-screen .result-single-pane {
  flex: 1;
  max-height: none;
  min-height: 0;
}
.result-single-pane {
  overflow-y: auto;
  padding: 12px 16px;
  font-family: "Courier New", monospace;
  font-size: 15px;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-all;
  background: #1a1a2e;
  color: #e0e0e0;
  flex: 1;
  min-height: 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}
.result-single-pane::-webkit-scrollbar {
  width: 4px;
}
.result-single-pane::-webkit-scrollbar-track {
  background: transparent;
}
.result-single-pane::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
}
.result-single-pane::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.4);
}
.result-single-pane .partial {
  color: #888;
}
.result-single-pane .final {
  color: #4caf50;
}
.result-single-pane .timestamp-line {
  color: #ffd54f;
  font-size: 13px;
  border-bottom: 1px dashed #444;
  padding-bottom: 6px;
  margin-bottom: 8px;
}
.result-single-pane .single-translation-line {
  color: #ffd54f;
  font-size: 14px;
  line-height: 1.6;
}
.result-single-pane .result {
  color: #e0e0e0;
}
.result-single-pane .result.final {
  color: #4caf50;
}
.result-single-pane .translation-line {
  color: #ffd54f;
}
.result-left-pane:empty,
.result-right-pane:empty {
  display: flex;
  align-items: center;
  justify-content: center;
}
.result-left-pane:empty::after {
  content: "\539F\6587";
  color: rgba(255, 255, 255, 0.15);
  font-size: 32px;
  font-weight: 700;
  letter-spacing: 8px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.result-right-pane:empty::after {
  content: "\8BD1\6587";
  color: rgba(255, 255, 255, 0.15);
  font-size: 32px;
  font-weight: 700;
  letter-spacing: 8px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.result-single-pane:empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
.result-single-pane:empty::before {
  content: "\539F\6587";
  color: rgba(0, 204, 102, 0.25);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 8px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.result-single-pane:empty::after {
  content: "\8BD1\6587";
  color: rgba(255, 213, 79, 0.25);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 8px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.credit-balance-card {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  border-radius: 12px;
  padding: 24px;
  text-align: center;
}
.credit-balance-card .balance-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
}
.credit-balance-card .balance-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 120px;
}
.credit-balance-card .balance-divider {
  width: 1px;
  height: 48px;
  background: rgba(255, 255, 255, 0.3);
  flex-shrink: 0;
}
.credit-balance-card .balance-label {
  font-size: 13px;
  opacity: 0.85;
  margin-bottom: 8px;
}
.credit-balance-card .balance-value {
  font-size: 36px;
  font-weight: 700;
}
.credit-balance-card .balance-unit {
  font-size: 14px;
  opacity: 0.7;
}
.credit-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 16px;
}
.credit-btn {
  padding: 10px 24px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
}
.credit-btn:hover {
  opacity: 0.85;
}
.credit-btn.recharge {
  background: #4caf50;
  color: #fff;
}
.credit-btn.refresh {
  background: #ccc;
  color: #000;
  border: 1px solid rgba(255, 255, 255, 0.4);
}
.credit-history {
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  overflow: hidden;
}
.credit-history table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.credit-history th {
  background: #fafafa;
  padding: 10px 14px;
  text-align: left;
  font-weight: 600;
  color: #555;
  border-bottom: 1px solid #e0e0e0;
}
.credit-history td {
  padding: 10px 14px;
  border-bottom: 1px solid #f0f0f0;
  color: #333;
}
.credit-history tr:hover td {
  background: #fafafa;
}
.credit-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 16px;
  border-bottom: 2px solid #e0e0e0;
}
.credit-tab {
  padding: 10px 24px;
  font-size: 14px;
  font-weight: 600;
  color: #888;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color 0.2s, border-color 0.2s;
  user-select: none;
}
.credit-tab:hover {
  color: #4caf50;
}
.credit-tab.active {
  color: #4caf50;
  border-bottom-color: #4caf50;
}
.credit-deduct {
  color: #e57373 !important;
  font-weight: 600;
}
.credit-add {
  color: #4caf50 !important;
  font-weight: 600;
}
.credit-loading {
  text-align: center;
  padding: 40px;
  color: #999;
  font-size: 14px;
}
.recharge-title {
  font-size: 18px;
  font-weight: 700;
  color: #333;
  text-align: center;
  margin-bottom: 6px;
}
.recharge-hint {
  font-size: 13px;
  color: #888;
  text-align: center;
  margin-bottom: 20px;
}
.recharge-plan-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  max-width: 600px;
  margin: 0 auto;
}
@media (max-width: 500px) {
  .recharge-plan-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
}
.recharge-plan-card {
  position: relative;
  background: #fff;
  border: 2px solid #e0e0e0;
  border-radius: 12px;
  padding: 20px 16px 18px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
  user-select: none;
}
.recharge-plan-card:hover {
  border-color: #667eea;
  box-shadow: 0 4px 16px rgba(102, 126, 234, 0.15);
  transform: translateY(-2px);
}
.recharge-plan-card.selected {
  border-color: #4caf50;
  box-shadow: 0 4px 20px rgba(76, 175, 80, 0.25);
  background: linear-gradient(135deg, #f0fff0 0%, #e8f5e9 100%);
}
.recharge-plan-card.recharge-plan-hot {
  border-color: #ff9800;
  background: linear-gradient(135deg, #fff8e1 0%, #fff3e0 100%);
}
.recharge-plan-price {
  font-size: 22px;
  font-weight: 700;
  color: #333;
  margin-bottom: 6px;
}
.recharge-plan-credits {
  font-size: 15px;
  font-weight: 600;
  color: #4caf50;
  margin-bottom: 4px;
}
.recharge-plan-rate {
  font-size: 12px;
  color: #888;
  margin-bottom: 6px;
}
.recharge-plan-badge {
  display: inline-block;
  background: #4caf50;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 10px;
  margin-top: 4px;
}
.recharge-plan-hot-tag {
  position: absolute;
  top: -10px;
  right: -4px;
  background: linear-gradient(135deg, #ff9800, #f57c00);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 10px;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(255, 152, 0, 0.3);
}
.recharge-confirm-btn {
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.2s;
  display: block;
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
  padding: 14px 28px;
  background: linear-gradient(135deg, #4caf50 0%, #2e7d32 100%);
  color: #fff;
  font-size: 16px;
  border-radius: 10px;
}
.recharge-confirm-btn:hover:not(:disabled) {
  opacity: 0.9;
  transform: translateY(-1px);
}
.recharge-confirm-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}
.recharge-confirm-btn:disabled {
  background: #ccc;
  color: #999;
  cursor: not-allowed;
  transform: none;
}
.help-cards {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.help-card {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  padding: 20px;
}
.help-card h4 {
  font-size: 16px;
  color: #333;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.help-card p,
.help-card li {
  font-size: 14px;
  color: #555;
  line-height: 1.8;
}
.help-card ul {
  padding-left: 20px;
}
.help-card .highlight-box {
  background: #f0f5ff;
  border-left: 4px solid #0066cc;
  padding: 12px 16px;
  border-radius: 4px;
  margin-top: 8px;
}
.account-info-card {
  max-width: 480px;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.account-info-card .user-avatar-lg {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 700;
  flex-shrink: 0;
}
.account-info-card .user-details {
  flex: 1;
  min-width: 0;
}
.account-info-card .user-details .user-name-lg {
  font-size: 18px;
  font-weight: 700;
  color: #333;
  margin-bottom: 4px;
}
.account-info-card .user-details .user-id-text {
  font-size: 13px;
  color: #888;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.account-form {
  max-width: 480px;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 28px;
}
.account-form h3 {
  font-size: 18px;
  color: #333;
  margin-bottom: 20px;
}
.form-group {
  margin-bottom: 18px;
}
.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #555;
  margin-bottom: 6px;
}
.form-group input {
  width: 100%;
  padding: 10px 14px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 14px;
  transition: border-color 0.2s;
  outline: none;
}
.form-group input:focus {
  border-color: #4caf50;
}
.form-btn {
  width: 100%;
  padding: 12px;
  background: #4caf50;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
}
.form-btn:hover {
  opacity: 0.9;
}
.form-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.form-msg {
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 13px;
  margin-bottom: 14px;
  display: none;
}
.form-msg.show {
  display: block;
}
.form-msg.success {
  background: #f0fff0;
  border: 1px solid #4caf50;
  color: #2e7d32;
}
.form-msg.error {
  background: #fff2f0;
  border: 1px solid #ff7875;
  color: #cf1322;
}
.page-title {
  font-size: 18px;
  font-weight: 700;
  color: #333;
  padding-bottom: 4px;
  border-bottom: 2px solid #4caf50;
  display: inline-block;
}
.audio-warning-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 2000;
  justify-content: center;
  align-items: center;
}
.audio-warning-overlay.show {
  display: flex;
}
.audio-warning-dialog {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
  width: 420px;
  max-width: 90vw;
}
.audio-warning-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid #e0e0e0;
  font-size: 15px;
  font-weight: 700;
  color: #333;
}
.audio-warning-close {
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  font-size: 16px;
  color: #999;
  cursor: pointer;
  border-radius: 4px;
}
.audio-warning-close:hover {
  color: #333;
}
.audio-warning-body {
  padding: 20px;
  font-size: 14px;
  color: #555;
  line-height: 1.8;
}
.audio-warning-body strong {
  color: #333;
}
.audio-warning-actions {
  display: flex;
  justify-content: center;
  margin-top: 20px;
}
.audio-warning-btn {
  padding: 8px 32px;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
}
.audio-warning-btn.primary {
  background: #4caf50;
  color: #fff;
}
.audio-warning-btn:hover {
  opacity: 0.85;
}
@media (max-width: 900px) {
  .sidebar:not(.collapsed) {
    width: 56px;
    min-width: 56px;
  }
  .sidebar:not(.collapsed) .sidebar-brand h3,
  .sidebar:not(.collapsed) .sidebar-brand .brand-sub,
  .sidebar:not(.collapsed) .sidebar-nav .menu-item .menu-text,
  .sidebar:not(.collapsed) .sidebar-nav .menu-divider {
    display: none;
  }
  .sidebar:not(.collapsed) .sidebar-nav .menu-item {
    justify-content: center;
    padding: 12px 0;
    border-left: none;
  }
  .sidebar:not(.collapsed) .sidebar-nav .menu-item .menu-icon {
    margin: 0;
  }
  .sidebar:not(.collapsed) .sidebar-brand {
    text-align: center;
    padding: 12px 4px;
  }
  .sidebar:not(.collapsed) .sidebar-toggle {
    font-size: 14px;
  }
  .sidebar-toggle {
    display: none;
  }
}
@media (max-width: 600px) {
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 500;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }
  .sidebar.mobile-open {
    transform: translateX(0);
    width: 200px;
    min-width: 200px;
  }
  .sidebar.mobile-open .sidebar-brand h3,
  .sidebar.mobile-open .sidebar-brand .brand-sub,
  .sidebar.mobile-open .sidebar-nav .menu-item .menu-text,
  .sidebar.mobile-open .sidebar-nav .menu-divider {
    display: revert;
  }
  .sidebar.mobile-open .sidebar-nav .menu-item {
    justify-content: flex-start;
    padding: 12px 20px;
    border-left: 3px solid transparent;
  }
  .sidebar.mobile-open .sidebar-nav .menu-item .menu-icon {
    margin: 0;
  }
  .sidebar.mobile-open .sidebar-brand {
    text-align: center;
    padding: 20px 16px 16px;
  }
  .main-content {
    padding-left: 0;
  }
  .content-panel {
    padding: 0 12px;
  }
}
.mobile-menu-btn {
  display: none;
  position: fixed;
  top: 19px;
  left: 18px;
  width: 32px;
  height: 38px;
  border-radius: 5px;
  background: #fafafa;
  color: #ccc;
  border: none;
  font-size: 20px;
  cursor: pointer;
  z-index: 450;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s, transform 0.2s;
}
.mobile-menu-btn:hover {
  background: linear-gradient(180deg, #1a1a2e 0%, #16213e 100%);
  color: #fff;
  transform: scale(1.05);
}
@media (max-width: 600px) {
  .mobile-menu-btn {
    display: flex;
  }
}
.mobile-sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 490;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.mobile-sidebar-overlay.show {
  opacity: 1;
  pointer-events: auto;
}
@media (max-width: 600px) {
  .mobile-sidebar-overlay {
    display: block;
  }
}

