:root {
  --bg-primary: #0d1117;
  --bg-secondary: #161b22;
  --bg-tertiary: #21262d;
  --bg-card: #161b22;
  --bg-hover: #26303c;
  --bg-input: #0d1117;
  --border-color: #30363d;
  --border-light: #484f58;
  --text-primary: #f0f6fc;
  --text-secondary: #8b949e;
  --text-muted: #6e7681;
  --accent-blue: #58a6ff;
  --accent-blue-hover: #3182ce;
  --accent-cyan: #1f9eff;
  --accent-green: #3fb950;
  --accent-red: #f85149;
  --accent-orange: #f28b82;
  --accent-yellow: #fbbc04;
  --sidebar-width: 200px;
  --right-sidebar-width: 280px;
  --topbar-height: 56px;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.2);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.3);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.4);
  --transition: 0.2s ease;
  --z-sidebar: 90;
  --z-topbar: 100;
  --z-sticky: 200;
  --z-overlay: 1000;
  --z-toast: 9999;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Noto Sans SC', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
}

.page {
  display: none;
}

.page.active {
  display: block;
}

.login-container {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: linear-gradient(145deg, var(--bg-secondary), var(--bg-primary));
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 48px 40px;
  text-align: center;
  width: 400px;
  max-width: 90vw;
  box-shadow: var(--shadow-lg);
}

.login-logo {
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
}

.login-logo svg {
  width: 100%;
  height: 100%;
  border-radius: 14px;
}

.login-container h1 {
  font-size: 26px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
  letter-spacing: 1px;
}

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

.error {
  color: var(--accent-red);
  margin-top: 14px;
  font-size: 13px;
  min-height: 20px;
}

.input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  z-index: 1;
}

.login-container input[type="password"],
.login-container input[type="text"] {
  width: 100%;
  padding: 14px 16px 14px 42px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 15px;
  transition: all var(--transition);
  outline: none;
  position: relative;
  z-index: 1;
}

.login-container input[type="password"]:focus,
.login-container input[type="text"]:focus {
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(88,166,255,0.15), 0 4px 16px rgba(88,166,255,0.25);
}

.login-container input[type="password"]::placeholder,
.login-container input[type="text"]::placeholder {
  color: var(--text-muted);
  transition: all var(--transition);
}

.login-container input[type="password"]:focus::placeholder,
.login-container input[type="text"]:focus::placeholder {
  color: var(--text-secondary);
  opacity: 0.8;
}

.input-group {
  position: relative;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.input-group .input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  z-index: 1;
  pointer-events: none;
}

.input-group input {
  flex: 1;
  padding-left: 42px !important;
}

#send-code-btn {
  padding: 14px 18px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  min-width: 120px;
}

#send-code-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--accent-blue);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(88,166,255,0.2);
}

#send-code-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.login-container button[type="submit"] {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-blue-hover));
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  letter-spacing: 0.5px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(88,166,255,0.3);
}

.login-container button[type="submit"]::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left var(--transition);
}

.login-container button[type="submit"]:hover::before {
  left: 100%;
}

.login-container button[type="submit"]:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(88,166,255,0.45);
}

.error {
  color: var(--accent-red);
  margin-top: 14px;
  font-size: 13px;
  min-height: 20px;
}

#main-app.active {
  display: flex;
  flex-direction: column;
  height: 100vh;
}

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--topbar-height);
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  z-index: var(--z-topbar);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(8px);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.topbar-title img {
  display: inline-block;
  vertical-align: middle;
  z-index: 1;
  position: relative;
}



.topbar-version {
  font-size: 11px;
  color: var(--accent-blue);
  background: rgba(88,166,255,0.12);
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 500;
}

.topbar-center {
  display: flex;
  align-items: center;
  gap: 20px;
  flex: 1;
  justify-content: center;
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(63,185,80,0.1);
  border-radius: 20px;
  border: 1px solid rgba(63,185,80,0.25);
  transition: all var(--transition);
}

.status-indicator:hover {
  background: rgba(63,185,80,0.15);
  border-color: rgba(63,185,80,0.35);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  animation: pulse-dot 2s infinite;
  box-shadow: 0 0 0 2px rgba(63,185,80,0.2);
}

.status-dot.running { background: var(--accent-green); }
.status-dot.stopped { background: var(--accent-red); animation: none; box-shadow: 0 0 0 2px rgba(248,81,73,0.2); }
.status-dot.warning { background: var(--accent-yellow); box-shadow: 0 0 0 2px rgba(251,188,4,0.2); }

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

.status-text {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-green);
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--bg-tertiary);
  border-radius: 16px;
  border: 1px solid var(--border-color);
  transition: all var(--transition);
}

.stat-item:hover {
  background: var(--bg-hover);
  border-color: var(--border-light);
}

.stat-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.stat-value {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-blue);
  font-variant-numeric: tabular-nums;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.topbar-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
}

.topbar-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--accent-blue);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(88,166,255,0.2);
}

.topbar-btn svg {
  width: 18px;
  height: 18px;
}

.topbar-version-info {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: 8px;
  padding-left: 12px;
  border-left: 1px solid var(--border-color);
}

.topbar-version-info span {
  font-size: 11px;
  color: var(--text-muted);
}

.update-badge {
  width: 22px;
  height: 22px;
  background: var(--accent-blue);
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  box-shadow: 0 2px 6px rgba(88,166,255,0.3);
}

.update-badge:hover {
  background: var(--accent-blue-hover);
  transform: scale(1.1);
  box-shadow: 0 3px 10px rgba(88,166,255,0.4);
}

.sidebar {
  position: fixed;
  top: var(--topbar-height);
  left: 0;
  bottom: 0;
  width: var(--sidebar-width);
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-color);
  overflow-y: auto;
  z-index: var(--z-sidebar);
  padding: 20px 0;
  transition: all var(--transition);
}

.sidebar:hover {
  box-shadow: 2px 0 10px rgba(0,0,0,0.2);
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0 12px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all var(--transition);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.nav-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--accent-blue);
  transform: scaleY(0);
  transition: transform var(--transition);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.nav-item:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  transform: translateX(4px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.nav-item:hover::before {
  transform: scaleY(1);
}

.nav-item.active {
  background: rgba(88,166,255,0.15);
  color: var(--accent-blue);
}

.nav-item.active::before {
  transform: scaleY(1);
}

.nav-item svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  transition: all var(--transition);
}

.nav-item:hover svg {
  transform: scale(1.1);
  color: var(--accent-blue);
}

.nav-item.active svg {
  color: var(--accent-blue);
  transform: scale(1.1);
}

.main-content {
  margin-top: var(--topbar-height);
  margin-left: var(--sidebar-width);
  margin-right: var(--right-sidebar-width);
  min-height: calc(100vh - var(--topbar-height));
  padding: 24px;
  overflow-y: auto;
}

.panel {
  animation: fadeIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.hidden {
  display: none !important;
}

/* 平滑滚动 */
html {
  scroll-behavior: smooth;
}

/* 表格行悬停动画 */
.data-table tbody tr {
  transition: all var(--transition);
}

.data-table tbody tr:hover {
  background: rgba(88,166,255,0.06);
  transform: translateX(4px);
}

/* 模态框动画增强 */
.modal-overlay {
  animation: modalIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.modal-box {
  animation: modalSlideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modalSlideUp {
  from { opacity: 0; transform: translateY(30px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* 上传区域动画 */
.upload-drop-zone {
  transition: all var(--transition);
}

.upload-drop-zone:hover,
.upload-drop-zone.dragover {
  border-color: var(--accent-blue);
  background: rgba(88,166,255,0.1);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(88,166,255,0.2);
}

/* Toast动画增强 */
.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 500;
  color: white;
  box-shadow: var(--shadow-lg);
  animation: toastIn 0.3s ease, toastOut 0.3s ease 2.7s forwards;
  min-width: 250px;
  max-width: 380px;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateX(100%); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes toastOut {
  from { opacity: 1; transform: translateX(0); }
  to { opacity: 0; transform: translateX(100%); }
}

/* 进度条动画 */
.progress-fill {
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 统计数字动画 */
.ip-total-number,
.file-stat-num,
.rs-stat-val {
  transition: all var(--transition);
}

.ip-total-number:hover,
.file-stat-num:hover,
.rs-stat-val:hover {
  transform: scale(1.05);
  color: var(--accent-cyan);
}

/* 按钮点击动画 */
.action-btn:active,
.topbar-btn:active,
.btn-action:active {
  transform: translateY(0) scale(0.98);
  transition: transform 0.1s ease;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}

.panel-header h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
}

.panel-header h2 svg {
  width: 22px;
  height: 22px;
  color: var(--accent-cyan);
}

.refresh-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 13px;
  cursor: pointer;
  transition: all var(--transition);
}

.refresh-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--border-light);
}

.refresh-btn.loading svg {
  animation: spin 0.8s linear infinite;
}

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

.refresh-btn svg {
  width: 16px;
  height: 16px;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition);
  position: relative;
  box-shadow: var(--shadow-sm);
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-blue), var(--accent-cyan));
  transform: scaleX(0);
  transition: transform var(--transition);
}

.card:hover {
  border-color: var(--accent-blue);
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.card:hover::before {
  transform: scaleX(1);
}

.card.wide {
  grid-column: span 2;
}

.card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border-color);
  background: rgba(88,166,255,0.05);
  position: relative;
  overflow: hidden;
}

.card-header::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(88,166,255,0.1) 0%, transparent 100%);
  opacity: 0;
  transition: opacity var(--transition);
}

.card:hover .card-header::after {
  opacity: 1;
}

.card-header svg {
  width: 20px;
  height: 20px;
  color: var(--accent-blue);
  flex-shrink: 0;
  transition: all var(--transition);
  position: relative;
  z-index: 1;
}

.card:hover .card-header svg {
  transform: scale(1.1);
  color: var(--accent-cyan);
}

.card-header h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  position: relative;
  z-index: 1;
}

.card-body {
  padding: 24px;
  position: relative;
  z-index: 1;
}

.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid rgba(51,65,85,0.5);
}

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

.info-label {
  font-size: 13px;
  color: var(--text-muted);
}

.info-value {
  font-size: 13px;
  color: var(--text-primary);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.runtime-status {
  display: flex;
  align-items: center;
  gap: 24px;
}

.status-circle {
  position: relative;
  width: 90px;
  height: 90px;
  flex-shrink: 0;
}

.status-circle svg {
  width: 100%;
  height: 100%;
}

.status-text-inner {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-green);
}

.runtime-details {
  flex: 1;
}

.runtime-status-text {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.runtime-uptime {
  font-size: 13px;
  color: var(--text-secondary);
}

.traffic-stats {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.traffic-stat {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.traffic-label {
  font-size: 13px;
  color: var(--text-muted);
}

.traffic-value {
  font-size: 18px;
  font-weight: 700;
  color: var(--accent-cyan);
  font-variant-numeric: tabular-nums;
}

.traffic-chart-wrap {
  margin-top: 8px;
  background: var(--bg-primary);
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  justify-content: center;
}

.ip-count-header {
  text-align: center;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-color);
}

.ip-total-number {
  display: block;
  font-size: 48px;
  font-weight: 800;
  color: var(--accent-cyan);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.ip-total-label {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

.ip-table-wrap {
  max-height: 280px;
  overflow-y: auto;
}

.ip-table-wrap .empty-hint {
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  padding: 28px 0;
}

.ip-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}

.ip-table th {
  position: sticky;
  top: 0;
  background: var(--bg-primary);
  padding: 9px 10px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border-color);
  z-index: 2;
}

.ip-table td {
  padding: 8px 10px;
  border-bottom: 1px solid rgba(51,65,85,0.4);
  color: var(--text-secondary);
  vertical-align: middle;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
}

.ip-table tbody tr:hover {
  background: rgba(59,130,246,0.06);
}

.ip-table tbody tr:last-child td {
  border-bottom: none;
}

.ip-table td:first-child {
  font-family: 'Cascadia Code', 'Fira Code', monospace;
  font-size: 11.5px;
  color: var(--accent-blue);
}

.ip-table td:nth-child(2),
.ip-table td:nth-child(3) {
  font-weight: 600;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

.ip-table td:nth-child(3) {
  color: var(--accent-cyan);
}

.ip-table td:last-child {
  color: var(--text-muted);
  font-size: 11.5px;
}

.files-overview {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 16px;
}

.file-stat-box {
  text-align: center;
  padding: 16px 12px;
  background: var(--bg-primary);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.file-stat-num {
  display: block;
  font-size: 28px;
  font-weight: 800;
  color: var(--accent-blue);
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

.file-stat-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

.traffic-overview {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 16px;
}

.traffic-stat-box {
  text-align: center;
  padding: 16px 12px;
  background: var(--bg-primary);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.traffic-stat-num {
  display: block;
  font-size: 28px;
  font-weight: 800;
  color: var(--accent-blue);
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

.traffic-stat-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

.panel-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
}

.search-box svg {
  position: absolute;
  left: 12px;
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  pointer-events: none;
}

.search-box input {
  padding: 10px 16px 10px 36px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 13px;
  width: 240px;
  outline: none;
  transition: all var(--transition);
  position: relative;
  z-index: 1;
}

.search-box input:focus {
  border-color: var(--accent-blue);
  transform: translateY(-1px);
  box-shadow: 0 0 0 3px rgba(88,166,255,0.15), 0 4px 12px rgba(88,166,255,0.2);
}

.search-box input::placeholder {
  color: var(--text-muted);
  transition: all var(--transition);
}

.search-box input:focus::placeholder {
  color: var(--text-secondary);
  opacity: 0.8;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.action-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
  transition: left var(--transition);
}

.action-btn:hover::before {
  left: 100%;
}

.action-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--accent-blue);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.action-btn.primary {
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-blue-hover));
  border-color: transparent;
  color: white;
  box-shadow: 0 2px 8px rgba(88,166,255,0.3);
}

.action-btn.primary:hover {
  box-shadow: 0 4px 16px rgba(88,166,255,0.45);
  transform: translateY(-2px);
}

.action-btn.warning {
  background: rgba(248,81,73,0.12);
  border-color: rgba(248,81,73,0.3);
  color: var(--accent-red);
}

.action-btn.warning:hover {
  background: rgba(248,81,73,0.22);
  border-color: var(--accent-red);
  box-shadow: 0 4px 12px rgba(248,81,73,0.2);
}

.action-btn svg {
  width: 16px;
  height: 16px;
  transition: all var(--transition);
}

.action-btn:hover svg {
  transform: scale(1.1);
}

.table-container {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: auto;
  max-height: calc(100vh - 200px);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1100px;
}

.data-table thead {
  background: var(--bg-tertiary);
  position: sticky;
  top: 0;
  z-index: 5;
}

.data-table th {
  padding: 14px 16px;
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
  user-select: none;
}

.data-table td {
  padding: 14px 16px;
  font-size: 13px;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
}

.data-table tbody tr:nth-child(even) {
  background: rgba(255,255,255,0.02);
}

.data-table tbody tr:hover {
  background: rgba(59,130,246,0.06);
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

.table-id {
  font-family: 'Cascadia Code', 'Fira Code', monospace;
  font-size: 12px;
  color: var(--text-muted);
}

.filename-cell {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
  display: inline-block;
  vertical-align: middle;
}

.type-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
}

.type-badge.image {
  background: rgba(59,130,246,0.15);
  color: #60a5fa;
}

.type-badge.video {
  background: rgba(168,85,247,0.15);
  color: #c084fc;
}

.type-badge.other {
  background: rgba(148,163,184,0.15);
  color: #94a3b8;
}

.protect-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
}

.protect-badge.on {
  background: rgba(34,197,94,0.12);
  color: var(--accent-green);
}

.protect-badge.off {
  background: rgba(100,116,139,0.15);
  color: var(--text-muted);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}

.status-badge.active {
  background: rgba(34,197,94,0.12);
  color: var(--accent-green);
}

.status-badge.disabled {
  background: rgba(239,68,68,0.12);
  color: var(--accent-red);
}

.status-dot-inline {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.cell-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  min-width: 280px;
}

.btn-action {
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid;
  transition: all var(--transition);
  white-space: nowrap;
  background: transparent;
}

.btn-copy {
  border-color: var(--accent-blue);
  color: var(--accent-blue);
}
.btn-copy:hover {
  background: var(--accent-blue);
  color: white;
}

.btn-view {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}
.btn-view:hover {
  background: var(--accent-cyan);
  color: white;
}

.btn-edit {
  border-color: var(--accent-yellow);
  color: var(--accent-yellow);
}
.btn-edit:hover {
  background: var(--accent-yellow);
  color: var(--bg-primary);
}

.btn-toggle-on {
  border-color: var(--accent-green);
  color: var(--accent-green);
}
.btn-toggle-on:hover {
  background: var(--accent-green);
  color: white;
}

.btn-toggle-off {
  border-color: var(--accent-orange);
  color: var(--accent-orange);
}
.btn-toggle-off:hover {
  background: var(--accent-orange);
  color: white;
}

.btn-del {
  border-color: var(--accent-red);
  color: var(--accent-red);
}
.btn-del:hover {
  background: var(--accent-red);
  color: white;
}

.table-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.table-empty svg {
  width: 48px;
  height: 48px;
  margin-bottom: 16px;
  opacity: 0.4;
}

.table-empty p {
  font-size: 15px;
  margin-bottom: 16px;
}

.log-filters {
  display: flex;
  align-items: center;
  gap: 8px;
}

.log-filters select,
.log-filters input {
  padding: 8px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 13px;
  outline: none;
}

.log-filters select:focus,
.log-filters input:focus {
  border-color: var(--accent-blue);
}

.log-filters select option {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.blacklist-content {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.blacklist-add-section,
.blacklist-auto-section,
.blacklist-table-section {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
}

.blacklist-add-section h3,
.blacklist-table-section h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-color);
}

.blacklist-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

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

.blacklist-input {
  flex: 1;
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 13px;
  outline: none;
  transition: border-color var(--transition);
}

.blacklist-input:focus {
  border-color: var(--accent-blue);
}

.blacklist-input::placeholder {
  color: var(--text-muted);
}

.blacklist-select {
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 13px;
  outline: none;
  cursor: pointer;
  min-width: 160px;
}

.blacklist-select option {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.blacklist-ip {
  font-family: 'Cascadia Code', 'Fira Code', monospace;
  font-size: 12px;
  color: var(--accent-blue);
}

.blacklist-type {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
}

.blacklist-type.permanent {
  background: rgba(248,81,73,0.15);
  color: var(--accent-red);
}

.blacklist-type.temporary {
  background: rgba(251,188,4,0.15);
  color: var(--accent-yellow);
}

.blacklist-type.custom {
  background: rgba(139,92,246,0.15);
  color: #a78bfa;
}

.blacklist-source {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
}

.blacklist-source.auto {
  background: rgba(248,81,73,0.1);
  color: var(--accent-orange);
}

.blacklist-source.manual {
  background: rgba(88,166,255,0.1);
  color: var(--accent-blue);
}

.auto-rules-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.auto-rules-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.auto-rules-config {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px dashed var(--border-color);
}

.rule-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.rule-item label {
  font-size: 12px;
  color: var(--text-secondary);
  min-width: 120px;
  white-space: nowrap;
}

.rule-item input {
  flex: 1;
  padding: 8px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 13px;
  outline: none;
  max-width: 200px;
}

.rule-item input:focus {
  border-color: var(--accent-blue);
}

.log-filters input {
  width: 180px;
}

.log-filters input::placeholder {
  color: var(--text-muted);
}

.toggle-switch-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 4px;
}

.toggle-label {
  font-size: 12px;
  color: var(--text-secondary);
  white-space: nowrap;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 38px;
  height: 22px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 22px;
  transition: all var(--transition);
}

.toggle-slider::before {
  content: '';
  position: absolute;
  height: 16px;
  width: 16px;
  left: 2px;
  bottom: 2px;
  background: var(--text-secondary);
  border-radius: 50%;
  transition: all var(--transition);
}

.toggle-switch input:checked + .toggle-slider {
  background: var(--accent-blue);
  border-color: var(--accent-blue);
}

.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(16px);
  background: white;
}

.right-sidebar {
  position: fixed;
  top: var(--topbar-height);
  right: 0;
  bottom: 0;
  width: var(--right-sidebar-width);
  background: var(--bg-secondary);
  border-left: 1px solid var(--border-color);
  overflow-y: auto;
  z-index: var(--z-sidebar);
  padding: 20px 16px;
  transition: all var(--transition);
}

.right-sidebar:hover {
  box-shadow: -2px 0 10px rgba(0,0,0,0.2);
}

.rs-section {
  margin-bottom: 28px;
}

.rs-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-color);
}

.rs-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rs-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 16px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}

.rs-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--border-light);
}

.rs-btn.primary {
  background: linear-gradient(135deg, var(--accent-blue), #2563eb);
  border-color: transparent;
  color: white;
}

.rs-btn.primary:hover {
  box-shadow: 0 4px 14px rgba(59,130,246,0.35);
}

.rs-btn svg {
  width: 16px;
  height: 16px;
}

.rs-chart-wrap {
  background: var(--bg-primary);
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  justify-content: center;
}

.rs-traffic-rate {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rs-rate-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: var(--bg-primary);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}

.rs-rate-label {
  font-size: 12px;
  color: var(--text-muted);
}

.rs-rate-value {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-cyan);
  font-variant-numeric: tabular-nums;
}

.rs-stats {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.rs-stat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: var(--bg-primary);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.rs-stat-val {
  font-size: 22px;
  font-weight: 800;
  color: var(--accent-cyan);
  font-variant-numeric: tabular-nums;
}

.rs-stat-lbl {
  font-size: 12px;
  color: var(--text-muted);
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(4px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: var(--z-overlay);
  animation: modalIn 0.2s ease;
}

.modal-box {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  width: 90%;
  max-width: 560px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: modalSlideUp 0.25s ease;
}

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

.upload-modal-box {
  max-width: 600px;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

.modal-close {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 22px;
  cursor: pointer;
  border-radius: 50%;
  transition: all var(--transition);
}

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

.upload-options {
  padding: 16px 22px;
  border-bottom: 1px solid var(--border-color);
}

.checkbox-label.dark {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-secondary);
  user-select: none;
}

.checkbox-label.dark input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border: 2px solid var(--border-light);
  border-radius: 4px;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
  flex-shrink: 0;
  background: transparent;
}

.checkbox-label.dark input[type="checkbox"]:checked {
  background: var(--accent-blue);
  border-color: var(--accent-blue);
}

.checkbox-label.dark input[type="checkbox"]:checked::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 12px;
  font-weight: bold;
}

.domain-config-dark {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--border-color);
}

.domain-config-dark label {
  display: block;
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 8px;
  font-weight: 500;
}

.domain-config-dark textarea {
  width: 100%;
  padding: 10px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 13px;
  font-family: inherit;
  resize: vertical;
  transition: border-color var(--transition);
}

.domain-config-dark textarea:focus {
  outline: none;
  border-color: var(--accent-blue);
}

.domain-config-dark .hint-text {
  font-size: 11px !important;
  color: var(--text-muted) !important;
  margin-top: 6px !important;
}

.upload-drop-zone {
  margin: 20px 22px;
  border: 2px dashed var(--border-light);
  border-radius: var(--radius-lg);
  padding: 44px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  background: rgba(59,130,246,0.03);
}

.upload-drop-zone:hover,
.upload-drop-zone.dragover {
  border-color: var(--accent-blue);
  background: rgba(59,130,246,0.08);
}

.drop-zone-icon {
  font-size: 42px;
  margin-bottom: 12px;
}

.upload-drop-zone p {
  color: var(--text-secondary);
  margin-bottom: 6px;
  font-size: 14px;
}

.upload-drop-zone .hint {
  font-size: 12px !important;
  color: var(--text-muted) !important;
}

.upload-progress {
  padding: 0 22px 16px;
}

.progress-bar {
  width: 100%;
  height: 6px;
  background: var(--bg-primary);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 8px;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent-blue), var(--accent-cyan));
  border-radius: 3px;
  transition: width 0.3s ease;
}

.progress-text {
  font-size: 12px;
  color: var(--accent-cyan);
  font-weight: 600;
}

.upload-result {
  padding: 16px 22px 22px;
}

.result-success {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  font-size: 15px;
  font-weight: 600;
  color: var(--accent-green);
}

.result-icon {
  font-size: 20px;
}

.url-display {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.url-display input {
  flex: 1;
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 13px;
  font-family: 'Cascadia Code', monospace;
}

.copy-btn {
  padding: 10px 18px;
  background: var(--accent-blue);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

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

#result-file-info {
  font-size: 12px;
  color: var(--text-muted);
}

.confirm-modal-box {
  max-width: 480px;
}

.confirm-file-info {
  background: var(--bg-primary);
  padding: 16px 18px;
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  border: 1px solid var(--border-color);
}

.confirm-file-info p {
  margin: 6px 0;
  font-size: 13px;
  color: var(--text-secondary);
}

.confirm-file-info strong {
  color: var(--text-primary);
}

.confirm-options {
  margin-bottom: 18px;
}

.modal-box textarea {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 13px;
  font-family: inherit;
  resize: vertical;
  min-height: 90px;
  margin-bottom: 16px;
}

.modal-box textarea:focus {
  outline: none;
  border-color: var(--accent-blue);
}

.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding: 0 22px 22px;
}

.modal-actions button {
  padding: 9px 22px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid;
  transition: all var(--transition);
}

.btn-cancel {
  background: transparent;
  border-color: var(--border-color);
  color: var(--text-secondary);
}

.btn-cancel:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.btn-save {
  background: var(--accent-blue);
  border-color: var(--accent-blue);
  color: white;
}

.btn-save:hover {
  background: var(--accent-blue-hover);
}

.btn-save.danger {
  background: var(--accent-red);
  border-color: var(--accent-red);
}

.btn-save.danger:hover {
  background: #dc2626;
}

.confirm-dialog-box {
  max-width: 420px;
}

.confirm-body {
  padding: 20px 22px;
}

.confirm-body p {
  font-size: 14px;
  color: var(--text-primary);
  line-height: 1.6;
  margin-bottom: 0;
}

.confirm-hint {
  margin-top: 10px !important;
  font-size: 12px !important;
  color: var(--text-muted) !important;
}

.view-link-modal-box {
  max-width: 520px;
}

.view-link-body {
  padding: 20px 22px;
}

.view-link-filename {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 14px;
  word-break: break-all;
}

.view-link-actions {
  margin-top: 16px;
  display: flex;
  justify-content: center;
}

.view-link-actions .action-btn {
  padding: 10px 24px;
}

.preview-modal-box {
  max-width: 800px;
  width: 90vw;
}

.preview-body {
  padding: 20px 22px;
}

.preview-filename {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 14px;
  word-break: break-all;
}

.preview-container {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  min-height: 200px;
  max-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto;
  position: relative;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.preview-container:hover {
  border-color: var(--accent-blue);
  box-shadow: 0 4px 16px rgba(88, 166, 255, 0.2);
}

.preview-image {
  max-width: 100%;
  max-height: 400px;
  object-fit: contain;
  display: block;
  cursor: grab;
  transition: transform 0.2s ease;
}

.preview-image:active {
  cursor: grabbing;
}

.preview-image:hover {
  transform: scale(1.02);
}

.preview-image.fullsize {
  max-height: 70vh;
  cursor: zoom-out;
}

.video-preview-wrapper {
  position: relative;
  display: inline-block;
}

.preview-video {
  max-width: 100%;
  max-height: 400px;
  width: auto;
  height: auto;
  outline: none;
  border-radius: var(--radius-md);
  transition: all 0.3s ease;
}

.preview-video.fullsize {
  max-height: 70vh;
}

.video-fullscreen-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 10;
}

.video-fullscreen-btn:hover {
  background: rgba(0, 0, 0, 0.8);
  transform: scale(1.1);
}

.video-fullscreen-btn svg {
  width: 20px;
  height: 20px;
}

.preview-other {
  text-align: center;
  color: var(--text-muted);
  padding: 40px;
}

.preview-other svg {
  width: 64px;
  height: 64px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.preview-other p {
  font-size: 14px;
}

.preview-actions {
  margin-top: 16px;
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.preview-actions .action-btn {
  padding: 10px 24px;
}

.preview-zoom-hint {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(0,0,0,0.7);
  color: #fff;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  pointer-events: none;
  opacity: 0.8;
  transition: all 0.3s ease;
  animation: fadeIn 0.3s ease-in;
}

.preview-modal-box {
  animation: modalSlideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.toast-container {
  position: fixed;
  top: 72px;
  right: 20px;
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast.success { background: var(--accent-green); }
.toast.error { background: var(--accent-red); }
.toast.info { background: var(--accent-blue); }
.toast.warning { background: var(--accent-orange); }

@keyframes toastIn {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes toastOut {
  from { opacity: 1; transform: translateX(0); }
  to { opacity: 0; transform: translateX(40px); }
}

@media (max-width: 1200px) {
  .cards-grid {
    grid-template-columns: 1fr;
  }
  .card.wide {
    grid-column: span 1;
  }
  .files-overview {
    grid-template-columns: repeat(3, 1fr);
  }
  .dashboard-overview {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }
}

@media (max-width: 992px) {
  :root {
    --right-sidebar-width: 0px;
  }
  .right-sidebar {
    display: none;
  }
  .main-content {
    margin-right: 0;
  }
}

@media (max-width: 768px) {
  :root {
    --sidebar-width: 60px;
    --topbar-height: 50px;
  }
  .sidebar {
    padding: 12px 0;
  }
  .nav-item {
    justify-content: center;
    padding: 12px;
  }
  .nav-item span {
    display: none;
  }
  .nav-item svg {
    width: 22px;
    height: 22px;
  }
  .nav-item.active {
    border-left: none;
    border-top: 3px solid var(--accent-blue);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
  }
  .main-content {
    margin-left: var(--sidebar-width);
    padding: 16px;
  }
  .topbar {
    padding: 0 16px;
  }
  .topbar-center {
    display: none;
  }
  .topbar-title {
    font-size: 16px;
  }
  .panel-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .panel-header h2 {
    font-size: 16px;
  }
  .panel-actions {
    width: 100%;
    justify-content: space-between;
  }
  .search-box input {
    width: 150px;
  }
  .data-table {
    font-size: 12px;
  }
  .data-table th,
  .data-table td {
    padding: 10px 8px;
  }
  .cell-actions {
    flex-wrap: wrap;
    gap: 4px;
  }
  .btn-action {
    padding: 4px 8px;
    font-size: 10px;
  }
  .files-overview {
    grid-template-columns: repeat(2, 1fr);
  }
  .file-stat-box {
    padding: 12px 8px;
  }
  .file-stat-num {
    font-size: 24px;
  }
  .login-container {
    padding: 32px 30px;
    width: 320px;
  }
  .login-container h1 {
    font-size: 22px;
  }
  .upload-modal-box {
    max-width: 90vw;
  }
  .upload-drop-zone {
    padding: 32px 20px;
  }
  .modal-box {
    max-width: 90vw;
  }
  .preview-modal-box {
    max-width: 95vw;
    width: 95vw;
  }
  .preview-container {
    min-height: 150px;
    max-height: 60vh;
  }
  .preview-image {
    max-height: 300px;
  }
  .preview-image.fullsize {
    max-height: 60vh;
  }
  .preview-video {
    max-height: 300px;
  }
  .preview-video.fullsize {
    max-height: 60vh;
  }
  .preview-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .preview-actions .action-btn {
    justify-content: center;
  }
  .video-fullscreen-btn {
    width: 32px;
    height: 32px;
  }
  .video-fullscreen-btn svg {
    width: 18px;
    height: 18px;
  }
  .preview-zoom-hint {
    font-size: 11px;
    padding: 4px 8px;
  }
}

@media (max-width: 480px) {
  .main-content {
    padding: 12px;
  }
  .files-overview {
    grid-template-columns: 1fr;
  }
  .panel-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .search-box input {
    width: 100%;
  }
  .action-btn {
    justify-content: center;
  }
  .login-container {
    padding: 24px 20px;
    width: 90vw;
  }
  .login-container h1 {
    font-size: 20px;
  }
  .card-body {
    padding: 16px;
  }
  .card-header {
    padding: 14px 16px;
  }
}

.charts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 1200px) {
  .charts-grid {
    grid-template-columns: 1fr;
  }
}

.charts-summary {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

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

@media (max-width: 640px) {
  .charts-summary {
    grid-template-columns: repeat(2, 1fr);
  }
}

.summary-stat {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.summary-stat .summary-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.summary-stat .summary-value {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}

.chart-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
}

.chart-card.wide {
  grid-column: span 2;
}

@media (max-width: 1200px) {
  .chart-card.wide {
    grid-column: span 1;
  }
}

.chart-card .card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}

.chart-card .card-header svg {
  width: 20px;
  height: 20px;
  color: var(--accent-cyan);
}

.chart-card .card-header h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  flex: 1;
}

.chart-current {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-cyan);
  background: rgba(6, 182, 212, 0.1);
  padding: 2px 10px;
  border-radius: 12px;
}

.chart-legend {
  display: flex;
  gap: 16px;
  margin-left: auto;
}

.chart-legend .legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
}

.chart-legend .legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.chart-legend .legend-item.upload .legend-dot {
  background: rgb(34, 197, 94);
}

.chart-legend .legend-item.download .legend-dot {
  background: rgb(6, 182, 212);
}

.chart-card .card-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chart-container {
  position: relative;
  width: 100%;
  height: 200px;
  background: var(--bg-primary);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.chart-container.wide {
  height: 240px;
}

.chart-container canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.chart-tooltip {
  position: fixed;
  display: none;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 12px;
  color: var(--text-primary);
  pointer-events: none;
  z-index: 1000;
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  white-space: nowrap;
}

.chart-tooltip .tooltip-time {
  color: var(--text-muted);
  margin-bottom: 4px;
  font-size: 11px;
}

.chart-tooltip .tooltip-value {
  font-weight: 600;
}

.ip-location-map {
  background: var(--bg-primary);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

.ip-location-map canvas {
  display: block;
  max-width: 100%;
  height: auto;
}

.location-stats {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.location-stat-item {
  flex: 1;
  min-width: 140px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.location-stat-item .stat-label {
  font-size: 12px;
  color: var(--text-muted);
}

.location-stat-item .stat-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--accent-cyan);
}

.chart-card canvas {
  display: block;
  max-width: 100%;
  height: auto;
}



::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--border-light);
}

::selection {
  background: rgba(59,130,246,0.3);
  color: white;
}

.ai-analyze-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  background: linear-gradient(135deg, #8b5cf6, #6366f1);
  border: none;
  border-radius: var(--radius-md);
  color: white;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}

.ai-analyze-btn:hover {
  box-shadow: 0 4px 14px rgba(99,102,241,0.4);
  transform: translateY(-1px);
}

.ai-analyze-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.ai-analyze-btn svg {
  width: 16px;
  height: 16px;
}

/* ========================================
   AI Chat Panel - Modern ChatGPT Style
   ======================================== */

.panel.ai-analyze-panel {
  display: flex;
  height: calc(100vh - var(--topbar-height) - 48px);
  background: linear-gradient(135deg, #0f0f1a 0%, #1a1a2e 50%, #16213e 100%);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  position: relative;
}

.panel.ai-analyze-panel.hidden {
  display: none !important;
}

/* 左侧边栏 */
.ai-sidebar {
  width: 280px;
  min-width: 280px;
  background: rgba(15, 15, 26, 0.95);
  backdrop-filter: blur(20px);
  border-right: 1px solid rgba(139, 92, 246, 0.1);
  display: flex;
  flex-direction: column;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  z-index: 10;
}

.ai-sidebar.collapsed {
  width: 0;
  min-width: 0;
  overflow: hidden;
  border-right: none;
}

.ai-sidebar-header {
  padding: 20px;
  border-bottom: 1px solid rgba(139, 92, 246, 0.1);
}

.ai-new-chat-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 16px;
  background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
  border: none;
  border-radius: var(--radius-lg);
  color: white;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.ai-new-chat-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.5s, height 0.5s;
}

.ai-new-chat-btn:hover::before {
  width: 300px;
  height: 300px;
}

.ai-new-chat-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(139, 92, 246, 0.4);
}

.ai-new-chat-btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* 搜索框 */
.ai-search-box {
  padding: 16px 20px;
  position: relative;
}

.ai-search-box .search-icon {
  position: absolute;
  left: 32px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  pointer-events: none;
}

.ai-search-box input {
  width: 100%;
  padding: 10px 12px 10px 38px;
  background: rgba(139, 92, 246, 0.08);
  border: 1px solid rgba(139, 92, 246, 0.15);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 13px;
  transition: all 0.3s ease;
}

.ai-search-box input:focus {
  outline: none;
  border-color: #8b5cf6;
  background: rgba(139, 92, 246, 0.12);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.ai-search-box input::placeholder {
  color: var(--text-muted);
}

/* 对话列表 */
.ai-chats-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px 12px;
}

.ai-chats-list::-webkit-scrollbar {
  width: 6px;
}

.ai-chats-list::-webkit-scrollbar-track {
  background: transparent;
}

.ai-chats-list::-webkit-scrollbar-thumb {
  background: rgba(139, 92, 246, 0.2);
  border-radius: 3px;
}

.chat-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  margin-bottom: 4px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
  group: true;
}

.chat-item:hover {
  background: rgba(139, 92, 246, 0.08);
}

.chat-item.active {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(99, 102, 241, 0.1));
  border-left: 3px solid #8b5cf6;
}

.chat-item-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(99, 102, 241, 0.2));
  border-radius: var(--radius-md);
  flex-shrink: 0;
}

.chat-item-icon svg {
  width: 18px;
  height: 18px;
  color: #8b5cf6;
}

.chat-item-info {
  flex: 1;
  min-width: 0;
}

.chat-item-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-item-time {
  font-size: 11px;
  color: var(--text-muted);
}

.chat-item-delete {
  opacity: 0;
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(239, 68, 68, 0.1);
  border: none;
  border-radius: var(--radius-sm);
  color: #ef4444;
  cursor: pointer;
  transition: all 0.2s ease;
}

.chat-item:hover .chat-item-delete {
  opacity: 1;
}

.chat-item-delete:hover {
  background: rgba(239, 68, 68, 0.2);
  transform: translateY(-50%) scale(1.1);
}

.chat-item-delete svg {
  width: 14px;
  height: 14px;
}

/* 侧边栏底部 */
.ai-sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid rgba(139, 92, 246, 0.1);
}

.ai-clear-all-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 14px;
  background: transparent;
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: var(--radius-md);
  color: #ef4444;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.ai-clear-all-btn:hover {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.4);
}

.ai-clear-all-btn svg {
  width: 16px;
  height: 16px;
}

/* 右侧主区域 */
.ai-main-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: transparent;
  position: relative;
  overflow: hidden;
}

/* 主头部 */
.ai-main-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 24px;
  background: rgba(15, 15, 26, 0.6);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(139, 92, 246, 0.1);
}

.ai-toggle-sidebar {
  display: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.3s ease;
}

.ai-toggle-sidebar svg {
  width: 20px;
  height: 20px;
}

.ai-toggle-sidebar:hover {
  background: rgba(139, 92, 246, 0.2);
  transform: scale(1.05);
}

.ai-header-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ai-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ai-avatar-bot {
  background: linear-gradient(135deg, #8b5cf6, #06b6d4);
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.ai-avatar-bot svg {
  width: 22px;
  height: 22px;
  color: white;
}

.ai-avatar-user {
  background: linear-gradient(135deg, #10b981, #059669);
}

.ai-header-title h2 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
  line-height: 1.3;
}

.ai-status {
  font-size: 12px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.ai-status.online {
  color: #10b981;
}

.ai-status.online::before {
  content: '';
  width: 8px;
  height: 8px;
  background: #10b981;
  border-radius: 50%;
  animation: pulse-dot 2s infinite;
}

/* 消息容器 */
.ai-messages-container {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  scroll-behavior: smooth;
}

.ai-messages-container::-webkit-scrollbar {
  width: 8px;
}

.ai-messages-container::-webkit-scrollbar-track {
  background: transparent;
}

.ai-messages-container::-webkit-scrollbar-thumb {
  background: rgba(139, 92, 246, 0.2);
  border-radius: 4px;
}

.ai-messages-container::-webkit-scrollbar-thumb:hover {
  background: rgba(139, 92, 246, 0.3);
}

/* 欢迎页面 */
.ai-welcome-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  text-align: center;
  padding: 40px;
  animation: fadeInUp 0.6s ease;
}

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

.ai-welcome-icon {
  position: relative;
  width: 120px;
  height: 120px;
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ai-glow-circle {
  position: absolute;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.3) 0%, transparent 70%);
  border-radius: 50%;
  animation: glow-pulse 3s ease-in-out infinite;
}

@keyframes glow-pulse {
  0%, 100% { transform: scale(1); opacity: 0.6; }
  50% { transform: scale(1.1); opacity: 1; }
}

.ai-welcome-icon > svg {
  position: relative;
  z-index: 1;
  width: 70px;
  height: 70px;
  color: #8b5cf6;
  filter: drop-shadow(0 0 20px rgba(139, 92, 246, 0.5));
}

.ai-welcome-screen h3 {
  font-size: 28px;
  font-weight: 700;
  background: linear-gradient(135deg, #fff 0%, #a78bfa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0 0 12px 0;
}

.ai-welcome-screen p {
  font-size: 15px;
  color: var(--text-secondary);
  max-width: 450px;
  line-height: 1.6;
  margin: 0 0 40px 0;
}

/* 建议卡片 */
.ai-suggestion-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  max-width: 600px;
  width: 100%;
}

.suggestion-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  background: rgba(139, 92, 246, 0.06);
  border: 1px solid rgba(139, 92, 246, 0.15);
  border-radius: var(--radius-lg);
  color: var(--text-primary);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: left;
}

.suggestion-card:hover {
  background: rgba(139, 92, 246, 0.12);
  border-color: rgba(139, 92, 246, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(139, 92, 246, 0.15);
}

.suggestion-card svg {
  width: 20px;
  height: 20px;
  color: #8b5cf6;
  flex-shrink: 0;
}

/* 消息气泡 */
.ai-message {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  animation: messageSlideIn 0.35s ease;
}

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

.ai-message.user {
  flex-direction: row-reverse;
}

.ai-message .message-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 4px;
}

.ai-message.assistant .message-avatar {
  background: linear-gradient(135deg, #8b5cf6, #06b6d4);
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.25);
}

.ai-message.assistant .message-avatar svg {
  width: 20px;
  height: 20px;
  color: white;
}

.ai-message.user .message-avatar {
  background: linear-gradient(135deg, #10b981, #059669);
  font-size: 16px;
  font-weight: 600;
  color: white;
}

.message-content-wrapper {
  max-width: 75%;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ai-message.user .message-content-wrapper {
  align-items: flex-end;
}

.message-bubble {
  padding: 14px 18px;
  border-radius: 18px;
  font-size: 14px;
  line-height: 1.7;
  word-wrap: break-word;
  position: relative;
}

.ai-message.assistant .message-bubble {
  background: rgba(30, 30, 50, 0.8);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(139, 92, 246, 0.15);
  border-bottom-left-radius: 4px;
  color: var(--text-primary);
}

.ai-message.user .message-bubble {
  background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
  border-bottom-right-radius: 4px;
  color: white;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.message-bubble pre {
  background: rgba(0, 0, 0, 0.3);
  padding: 12px;
  border-radius: var(--radius-md);
  overflow-x: auto;
  margin: 8px 0;
  font-size: 13px;
  border: 1px solid rgba(139, 92, 246, 0.2);
}

.message-bubble code {
  font-family: 'Fira Code', 'Consolas', monospace;
  font-size: 13px;
}

.message-bubble p {
  margin: 8px 0;
}

.message-bubble ul, .message-bubble ol {
  margin: 8px 0;
  padding-left: 20px;
}

.message-bubble li {
  margin: 4px 0;
}

.message-time {
  font-size: 11px;
  color: var(--text-muted);
  padding: 0 4px;
}

/* 输入区域 */
.ai-input-container {
  padding: 20px 24px 24px;
  background: linear-gradient(to top, rgba(15, 15, 26, 0.95) 0%, transparent 100%);
  backdrop-filter: blur(10px);
}

.ai-input-wrapper {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(30, 30, 50, 0.7);
  backdrop-filter: blur(15px);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: var(--radius-xl);
  transition: all 0.3s ease;
}

.ai-input-wrapper:focus-within {
  border-color: #8b5cf6;
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1), 0 8px 30px rgba(139, 92, 246, 0.15);
}

.ai-input-wrapper textarea {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1.5;
  resize: none;
  max-height: 150px;
  padding: 4px 0;
  font-family: inherit;
}

.ai-input-wrapper textarea::placeholder {
  color: var(--text-muted);
}

.ai-send-button {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #8b5cf6, #6366f1);
  border: none;
  border-radius: var(--radius-lg);
  color: white;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}

.ai-send-button:not(:disabled):hover {
  transform: scale(1.08) rotate(-3deg);
  box-shadow: 0 6px 20px rgba(139, 92, 246, 0.45);
}

.ai-send-button:not(:disabled):active {
  transform: scale(0.95);
}

.ai-send-button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  background: rgba(139, 92, 246, 0.3);
}

.ai-send-button svg {
  width: 20px;
  height: 20px;
  transition: transform 0.3s ease;
}

.ai-send-button:not(:disabled):hover svg {
  transform: translateX(2px) translateY(-2px);
}

/* 发送动画 */
.ai-send-button.sending {
  animation: sendPulse 1s ease infinite;
}

@keyframes sendPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

.ai-disclaimer {
  text-align: center;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 10px;
  opacity: 0.7;
}

/* 打字指示器 */
.typing-indicator {
  display: flex;
  gap: 5px;
  padding: 16px 20px;
  background: rgba(30, 30, 50, 0.8);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(139, 92, 246, 0.15);
  border-radius: 18px;
  border-bottom-left-radius: 4px;
  width: fit-content;
}

.typing-dot {
  width: 8px;
  height: 8px;
  background: #8b5cf6;
  border-radius: 50%;
  animation: typingBounce 1.4s infinite ease-in-out;
}

.typing-dot:nth-child(1) { animation-delay: -0.32s; }
.typing-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes typingBounce {
  0%, 80%, 100% {
    transform: scale(0.8);
    opacity: 0.5;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}

/* 响应式设计 */
@media (max-width: 1024px) {
  .ai-sidebar {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 100;
    box-shadow: 10px 0 40px rgba(0, 0, 0, 0.5);
  }

  .ai-sidebar.collapsed {
    transform: translateX(-100%);
  }

  .ai-toggle-sidebar {
    display: flex;
  }

  .ai-suggestion-cards {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .panel.ai-analyze-panel {
    height: calc(100vh - var(--topbar-height) - 32px);
    border-radius: var(--radius-lg);
  }

  .ai-messages-container {
    padding: 16px;
  }

  .ai-input-container {
    padding: 16px;
  }

  .message-content-wrapper {
    max-width: 85%;
  }

  .ai-welcome-icon {
    width: 90px;
    height: 90px;
  }

  .ai-welcome-icon > svg {
    width: 52px;
    height: 52px;
  }

  .ai-welcome-screen h3 {
    font-size: 22px;
  }

  .ai-suggestion-cards {
    grid-template-columns: 1fr;
  }
}

.storage-card .card-body {
  padding: 20px;
}

.storage-stats {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.storage-visual {
  display: flex;
  align-items: center;
  gap: 12px;
}

.storage-bar {
  flex: 1;
  height: 12px;
  background: var(--bg-primary);
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.storage-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6, #8b5cf6);
  border-radius: 6px;
  transition: width 0.5s ease;
  width: 0%;
}

.storage-percent {
  font-size: 18px;
  font-weight: 700;
  color: var(--accent-cyan);
  min-width: 50px;
  text-align: right;
}

.storage-details {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.storage-detail {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px;
  background: var(--bg-primary);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.storage-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

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

.dashboard-overview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.overview-metric {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.overview-metric::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-blue), var(--accent-cyan));
  transform: scaleX(0);
  transition: transform var(--transition);
}

.overview-metric:hover {
  border-color: var(--accent-blue);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.overview-metric:hover::before {
  transform: scaleX(1);
}

.overview-metric.metric-primary {
  background: linear-gradient(135deg, rgba(63,185,80,0.15), rgba(34,197,94,0.05));
  border-color: rgba(63,185,80,0.3);
}

.overview-metric.metric-primary::before {
  background: linear-gradient(90deg, var(--accent-green), #22c55e);
}

.metric-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
}

.metric-icon svg {
  width: 24px;
  height: 24px;
}

.metric-icon.status-running {
  background: rgba(63,185,80,0.15);
  border-color: rgba(63,185,80,0.3);
}

.metric-icon.status-running svg {
  color: var(--accent-green);
}

.metric-icon.cpu-icon {
  background: rgba(239,68,68,0.12);
  border-color: rgba(239,68,68,0.25);
}

.metric-icon.cpu-icon svg {
  color: #ef4444;
}

.metric-icon.memory-icon {
  background: rgba(59,130,246,0.12);
  border-color: rgba(59,130,246,0.25);
}

.metric-icon.memory-icon svg {
  color: #3b82f6;
}

.metric-icon.disk-icon {
  background: rgba(139,92,246,0.12);
  border-color: rgba(139,92,246,0.25);
}

.metric-icon.disk-icon svg {
  color: #8b5cf6;
}

.metric-icon.network-icon {
  background: rgba(6,182,212,0.12);
  border-color: rgba(6,182,212,0.25);
}

.metric-icon.network-icon svg {
  color: #06b6d4;
}

.metric-content {
  flex: 1;
  min-width: 0;
}

.metric-label {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
  margin-bottom: 4px;
}

.metric-value {
  display: block;
  font-size: 20px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.2;
  margin-bottom: 8px;
  font-variant-numeric: tabular-nums;
}

.metric-value.status-good {
  color: var(--accent-green);
}

.metric-sub {
  display: block;
  font-size: 11px;
  color: var(--text-secondary);
}

.metric-bar {
  width: 100%;
  height: 6px;
  background: var(--bg-primary);
  border-radius: 3px;
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.metric-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.5s ease;
  width: 0%;
}

.metric-bar-fill.cpu-bar {
  background: linear-gradient(90deg, #ef4444, #f87171);
}

.metric-bar-fill.memory-bar {
  background: linear-gradient(90deg, #3b82f6, #60a5fa);
}

.metric-bar-fill.disk-bar {
  background: linear-gradient(90deg, #8b5cf6, #a78bfa);
}

.info-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.info-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: var(--bg-primary);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  transition: all var(--transition);
}

.info-item:hover {
  border-color: var(--accent-blue);
  background: rgba(59,130,246,0.04);
}

.info-icon {
  font-size: 20px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.info-detail {
  flex: 1;
  min-width: 0;
}

.info-item .info-label {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}

.info-item .info-value {
  font-size: 13px;
  color: var(--text-primary);
  font-weight: 500;
  word-break: break-all;
}

.traffic-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.traffic-item {
  padding: 16px;
  background: var(--bg-primary);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  text-align: center;
}

.traffic-item.highlight {
  background: linear-gradient(135deg, rgba(6,182,212,0.12), rgba(34,197,94,0.08));
  border-color: rgba(6,182,212,0.3);
}

.traffic-label {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
  font-weight: 600;
}

.traffic-big-value {
  display: block;
  font-size: 28px;
  font-weight: 800;
  color: var(--accent-cyan);
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

.files-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
}

.file-stat-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: var(--bg-primary);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  transition: all var(--transition);
}

.file-stat-card:hover {
  border-color: var(--accent-blue);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.file-stat-card.primary {
  background: linear-gradient(135deg, rgba(88,166,255,0.12), rgba(59,130,246,0.06));
  border-color: rgba(88,166,255,0.3);
}

.file-stat-card.image-type {
  background: linear-gradient(135deg, rgba(59,130,246,0.12), rgba(96,165,250,0.06));
  border-color: rgba(59,130,246,0.3);
}

.file-stat-card.video-type {
  background: linear-gradient(135deg, rgba(168,85,247,0.12), rgba(192,132,252,0.06));
  border-color: rgba(168,85,247,0.3);
}

.file-stat-icon {
  font-size: 28px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.file-stat-info {
  flex: 1;
  min-width: 0;
}

.file-stat-number {
  display: block;
  font-size: 24px;
  font-weight: 800;
  color: var(--accent-blue);
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

.file-stat-text {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.traffic-breakdown {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.breakdown-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  background: var(--bg-primary);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.breakdown-icon {
  font-size: 24px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.breakdown-info {
  flex: 1;
  min-width: 0;
}

.breakdown-label {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.breakdown-value {
  display: block;
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

.breakdown-value.total-highlight {
  color: var(--accent-cyan);
  font-size: 24px;
  font-weight: 800;
}

.breakdown-bar {
  width: 120px;
  height: 8px;
  background: var(--bg-secondary);
  border-radius: 4px;
  overflow: hidden;
  flex-shrink: 0;
}

.breakdown-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.5s ease;
  width: 45%;
}

.breakdown-bar-fill.upload-fill {
  background: linear-gradient(90deg, #22c55e, #4ade80);
}

.breakdown-bar-fill.download-fill {
  background: linear-gradient(90deg, #3b82f6, #60a5fa);
}

.ip-stats-header {
  text-align: center;
  margin-bottom: 20px;
  padding-bottom: 18px;
  border-bottom: 2px solid var(--border-color);
}

.ip-big-number {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.ip-number {
  font-size: 56px;
  font-weight: 900;
  color: var(--accent-cyan);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -2px;
}

.ip-unit {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}

.log-search-box {
  position: relative;
  display: flex;
  align-items: center;
}

.log-search-box svg {
  position: absolute;
  left: 12px;
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  pointer-events: none;
}

.log-search-box input {
  padding: 8px 12px 8px 36px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 13px;
  width: 180px;
  outline: none;
  transition: all var(--transition);
}

.log-search-box input:focus {
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(88,166,255,0.15);
}

.logs-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  gap: 16px;
  flex-wrap: wrap;
}

.logs-stats {
  display: flex;
  align-items: center;
  gap: 16px;
}

.logs-count {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 600;
}

.logs-filter-info {
  font-size: 12px;
  color: var(--text-muted);
  padding: 3px 10px;
  background: var(--bg-primary);
  border-radius: 10px;
  border: 1px solid var(--border-color);
}

.logs-level-filters {
  display: flex;
  align-items: center;
  gap: 8px;
}

.level-btn {
  padding: 6px 14px;
  border: 1px solid var(--border-color);
  border-radius: 14px;
  background: var(--bg-primary);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}

.level-btn:hover {
  border-color: var(--accent-blue);
  color: var(--text-primary);
  background: rgba(88,166,255,0.08);
}

.level-btn.active {
  background: var(--accent-blue);
  border-color: var(--accent-blue);
  color: white;
}

.level-btn.access-btn.active {
  background: #3b82f6;
  border-color: #3b82f6;
}

.level-btn.error-btn.active {
  background: #ef4444;
  border-color: #ef4444;
}

.level-btn.system-btn.active {
  background: #22c55e;
  border-color: #22c55e;
}

.console-area {
  background: #0a0e17;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.console-output {
  height: calc(100vh - 380px);
  min-height: 400px;
  max-height: 600px;
  overflow-y: auto;
  padding: 16px 20px;
  font-family: 'Cascadia Code', 'Fira Code', 'Consolas', monospace;
  font-size: 12.5px;
  line-height: 1.8;
  scroll-behavior: smooth;
}

.log-entry {
  padding: 8px 12px;
  margin-bottom: 6px;
  display: grid;
  grid-template-columns: auto auto 1fr;
  gap: 16px;
  align-items: start;
  border-radius: var(--radius-sm);
  border-left: 3px solid transparent;
  transition: all var(--transition);
  animation: logSlideIn 0.2s ease;
}

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

.log-entry:hover {
  background: rgba(59,130,246,0.06);
  border-left-color: var(--accent-blue);
}

.log-entry.access {
  border-left-color: #3b82f6;
}

.log-entry.error {
  border-left-color: #ef4444;
  background: rgba(239,68,68,0.04);
}

.log-entry.system {
  border-left-color: #22c55e;
}

.log-time {
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  font-size: 11.5px;
  user-select: text;
}

.log-type {
  font-weight: 700;
  font-size: 11px;
  white-space: nowrap;
  letter-spacing: 0.5px;
  padding: 2px 8px;
  border-radius: 4px;
  text-align: center;
  min-width: 52px;
}

.log-type.access {
  color: #60a5fa;
  background: rgba(59,130,246,0.15);
}

.log-type.error {
  color: #fca5a5;
  background: rgba(239,68,68,0.15);
}

.log-type.system {
  color: #4ade80;
  background: rgba(34,197,94,0.15);
}

.log-type.warn {
  color: #fbbf24;
  background: rgba(251,191,36,0.15);
}

.log-msg {
  color: #d1d5db;
  word-break: break-word;
  line-height: 1.6;
  user-select: text;
}

.logs-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-top: 16px;
  gap: 16px;
  flex-wrap: wrap;
}

.page-btn {
  padding: 8px 18px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}

.page-btn:hover:not(:disabled) {
  background: var(--accent-blue);
  border-color: var(--accent-blue);
  color: white;
  transform: translateY(-1px);
}

.page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.page-info {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
}

.page-info span {
  color: var(--accent-cyan);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.page-size-select {
  padding: 7px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 12px;
  cursor: pointer;
  outline: none;
  transition: all var(--transition);
}

.page-size-select:focus {
  border-color: var(--accent-blue);
}

/* ========================================
   iOS 26 Liquid Glass Theme (液态玻璃)
   ======================================== */

body.liquid-glass {
  --lg-bg: linear-gradient(135deg, #e8f0fe 0%, #f0e6ff 25%, #fce8f0 50%, #e6f7ff 75%, #f0f8e8 100%);
  --lg-bg-solid: #f5f2f0;
  --lg-surface: rgba(255, 255, 255, 0.55);
  --lg-surface-hover: rgba(255, 255, 255, 0.72);
  --lg-surface-active: rgba(255, 255, 255, 0.85);
  --lg-border: rgba(255, 255, 255, 0.6);
  --lg-border-subtle: rgba(255, 255, 255, 0.35);
  --lg-shadow: 0 8px 32px rgba(31, 38, 135, 0.12), 0 2px 8px rgba(0, 0, 0, 0.04);
  --lg-shadow-lg: 0 16px 48px rgba(31, 38, 135, 0.18), 0 4px 16px rgba(0, 0, 0, 0.06);
  --lg-shadow-inset: inset 0 1px 0 rgba(255, 255, 255, 0.7), inset 0 -1px 0 rgba(0, 0, 0, 0.05);
  --lg-text-primary: #1a1a2e;
  --lg-text-secondary: #4a4a68;
  --lg-text-muted: #8888a0;
  --lg-accent: #007aff;
  --lg-accent-hover: #0056d6;
  --lg-accent-glow: rgba(0, 122, 255, 0.25);
  --lg-accent-grad: linear-gradient(135deg, #007aff 0%, #5856d6 100%);
  --lg-green: #34c759;
  --lg-red: #ff3b30;
  --lg-orange: #ff9500;
  --lg-yellow: #ffcc00;
  --lg-purple: #af52de;
  --lg-cyan: #32ade6;
  --lg-pink: #ff2d55;
  background: var(--lg-bg);
  background-attachment: fixed;
  color: var(--lg-text-primary);
}

body.liquid-glass::before {
  content: '';
  position: fixed;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background:
    radial-gradient(ellipse at 20% 30%, rgba(120, 80, 255, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(0, 150, 255, 0.06) 0%, transparent 45%),
    radial-gradient(ellipse at 60% 80%, rgba(255, 80, 140, 0.05) 0%, transparent 45%),
    radial-gradient(ellipse at 30% 70%, rgba(80, 200, 180, 0.06) 0%, transparent 40%);
  animation: lgBgFloat 20s ease-in-out infinite alternate;
  pointer-events: none;
  z-index: 0;
}

@keyframes lgBgFloat {
  0% { transform: translate(0, 0) rotate(0deg); }
  33% { transform: translate(2%, -1%) rotate(1deg); }
  66% { transform: translate(-1%, 2%) rotate(-0.5deg); }
  100% { transform: translate(1%, 1%) rotate(0.5deg); }
}

body.liquid-glass * {
  transition: background 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              border-color 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              box-shadow 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              color 0.3s ease,
              transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Login Page */
body.liquid-glass .login-container {
  background: var(--lg-surface);
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  border: 1px solid var(--lg-border);
  border-radius: 24px;
  box-shadow: var(--lg-shadow-lg), var(--lg-shadow-inset);
  padding: 48px 40px;
}

body.liquid-glass .login-container h1 {
  color: var(--lg-text-primary);
  background: linear-gradient(135deg, var(--lg-accent), var(--lg-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

body.liquid-glass .subtitle {
  color: var(--lg-text-secondary);
}

body.liquid-glass .login-container input[type="password"],
body.liquid-glass .login-container input[type="text"] {
  background: rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(20px);
  border: 1px solid var(--lg-border-subtle);
  border-radius: 14px;
  color: var(--lg-text-primary);
  box-shadow: var(--lg-shadow-inset);
}

body.liquid-glass .login-container input[type="password"]:focus,
body.liquid-glass .login-container input[type="text"]:focus {
  background: rgba(255, 255, 255, 0.65);
  border-color: var(--lg-accent);
  box-shadow: 0 0 0 4px var(--lg-accent-glow), var(--lg-shadow-inset), 0 8px 24px rgba(0, 122, 255, 0.15);
  transform: scale(1.02);
}

body.liquid-glass .login-container input::placeholder {
  color: var(--lg-text-muted);
}

body.liquid-glass #send-code-btn {
  background: var(--lg-surface);
  backdrop-filter: blur(20px);
  border: 1px solid var(--lg-border-subtle);
  border-radius: 14px;
  color: var(--lg-accent);
  font-weight: 600;
  box-shadow: var(--lg-shadow-inset);
}

body.liquid-glass #send-code-btn:hover {
  background: rgba(0, 122, 255, 0.08);
  border-color: var(--lg-accent);
  box-shadow: 0 4px 16px var(--lg-accent-glow), var(--lg-shadow-inset);
  transform: scale(1.03) translateY(-1px);
}

body.liquid-glass .login-container button[type="submit"] {
  background: var(--lg-accent-grad);
  border: none;
  border-radius: 14px;
  color: white;
  font-weight: 600;
  letter-spacing: 0.3px;
  box-shadow: 0 4px 20px var(--lg-accent-glow), var(--lg-shadow-inset);
}

body.liquid-glass .login-container button[type="submit"]:hover {
  transform: scale(1.03) translateY(-2px);
  box-shadow: 0 8px 30px var(--lg-accent-glow), 0 2px 8px rgba(0, 122, 255, 0.3), var(--lg-shadow-inset);
}

body.liquid-glass .error {
  color: var(--lg-red);
}

/* Topbar */
body.liquid-glass .topbar {
  background: var(--lg-surface);
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  border-bottom: 1px solid var(--lg-border-subtle);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.6), 0 4px 20px rgba(0, 0, 0, 0.04);
}

body.liquid-glass .topbar-title {
  color: var(--lg-text-primary);
}

body.liquid-glass .topbar-version {
  color: var(--lg-accent);
  background: rgba(0, 122, 255, 0.1);
  border: 1px solid rgba(0, 122, 255, 0.15);
}

body.liquid-glass .status-indicator {
  background: rgba(52, 199, 89, 0.1);
  border: 1px solid rgba(52, 199, 89, 0.2);
  border-radius: 20px;
  backdrop-filter: blur(10px);
}

body.liquid-glass .status-dot.running { background: var(--lg-green); }
body.liquid-glass .status-dot.stopped { background: var(--lg-red); }
body.liquid-glass .status-dot.warning { background: var(--lg-yellow); }

body.liquid-glass .status-text {
  color: var(--lg-green);
}

body.liquid-glass .stat-item {
  background: var(--lg-surface);
  backdrop-filter: blur(20px);
  border: 1px solid var(--lg-border-subtle);
  border-radius: 16px;
  box-shadow: var(--lg-shadow-inset);
}

body.liquid-glass .stat-item:hover {
  background: var(--lg-surface-hover);
  box-shadow: var(--lg-shadow), var(--lg-shadow-inset);
  transform: scale(1.04) translateY(-1px);
}

body.liquid-glass .stat-label {
  color: var(--lg-text-muted);
}

body.liquid-glass .stat-value {
  color: var(--lg-accent);
}

body.liquid-glass .topbar-btn {
  background: var(--lg-surface);
  backdrop-filter: blur(20px);
  border: 1px solid var(--lg-border-subtle);
  border-radius: 12px;
  color: var(--lg-text-secondary);
  box-shadow: var(--lg-shadow-inset);
}

body.liquid-glass .topbar-btn:hover {
  background: var(--lg-surface-hover);
  color: var(--lg-accent);
  border-color: rgba(0, 122, 255, 0.3);
  box-shadow: 0 4px 16px var(--lg-accent-glow), var(--lg-shadow-inset);
  transform: scale(1.08) translateY(-2px);
}

body.liquid-glass .update-badge {
  background: var(--lg-accent-grad);
  box-shadow: 0 2px 10px var(--lg-accent-glow);
}

body.liquid-glass .update-badge:hover {
  box-shadow: 0 4px 16px var(--lg-accent-glow);
}

/* Sidebar */
body.liquid-glass .sidebar {
  background: var(--lg-surface);
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  border-right: 1px solid var(--lg-border-subtle);
  box-shadow: 2px 0 20px rgba(0, 0, 0, 0.03);
}

body.liquid-glass .nav-item {
  border-radius: 14px;
  color: var(--lg-text-secondary);
  margin: 2px 8px;
  padding: 13px 16px;
}

body.liquid-glass .nav-item:hover {
  background: var(--lg-surface-hover);
  backdrop-filter: blur(20px);
  color: var(--lg-text-primary);
  transform: scale(1.02) translateX(4px);
  box-shadow: var(--lg-shadow);
}

body.liquid-glass .nav-item.active {
  background: rgba(0, 122, 255, 0.12);
  color: var(--lg-accent);
  box-shadow: 0 2px 12px var(--lg-accent-glow), inset 0 0 0 1px rgba(0, 122, 255, 0.2);
}

body.liquid-glass .nav-item.active svg {
  color: var(--lg-accent);
  filter: drop-shadow(0 2px 4px var(--lg-accent-glow));
}

body.liquid-glass .nav-item::before {
  display: none;
}

body.liquid-glass .nav-item:hover svg {
  color: var(--lg-accent);
  transform: scale(1.15);
}

/* Main Content */
body.liquid-glass .main-content {
  background: transparent;
}

body.liquid-glass .panel-header h2 {
  color: var(--lg-text-primary);
}

body.liquid-glass .panel-header h2 svg {
  color: var(--lg-accent);
  filter: drop-shadow(0 2px 4px var(--lg-accent-glow));
}

body.liquid-glass .refresh-btn {
  background: var(--lg-surface);
  backdrop-filter: blur(20px);
  border: 1px solid var(--lg-border-subtle);
  border-radius: 12px;
  color: var(--lg-text-secondary);
  box-shadow: var(--lg-shadow-inset);
}

body.liquid-glass .refresh-btn:hover {
  background: var(--lg-surface-hover);
  color: var(--lg-text-primary);
  border-color: var(--lg-border);
  transform: scale(1.04) translateY(-1px);
  box-shadow: var(--lg-shadow), var(--lg-shadow-inset);
}

/* Cards */
body.liquid-glass .card {
  background: var(--lg-surface);
  backdrop-filter: blur(30px) saturate(160%);
  -webkit-backdrop-filter: blur(30px) saturate(160%);
  border: 1px solid var(--lg-border);
  border-radius: 20px;
  box-shadow: var(--lg-shadow), var(--lg-shadow-inset);
  overflow: hidden;
}

body.liquid-glass .card::before {
  display: none;
}

body.liquid-glass .card:hover {
  border-color: rgba(0, 122, 255, 0.3);
  box-shadow: var(--lg-shadow-lg), var(--lg-shadow-inset);
  transform: translateY(-6px) scale(1.01);
}

body.liquid-glass .card-header {
  background: rgba(0, 122, 255, 0.03);
  border-bottom: 1px solid var(--lg-border-subtle);
  position: relative;
  overflow: hidden;
}

body.liquid-glass .card-header::after {
  display: none;
}

body.liquid-glass .card-header svg {
  color: var(--lg-accent);
}

body.liquid-glass .card-header h3 {
  color: var(--lg-text-primary);
}

body.liquid-glass .card-body {
  background: transparent;
}

/* Overview Metrics */
body.liquid-glass .overview-metric {
  background: var(--lg-surface);
  backdrop-filter: blur(30px) saturate(160%);
  border: 1px solid var(--lg-border);
  border-radius: 20px;
  box-shadow: var(--lg-shadow), var(--lg-shadow-inset);
  padding: 20px;
}

body.liquid-glass .overview-metric::before {
  display: none;
}

body.liquid-glass .overview-metric:hover {
  border-color: rgba(0, 122, 255, 0.25);
  box-shadow: var(--lg-shadow-lg), var(--lg-shadow-inset);
  transform: translateY(-4px) scale(1.02);
}

body.liquid-glass .overview-metric.metric-primary {
  background: rgba(52, 199, 89, 0.08);
  border-color: rgba(52, 199, 89, 0.2);
}

body.liquid-glass .metric-icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: var(--lg-surface);
  backdrop-filter: blur(20px);
  border: 1px solid var(--lg-border-subtle);
  box-shadow: var(--lg-shadow-inset);
}

body.liquid-glass .metric-icon.status-running {
  background: rgba(52, 199, 89, 0.12);
  border-color: rgba(52, 199, 89, 0.25);
}

body.liquid-glass .metric-label {
  color: var(--lg-text-muted);
}

body.liquid-glass .metric-value {
  color: var(--lg-text-primary);
  font-weight: 700;
}

body.liquid-glass .metric-value.status-good {
  color: var(--lg-green);
}

body.liquid-glass .metric-sub {
  color: var(--lg-text-secondary);
}

body.liquid-glass .metric-bar {
  background: rgba(0, 0, 0, 0.06);
  border: none;
  border-radius: 4px;
}

/* Info Grid */
body.liquid-glass .info-item {
  background: var(--lg-surface);
  backdrop-filter: blur(20px);
  border: 1px solid var(--lg-border-subtle);
  border-radius: 14px;
  box-shadow: var(--lg-shadow-inset);
}

body.liquid-glass .info-item:hover {
  border-color: var(--lg-accent);
  background: var(--lg-surface-hover);
  box-shadow: 0 4px 16px var(--lg-accent-glow), var(--lg-shadow-inset);
  transform: scale(1.02);
}

body.liquid-glass .info-item .info-label {
  color: var(--lg-text-muted);
}

body.liquid-glass .info-item .info-value {
  color: var(--lg-text-primary);
}

/* Traffic */
body.liquid-glass .traffic-item {
  background: var(--lg-surface);
  backdrop-filter: blur(20px);
  border: 1px solid var(--lg-border-subtle);
  border-radius: 16px;
  box-shadow: var(--lg-shadow-inset);
}

body.liquid-glass .traffic-item.highlight {
  background: linear-gradient(135deg, rgba(0, 122, 255, 0.08), rgba(175, 82, 222, 0.06));
  border-color: rgba(0, 122, 255, 0.2);
}

body.liquid-glass .traffic-label {
  color: var(--lg-text-muted);
}

body.liquid-glass .traffic-big-value {
  color: var(--lg-accent);
  text-shadow: 0 1px 2px var(--lg-accent-glow);
}

body.liquid-glass .traffic-chart-wrap {
  background: var(--lg-surface);
  backdrop-filter: blur(20px);
  border: 1px solid var(--lg-border-subtle);
  border-radius: 14px;
  box-shadow: var(--lg-shadow-inset);
}

/* IP Stats */
body.liquid-glass .ip-stats-header {
  border-bottom-color: var(--lg-border-subtle);
}

body.liquid-glass .ip-number {
  color: var(--lg-accent);
  text-shadow: 0 2px 8px var(--lg-accent-glow);
}

body.liquid-glass .ip-unit {
  color: var(--lg-text-muted);
}

body.liquid-glass .ip-table th {
  background: var(--lg-surface);
  color: var(--lg-text-muted);
  border-bottom-color: var(--lg-border-subtle);
}

body.liquid-glass .ip-table td {
  color: var(--lg-text-secondary);
  border-bottom-color: rgba(0, 0, 0, 0.04);
}

body.liquid-glass .ip-table tbody tr:hover {
  background: rgba(0, 122, 255, 0.06);
}

body.liquid-glass .ip-table td:first-child {
  color: var(--lg-accent);
}

/* File Stats */
body.liquid-glass .file-stat-card {
  background: var(--lg-surface);
  backdrop-filter: blur(20px);
  border: 1px solid var(--lg-border-subtle);
  border-radius: 16px;
  box-shadow: var(--lg-shadow-inset);
}

body.liquid-glass .file-stat-card:hover {
  border-color: var(--lg-accent);
  box-shadow: 0 4px 16px var(--lg-accent-glow), var(--lg-shadow-inset);
  transform: translateY(-3px) scale(1.02);
}

body.liquid-glass .file-stat-card.primary {
  background: linear-gradient(135deg, rgba(0, 122, 255, 0.1), rgba(88, 86, 214, 0.06));
  border-color: rgba(0, 122, 255, 0.2);
}

body.liquid-glass .file-stat-card.image-type {
  background: linear-gradient(135deg, rgba(0, 122, 255, 0.08), rgba(50, 173, 230, 0.05));
  border-color: rgba(0, 122, 255, 0.15);
}

body.liquid-glass .file-stat-card.video-type {
  background: linear-gradient(135deg, rgba(175, 82, 222, 0.08), rgba(255, 45, 85, 0.05));
  border-color: rgba(175, 82, 222, 0.15);
}

body.liquid-glass .file-stat-number {
  color: var(--lg-accent);
}

body.liquid-glass .file-stat-text {
  color: var(--lg-text-muted);
}

/* Traffic Breakdown */
body.liquid-glass .breakdown-item {
  background: var(--lg-surface);
  backdrop-filter: blur(20px);
  border: 1px solid var(--lg-border-subtle);
  border-radius: 16px;
  box-shadow: var(--lg-shadow-inset);
}

body.liquid-glass .breakdown-label {
  color: var(--lg-text-muted);
}

body.liquid-glass .breakdown-value {
  color: var(--lg-text-primary);
}

body.liquid-glass .breakdown-value.total-highlight {
  color: var(--lg-accent);
  text-shadow: 0 1px 4px var(--lg-accent-glow);
}

body.liquid-glass .breakdown-bar {
  background: rgba(0, 0, 0, 0.06);
  border-radius: 4px;
}

/* Search Box */
body.liquid-glass .search-box input {
  background: var(--lg-surface);
  backdrop-filter: blur(20px);
  border: 1px solid var(--lg-border-subtle);
  border-radius: 14px;
  color: var(--lg-text-primary);
  box-shadow: var(--lg-shadow-inset);
}

body.liquid-glass .search-box input:focus {
  background: var(--lg-surface-active);
  border-color: var(--lg-accent);
  box-shadow: 0 0 0 4px var(--lg-accent-glow), var(--lg-shadow-inset), 0 4px 16px rgba(0, 122, 255, 0.12);
  transform: scale(1.02);
}

body.liquid-glass .search-box input::placeholder {
  color: var(--lg-text-muted);
}

body.liquid-glass .search-box svg {
  color: var(--lg-text-muted);
}

/* Action Buttons */
body.liquid-glass .action-btn {
  background: var(--lg-surface);
  backdrop-filter: blur(20px);
  border: 1px solid var(--lg-border-subtle);
  border-radius: 14px;
  color: var(--lg-text-secondary);
  box-shadow: var(--lg-shadow-inset);
}

body.liquid-glass .action-btn::before {
  display: none;
}

body.liquid-glass .action-btn:hover {
  background: var(--lg-surface-hover);
  color: var(--lg-text-primary);
  border-color: var(--lg-accent);
  box-shadow: 0 4px 16px var(--lg-accent-glow), var(--lg-shadow-inset);
  transform: scale(1.04) translateY(-2px);
}

body.liquid-glass .action-btn.primary {
  background: var(--lg-accent-grad);
  border: none;
  color: white;
  box-shadow: 0 4px 16px var(--lg-accent-glow), var(--lg-shadow-inset);
}

body.liquid-glass .action-btn.primary:hover {
  box-shadow: 0 8px 28px var(--lg-accent-glow), 0 2px 8px rgba(0, 122, 255, 0.3), var(--lg-shadow-inset);
  transform: scale(1.05) translateY(-3px);
}

body.liquid-glass .action-btn.warning {
  background: rgba(255, 59, 48, 0.08);
  border-color: rgba(255, 59, 48, 0.2);
  color: var(--lg-red);
}

body.liquid-glass .action-btn.warning:hover {
  background: rgba(255, 59, 48, 0.15);
  border-color: var(--lg-red);
  box-shadow: 0 4px 16px rgba(255, 59, 48, 0.2);
}

body.liquid-glass .action-btn svg {
  color: inherit;
}

/* Data Table */
body.liquid-glass .table-container {
  background: var(--lg-surface);
  backdrop-filter: blur(30px) saturate(160%);
  border: 1px solid var(--lg-border);
  border-radius: 20px;
  box-shadow: var(--lg-shadow), var(--lg-shadow-inset);
  overflow: hidden;
}

body.liquid-glass .data-table thead {
  background: rgba(0, 122, 255, 0.04);
}

body.liquid-glass .data-table th {
  color: var(--lg-text-secondary);
  border-bottom-color: var(--lg-border-subtle);
}

body.liquid-glass .data-table td {
  color: var(--lg-text-primary);
  border-bottom-color: rgba(0, 0, 0, 0.04);
}

body.liquid-glass .data-table tbody tr:nth-child(even) {
  background: rgba(0, 122, 255, 0.02);
}

body.liquid-glass .data-table tbody tr:hover {
  background: rgba(0, 122, 255, 0.06);
  transform: scale(1.005);
}

/* Type Badges */
body.liquid-glass .type-badge.image {
  background: rgba(0, 122, 255, 0.12);
  color: var(--lg-accent);
}

body.liquid-glass .type-badge.video {
  background: rgba(175, 82, 222, 0.12);
  color: var(--lg-purple);
}

body.liquid-glass .type-badge.other {
  background: rgba(136, 136, 160, 0.12);
  color: var(--lg-text-secondary);
}

body.liquid-glass .protect-badge.on {
  background: rgba(52, 199, 89, 0.12);
  color: var(--lg-green);
}

body.liquid-glass .protect-badge.off {
  background: rgba(136, 136, 160, 0.08);
  color: var(--lg-text-muted);
}

body.liquid-glass .status-badge.active {
  background: rgba(52, 199, 89, 0.12);
  color: var(--lg-green);
}

body.liquid-glass .status-badge.disabled {
  background: rgba(255, 59, 48, 0.12);
  color: var(--lg-red);
}

/* Cell Action Buttons */
body.liquid-glass .btn-action {
  border-radius: 10px;
  backdrop-filter: blur(10px);
}

body.liquid-glass .btn-copy {
  border-color: var(--lg-accent);
  color: var(--lg-accent);
}
body.liquid-glass .btn-copy:hover {
  background: var(--lg-accent);
  color: white;
  box-shadow: 0 4px 12px var(--lg-accent-glow);
}

body.liquid-glass .btn-view {
  border-color: var(--lg-cyan);
  color: var(--lg-cyan);
}
body.liquid-glass .btn-view:hover {
  background: var(--lg-cyan);
  color: white;
}

body.liquid-glass .btn-edit {
  border-color: var(--lg-orange);
  color: var(--lg-orange);
}
body.liquid-glass .btn-edit:hover {
  background: var(--lg-orange);
  color: white;
}

body.liquid-glass .btn-toggle-on {
  border-color: var(--lg-green);
  color: var(--lg-green);
}
body.liquid-glass .btn-toggle-on:hover {
  background: var(--lg-green);
  color: white;
}

body.liquid-glass .btn-toggle-off {
  border-color: var(--lg-orange);
  color: var(--lg-orange);
}
body.liquid-glass .btn-toggle-off:hover {
  background: var(--lg-orange);
  color: white;
}

body.liquid-glass .btn-del {
  border-color: var(--lg-red);
  color: var(--lg-red);
}
body.liquid-glass .btn-del:hover {
  background: var(--lg-red);
  color: white;
}

/* Right Sidebar */
body.liquid-glass .right-sidebar {
  background: var(--lg-surface);
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  border-left: 1px solid var(--lg-border-subtle);
  box-shadow: -2px 0 20px rgba(0, 0, 0, 0.03);
}

body.liquid-glass .rs-title {
  color: var(--lg-text-secondary);
  border-bottom-color: var(--lg-border-subtle);
}

body.liquid-glass .rs-btn {
  background: var(--lg-surface);
  backdrop-filter: blur(20px);
  border: 1px solid var(--lg-border-subtle);
  border-radius: 14px;
  color: var(--lg-text-secondary);
  box-shadow: var(--lg-shadow-inset);
}

body.liquid-glass .rs-btn:hover {
  background: var(--lg-surface-hover);
  color: var(--lg-text-primary);
  border-color: var(--lg-border);
  transform: scale(1.02) translateY(-1px);
  box-shadow: var(--lg-shadow), var(--lg-shadow-inset);
}

body.liquid-glass .rs-btn.primary {
  background: var(--lg-accent-grad);
  border: none;
  color: white;
  box-shadow: 0 4px 16px var(--lg-accent-glow), var(--lg-shadow-inset);
}

body.liquid-glass .rs-chart-wrap {
  background: var(--lg-surface);
  backdrop-filter: blur(20px);
  border: 1px solid var(--lg-border-subtle);
  border-radius: 14px;
  box-shadow: var(--lg-shadow-inset);
}

body.liquid-glass .rs-rate-item {
  background: var(--lg-surface);
  backdrop-filter: blur(10px);
  border: 1px solid var(--lg-border-subtle);
  border-radius: 12px;
  box-shadow: var(--lg-shadow-inset);
}

body.liquid-glass .rs-rate-label {
  color: var(--lg-text-muted);
}

body.liquid-glass .rs-rate-value {
  color: var(--lg-accent);
}

body.liquid-glass .rs-stat {
  background: var(--lg-surface);
  backdrop-filter: blur(10px);
  border: 1px solid var(--lg-border-subtle);
  border-radius: 14px;
  box-shadow: var(--lg-shadow-inset);
}

body.liquid-glass .rs-stat-val {
  color: var(--lg-accent);
  text-shadow: 0 1px 4px var(--lg-accent-glow);
}

body.liquid-glass .rs-stat-lbl {
  color: var(--lg-text-muted);
}

/* Modals */
body.liquid-glass .modal-overlay {
  background: rgba(240, 240, 250, 0.6);
  backdrop-filter: blur(8px);
}

body.liquid-glass .modal-box {
  background: var(--lg-surface);
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  border: 1px solid var(--lg-border);
  border-radius: 24px;
  box-shadow: var(--lg-shadow-lg), var(--lg-shadow-inset);
}

body.liquid-glass .modal-header {
  border-bottom-color: var(--lg-border-subtle);
}

body.liquid-glass .modal-header h3 {
  color: var(--lg-text-primary);
}

body.liquid-glass .modal-close {
  color: var(--lg-text-muted);
  border-radius: 50%;
}

body.liquid-glass .modal-close:hover {
  background: rgba(0, 122, 255, 0.08);
  color: var(--lg-accent);
}

body.liquid-glass .upload-options {
  border-bottom-color: var(--lg-border-subtle);
}

body.liquid-glass .checkbox-label.dark {
  color: var(--lg-text-secondary);
}

body.liquid-glass .checkbox-label.dark input[type="checkbox"] {
  border-color: var(--lg-border);
  background: var(--lg-surface);
}

body.liquid-glass .checkbox-label.dark input[type="checkbox"]:checked {
  background: var(--lg-accent);
  border-color: var(--lg-accent);
}

body.liquid-glass .domain-config-dark label {
  color: var(--lg-text-secondary);
}

body.liquid-glass .domain-config-dark textarea {
  background: var(--lg-surface);
  border: 1px solid var(--lg-border-subtle);
  border-radius: 12px;
  color: var(--lg-text-primary);
  box-shadow: var(--lg-shadow-inset);
}

body.liquid-glass .domain-config-dark textarea:focus {
  border-color: var(--lg-accent);
  box-shadow: 0 0 0 3px var(--lg-accent-glow), var(--lg-shadow-inset);
}

body.liquid-glass .hint-text {
  color: var(--lg-text-muted) !important;
}

body.liquid-glass .upload-drop-zone {
  background: rgba(0, 122, 255, 0.03);
  border: 2px dashed var(--lg-border);
  border-radius: 20px;
}

body.liquid-glass .upload-drop-zone:hover,
body.liquid-glass .upload-drop-zone.dragover {
  border-color: var(--lg-accent);
  background: rgba(0, 122, 255, 0.08);
  transform: scale(1.01) translateY(-2px);
  box-shadow: 0 8px 32px var(--lg-accent-glow);
}

body.liquid-glass .progress-bar {
  background: rgba(0, 0, 0, 0.06);
  border-radius: 6px;
}

body.liquid-glass .progress-fill {
  background: var(--lg-accent-grad);
  border-radius: 6px;
}

body.liquid-glass .progress-text {
  color: var(--lg-accent);
}

body.liquid-glass .result-success {
  color: var(--lg-green);
}

body.liquid-glass .url-display input {
  background: var(--lg-surface);
  border: 1px solid var(--lg-border-subtle);
  border-radius: 12px;
  color: var(--lg-text-primary);
  box-shadow: var(--lg-shadow-inset);
}

body.liquid-glass .copy-btn {
  background: var(--lg-accent-grad);
  border: none;
  border-radius: 12px;
  box-shadow: 0 2px 10px var(--lg-accent-glow);
}

body.liquid-glass .copy-btn:hover {
  box-shadow: 0 4px 16px var(--lg-accent-glow);
  transform: scale(1.04);
}

body.liquid-glass .confirm-file-info {
  background: var(--lg-surface);
  border: 1px solid var(--lg-border-subtle);
  border-radius: 14px;
  box-shadow: var(--lg-shadow-inset);
}

body.liquid-glass .confirm-file-info p strong {
  color: var(--lg-text-primary);
}

body.liquid-glass .confirm-file-info p {
  color: var(--lg-text-secondary);
}

body.liquid-glass .modal-box textarea {
  background: var(--lg-surface);
  border: 1px solid var(--lg-border-subtle);
  border-radius: 14px;
  color: var(--lg-text-primary);
  box-shadow: var(--lg-shadow-inset);
}

body.liquid-glass .modal-box textarea:focus {
  border-color: var(--lg-accent);
  box-shadow: 0 0 0 3px var(--lg-accent-glow), var(--lg-shadow-inset);
}

body.liquid-glass .btn-cancel {
  background: var(--lg-surface);
  border-color: var(--lg-border-subtle);
  color: var(--lg-text-secondary);
  border-radius: 12px;
  box-shadow: var(--lg-shadow-inset);
}

body.liquid-glass .btn-cancel:hover {
  background: var(--lg-surface-hover);
  color: var(--lg-text-primary);
}

body.liquid-glass .btn-save {
  background: var(--lg-accent-grad);
  border: none;
  color: white;
  border-radius: 12px;
  box-shadow: 0 2px 10px var(--lg-accent-glow);
}

body.liquid-glass .btn-save:hover {
  box-shadow: 0 4px 16px var(--lg-accent-glow);
  transform: scale(1.04);
}

body.liquid-glass .btn-save.danger {
  background: linear-gradient(135deg, var(--lg-red), #ff6961);
}

body.liquid-glass .confirm-body p {
  color: var(--lg-text-primary);
}

body.liquid-glass .confirm-hint {
  color: var(--lg-text-muted) !important;
}

body.liquid-glass .view-link-filename {
  color: var(--lg-text-primary);
}

body.liquid-glass .preview-filename {
  color: var(--lg-text-primary);
}

body.liquid-glass .preview-container {
  background: var(--lg-surface);
  backdrop-filter: blur(20px);
  border: 1px solid var(--lg-border-subtle);
  border-radius: 16px;
  box-shadow: var(--lg-shadow-inset);
}

body.liquid-glass .preview-container:hover {
  border-color: var(--lg-accent);
  box-shadow: 0 4px 16px var(--lg-accent-glow), var(--lg-shadow-inset);
}

body.liquid-glass .video-fullscreen-btn {
  background: var(--lg-surface);
  backdrop-filter: blur(20px);
  border: 1px solid var(--lg-border-subtle);
}

body.liquid-glass .preview-other {
  color: var(--lg-text-muted);
}

/* Toast */
body.liquid-glass .toast {
  backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 14px;
}

body.liquid-glass .toast.success { background: rgba(52, 199, 89, 0.88); }
body.liquid-glass .toast.error { background: rgba(255, 59, 48, 0.88); }
body.liquid-glass .toast.info { background: rgba(0, 122, 255, 0.88); }
body.liquid-glass .toast.warning { background: rgba(255, 149, 0, 0.88); }

/* Charts */
body.liquid-glass .summary-stat {
  background: var(--lg-surface);
  backdrop-filter: blur(20px);
  border: 1px solid var(--lg-border);
  border-radius: 16px;
  box-shadow: var(--lg-shadow), var(--lg-shadow-inset);
}

body.liquid-glass .summary-stat .summary-label {
  color: var(--lg-text-muted);
}

body.liquid-glass .summary-stat .summary-value {
  color: var(--lg-text-primary);
}

body.liquid-glass .chart-card {
  background: var(--lg-surface);
  backdrop-filter: blur(30px) saturate(160%);
  border: 1px solid var(--lg-border);
  border-radius: 20px;
  box-shadow: var(--lg-shadow), var(--lg-shadow-inset);
}

body.liquid-glass .chart-card .card-header {
  background: transparent;
  border-bottom-color: var(--lg-border-subtle);
}

body.liquid-glass .chart-card .card-header h3 {
  color: var(--lg-text-primary);
}

body.liquid-glass .chart-card .card-header svg {
  color: var(--lg-accent);
}

body.liquid-glass .chart-current {
  color: var(--lg-accent);
  background: rgba(0, 122, 255, 0.1);
  border: 1px solid rgba(0, 122, 255, 0.15);
}

body.liquid-glass .chart-legend .legend-item {
  color: var(--lg-text-secondary);
}

body.liquid-glass .chart-container {
  background: var(--lg-surface);
  border: 1px solid var(--lg-border-subtle);
  border-radius: 14px;
  box-shadow: var(--lg-shadow-inset);
}

body.liquid-glass .chart-tooltip {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px);
  border: 1px solid var(--lg-border);
  border-radius: 12px;
  color: var(--lg-text-primary);
  box-shadow: var(--lg-shadow-lg);
}

body.liquid-glass .chart-tooltip .tooltip-time {
  color: var(--lg-text-muted);
}

/* Blacklist */
body.liquid-glass .blacklist-add-section,
body.liquid-glass .blacklist-auto-section,
body.liquid-glass .blacklist-table-section {
  background: var(--lg-surface);
  backdrop-filter: blur(30px) saturate(160%);
  border: 1px solid var(--lg-border);
  border-radius: 20px;
  box-shadow: var(--lg-shadow), var(--lg-shadow-inset);
}

body.liquid-glass .blacklist-add-section h3,
body.liquid-glass .blacklist-table-section h3 {
  color: var(--lg-text-primary);
  border-bottom-color: var(--lg-border-subtle);
}

body.liquid-glass .blacklist-input {
  background: var(--lg-surface);
  border: 1px solid var(--lg-border-subtle);
  border-radius: 12px;
  color: var(--lg-text-primary);
  box-shadow: var(--lg-shadow-inset);
}

body.liquid-glass .blacklist-input:focus {
  border-color: var(--lg-accent);
  box-shadow: 0 0 0 3px var(--lg-accent-glow), var(--lg-shadow-inset);
}

body.liquid-glass .blacklist-input::placeholder {
  color: var(--lg-text-muted);
}

body.liquid-glass .blacklist-select {
  background: var(--lg-surface);
  border: 1px solid var(--lg-border-subtle);
  border-radius: 12px;
  color: var(--lg-text-primary);
  box-shadow: var(--lg-shadow-inset);
}

body.liquid-glass .blacklist-select option {
  background: white;
  color: var(--lg-text-primary);
}

body.liquid-glass .blacklist-type.permanent {
  background: rgba(255, 59, 48, 0.1);
  color: var(--lg-red);
}

body.liquid-glass .blacklist-type.temporary {
  background: rgba(255, 204, 0, 0.1);
  color: #cc9900;
}

body.liquid-glass .blacklist-type.custom {
  background: rgba(175, 82, 222, 0.1);
  color: var(--lg-purple);
}

body.liquid-glass .blacklist-source.auto {
  background: rgba(255, 149, 0, 0.08);
  color: var(--lg-orange);
}

body.liquid-glass .blacklist-source.manual {
  background: rgba(0, 122, 255, 0.08);
  color: var(--lg-accent);
}

body.liquid-glass .rule-item label {
  color: var(--lg-text-secondary);
}

body.liquid-glass .rule-item input {
  background: var(--lg-surface);
  border: 1px solid var(--lg-border-subtle);
  border-radius: 10px;
  color: var(--lg-text-primary);
  box-shadow: var(--lg-shadow-inset);
}

body.liquid-glass .rule-item input:focus {
  border-color: var(--lg-accent);
}

/* Logs */
body.liquid-glass .log-filters select,
body.liquid-glass .log-filters input {
  background: var(--lg-surface);
  border: 1px solid var(--lg-border-subtle);
  border-radius: 12px;
  color: var(--lg-text-primary);
  box-shadow: var(--lg-shadow-inset);
}

body.liquid-glass .log-filters select option {
  background: white;
  color: var(--lg-text-primary);
}

body.liquid-glass .toggle-switch-wrap .toggle-label {
  color: var(--lg-text-secondary);
}

body.liquid-glass .toggle-slider {
  background: rgba(136, 136, 160, 0.2);
  border: 1px solid var(--lg-border-subtle);
}

body.liquid-glass .toggle-slider::before {
  background: white;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

body.liquid-glass .toggle-switch input:checked + .toggle-slider {
  background: var(--lg-accent-grad);
  border-color: var(--lg-accent);
}

body.liquid-glass .console-area {
  background: var(--lg-surface);
  backdrop-filter: blur(20px);
  border: 1px solid var(--lg-border);
  border-radius: 16px;
  box-shadow: var(--lg-shadow), var(--lg-shadow-inset);
}

body.liquid-glass .logs-toolbar {
  background: var(--lg-surface);
  backdrop-filter: blur(20px);
  border: 1px solid var(--lg-border);
  border-radius: 16px;
  box-shadow: var(--lg-shadow), var(--lg-shadow-inset);
}

body.liquid-glass .logs-count {
  color: var(--lg-text-secondary);
}

body.liquid-glass .logs-filter-info {
  background: rgba(0, 122, 255, 0.06);
  color: var(--lg-text-muted);
  border-color: rgba(0, 122, 255, 0.15);
}

body.liquid-glass .level-btn {
  background: var(--lg-surface);
  border: 1px solid var(--lg-border-subtle);
  border-radius: 14px;
  color: var(--lg-text-secondary);
  box-shadow: var(--lg-shadow-inset);
}

body.liquid-glass .level-btn:hover {
  background: var(--lg-surface-hover);
  border-color: var(--lg-accent);
  color: var(--lg-text-primary);
  transform: scale(1.04);
}

body.liquid-glass .level-btn.active {
  background: var(--lg-accent-grad);
  border-color: var(--lg-accent);
  color: white;
  box-shadow: 0 2px 10px var(--lg-accent-glow);
}

body.liquid-glass .level-btn.access-btn.active {
  background: var(--lg-accent);
}

body.liquid-glass .level-btn.error-btn.active {
  background: var(--lg-red);
}

body.liquid-glass .level-btn.system-btn.active {
  background: var(--lg-green);
}

body.liquid-glass .console-output {
  background: transparent;
  color: var(--lg-text-primary);
}

body.liquid-glass .log-entry {
  border-left-color: transparent;
  border-radius: 10px;
}

body.liquid-glass .log-entry:hover {
  background: rgba(0, 122, 255, 0.06);
  border-left-color: var(--lg-accent);
}

body.liquid-glass .log-time {
  color: var(--lg-text-muted);
}

body.liquid-glass .log-type.access {
  color: var(--lg-accent);
  background: rgba(0, 122, 255, 0.1);
}

body.liquid-glass .log-type.error {
  color: var(--lg-red);
  background: rgba(255, 59, 48, 0.1);
}

body.liquid-glass .log-type.system {
  color: var(--lg-green);
  background: rgba(52, 199, 89, 0.1);
}

body.liquid-glass .log-type.warn {
  color: var(--lg-orange);
  background: rgba(255, 149, 0, 0.1);
}

body.liquid-glass .log-msg {
  color: var(--lg-text-primary);
}

body.liquid-glass .logs-pagination {
  background: var(--lg-surface);
  backdrop-filter: blur(20px);
  border: 1px solid var(--lg-border);
  border-radius: 16px;
  box-shadow: var(--lg-shadow), var(--lg-shadow-inset);
}

body.liquid-glass .page-btn {
  background: var(--lg-surface);
  border: 1px solid var(--lg-border-subtle);
  border-radius: 12px;
  color: var(--lg-text-secondary);
  box-shadow: var(--lg-shadow-inset);
}

body.liquid-glass .page-btn:hover:not(:disabled) {
  background: var(--lg-accent-grad);
  border-color: var(--lg-accent);
  color: white;
  box-shadow: 0 4px 12px var(--lg-accent-glow);
  transform: scale(1.05) translateY(-1px);
}

body.liquid-glass .page-btn:disabled {
  opacity: 0.4;
  background: var(--lg-surface);
}

body.liquid-glass .page-info {
  color: var(--lg-text-secondary);
}

body.liquid-glass .page-info span {
  color: var(--lg-accent);
}

body.liquid-glass .page-size-select {
  background: var(--lg-surface);
  border: 1px solid var(--lg-border-subtle);
  border-radius: 10px;
  color: var(--lg-text-primary);
  box-shadow: var(--lg-shadow-inset);
}

body.liquid-glass .page-size-select option {
  background: white;
  color: var(--lg-text-primary);
}

/* AI Panel Liquid Glass */
body.liquid-glass .ai-analyze-panel {
  background: var(--lg-surface);
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  border: 1px solid var(--lg-border);
  border-radius: 24px;
  box-shadow: var(--lg-shadow-lg), var(--lg-shadow-inset);
}

body.liquid-glass .ai-sidebar {
  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  border-right: 1px solid var(--lg-border-subtle);
}

body.liquid-glass .ai-sidebar-header {
  border-bottom-color: var(--lg-border-subtle);
}

body.liquid-glass .ai-new-chat-btn {
  background: var(--lg-accent-grad);
  border: none;
  border-radius: 16px;
  box-shadow: 0 4px 16px var(--lg-accent-glow), var(--lg-shadow-inset);
}

body.liquid-glass .ai-new-chat-btn:hover {
  box-shadow: 0 8px 28px var(--lg-accent-glow), 0 2px 8px rgba(0, 122, 255, 0.3), var(--lg-shadow-inset);
  transform: scale(1.03) translateY(-2px);
}

body.liquid-glass .ai-new-chat-btn::before {
  background: rgba(255, 255, 255, 0.25);
}

body.liquid-glass .ai-search-box input {
  background: var(--lg-surface);
  border: 1px solid var(--lg-border-subtle);
  border-radius: 14px;
  color: var(--lg-text-primary);
  box-shadow: var(--lg-shadow-inset);
}

body.liquid-glass .ai-search-box input:focus {
  border-color: var(--lg-accent);
  box-shadow: 0 0 0 3px var(--lg-accent-glow), var(--lg-shadow-inset);
}

body.liquid-glass .chat-item {
  border-radius: 14px;
}

body.liquid-glass .chat-item:hover {
  background: rgba(0, 122, 255, 0.06);
}

body.liquid-glass .chat-item.active {
  background: rgba(0, 122, 255, 0.1);
  border-left-color: var(--lg-accent);
  box-shadow: 0 2px 12px var(--lg-accent-glow);
}

body.liquid-glass .chat-item-icon {
  background: linear-gradient(135deg, rgba(0, 122, 255, 0.12), rgba(175, 82, 222, 0.12));
}

body.liquid-glass .chat-item-icon svg {
  color: var(--lg-accent);
}

body.liquid-glass .chat-item-title {
  color: var(--lg-text-primary);
}

body.liquid-glass .chat-item-time {
  color: var(--lg-text-muted);
}

body.liquid-glass .chat-item-delete {
  background: rgba(255, 59, 48, 0.08);
  border: 1px solid rgba(255, 59, 48, 0.15);
  color: var(--lg-red);
}

body.liquid-glass .ai-sidebar-footer {
  border-top-color: var(--lg-border-subtle);
}

body.liquid-glass .ai-clear-all-btn {
  background: transparent;
  border: 1px solid rgba(255, 59, 48, 0.2);
  border-radius: 14px;
  color: var(--lg-red);
}

body.liquid-glass .ai-clear-all-btn:hover {
  background: rgba(255, 59, 48, 0.08);
  border-color: rgba(255, 59, 48, 0.35);
}

body.liquid-glass .ai-main-header {
  background: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(20px);
  border-bottom-color: var(--lg-border-subtle);
}

body.liquid-glass .ai-toggle-sidebar {
  background: var(--lg-surface);
  border: 1px solid var(--lg-border-subtle);
  border-radius: 12px;
  color: var(--lg-text-primary);
}

body.liquid-glass .ai-toggle-sidebar:hover {
  background: rgba(0, 122, 255, 0.08);
  border-color: var(--lg-accent);
}

body.liquid-glass .ai-avatar-bot {
  background: var(--lg-accent-grad);
  box-shadow: 0 4px 16px var(--lg-accent-glow);
}

body.liquid-glass .ai-header-title h2 {
  color: var(--lg-text-primary);
}

body.liquid-glass .ai-status.online {
  color: var(--lg-green);
}

body.liquid-glass .ai-status.online::before {
  background: var(--lg-green);
  box-shadow: 0 0 6px var(--lg-green);
}

body.liquid-glass .ai-messages-container::-webkit-scrollbar-thumb {
  background: rgba(0, 122, 255, 0.15);
}

body.liquid-glass .ai-messages-container::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 122, 255, 0.25);
}

body.liquid-glass .ai-welcome-screen h3 {
  background: linear-gradient(135deg, var(--lg-accent), var(--lg-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

body.liquid-glass .ai-welcome-screen p {
  color: var(--lg-text-secondary);
}

body.liquid-glass .ai-glow-circle {
  background: radial-gradient(circle, var(--lg-accent-glow) 0%, transparent 70%);
}

body.liquid-glass .ai-welcome-icon > svg {
  color: var(--lg-accent);
  filter: drop-shadow(0 0 20px var(--lg-accent-glow));
}

body.liquid-glass .suggestion-card {
  background: var(--lg-surface);
  backdrop-filter: blur(20px);
  border: 1px solid var(--lg-border-subtle);
  border-radius: 18px;
  color: var(--lg-text-primary);
  box-shadow: var(--lg-shadow-inset);
}

body.liquid-glass .suggestion-card:hover {
  background: var(--lg-surface-hover);
  border-color: var(--lg-accent);
  box-shadow: 0 8px 28px var(--lg-accent-glow), var(--lg-shadow-inset);
  transform: translateY(-3px) scale(1.03);
}

body.liquid-glass .suggestion-card svg {
  color: var(--lg-accent);
}

body.liquid-glass .message-bubble {
  border-radius: 20px;
}

body.liquid-glass .ai-message.assistant .message-bubble {
  background: var(--lg-surface);
  backdrop-filter: blur(20px);
  border: 1px solid var(--lg-border-subtle);
  color: var(--lg-text-primary);
  box-shadow: var(--lg-shadow-inset);
}

body.liquid-glass .ai-message.user .message-bubble {
  background: var(--lg-accent-grad);
  color: white;
  box-shadow: 0 4px 16px var(--lg-accent-glow);
}

body.liquid-glass .message-bubble pre {
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid var(--lg-border-subtle);
  border-radius: 12px;
}

body.liquid-glass .message-bubble code {
  color: var(--lg-accent);
}

body.liquid-glass .message-time {
  color: var(--lg-text-muted);
}

body.liquid-glass .ai-input-container {
  background: linear-gradient(to top, rgba(255, 255, 255, 0.6) 0%, transparent 100%);
}

body.liquid-glass .ai-input-wrapper {
  background: var(--lg-surface);
  backdrop-filter: blur(30px);
  border: 1px solid var(--lg-border-subtle);
  border-radius: 22px;
  box-shadow: var(--lg-shadow-inset);
}

body.liquid-glass .ai-input-wrapper:focus-within {
  border-color: var(--lg-accent);
  box-shadow: 0 0 0 4px var(--lg-accent-glow), 0 8px 28px var(--lg-accent-glow), var(--lg-shadow-inset);
}

body.liquid-glass .ai-input-wrapper textarea {
  color: var(--lg-text-primary);
}

body.liquid-glass .ai-send-button {
  background: var(--lg-accent-grad);
  border-radius: 16px;
  box-shadow: 0 2px 10px var(--lg-accent-glow), var(--lg-shadow-inset);
}

body.liquid-glass .ai-send-button:not(:disabled):hover {
  box-shadow: 0 6px 22px var(--lg-accent-glow), 0 2px 8px rgba(0, 122, 255, 0.3), var(--lg-shadow-inset);
}

body.liquid-glass .ai-send-button:disabled {
  background: rgba(0, 122, 255, 0.2);
}

body.liquid-glass .ai-disclaimer {
  color: var(--lg-text-muted);
}

body.liquid-glass .typing-indicator {
  background: var(--lg-surface);
  backdrop-filter: blur(20px);
  border: 1px solid var(--lg-border-subtle);
  border-radius: 18px;
}

body.liquid-glass .typing-dot {
  background: var(--lg-accent);
}

/* Scrollbar */
body.liquid-glass ::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

body.liquid-glass ::-webkit-scrollbar-track {
  background: transparent;
}

body.liquid-glass ::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.12);
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

body.liquid-glass ::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.2);
}

body.liquid-glass ::selection {
  background: rgba(0, 122, 255, 0.2);
  color: var(--lg-text-primary);
}

/* Table Empty State */
body.liquid-glass .table-empty {
  color: var(--lg-text-muted);
}

body.liquid-glass .table-empty svg {
  opacity: 0.3;
  color: var(--lg-accent);
}

body.liquid-glass .table-empty p {
  color: var(--lg-text-secondary);
}

/* Theme Toggle Button */
.theme-toggle-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  overflow: hidden;
}

.theme-toggle-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--accent-blue);
  transform: scale(1.1) rotate(15deg);
  box-shadow: 0 4px 12px rgba(88,166,255,0.25);
}

body.liquid-glass .theme-toggle-btn {
  background: var(--lg-surface);
  backdrop-filter: blur(20px);
  border: 1px solid var(--lg-border-subtle);
  border-radius: 12px;
  color: var(--lg-text-secondary);
  box-shadow: var(--lg-shadow-inset);
}

body.liquid-glass .theme-toggle-btn:hover {
  background: var(--lg-surface-hover);
  color: var(--lg-accent);
  border-color: var(--lg-accent);
  box-shadow: 0 4px 16px var(--lg-accent-glow), var(--lg-shadow-inset);
  transform: scale(1.1) rotate(15deg);
}

.theme-toggle-btn svg {
  width: 18px;
  height: 18px;
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.theme-toggle-btn.rotated svg {
  transform: rotate(180deg);
}

/* Responsive adjustments for liquid glass */
@media (max-width: 1200px) {
  body.liquid-glass .cards-grid {
    grid-template-columns: 1fr;
  }
  body.liquid-glass .card.wide {
    grid-column: span 1;
  }
}

@media (max-width: 992px) {
  body.liquid-glass .right-sidebar {
    display: none;
  }
  body.liquid-glass .main-content {
    margin-right: 0;
  }
}

@media (max-width: 768px) {
  :root {
    --sidebar-width: 60px;
    --topbar-height: 50px;
  }
  body.liquid-glass .sidebar {
    padding: 12px 0;
  }
  body.liquid-glass .nav-item {
    justify-content: center;
    padding: 12px;
    margin: 2px 4px;
  }
  body.liquid-glass .nav-item span {
    display: none;
  }
  body.liquid-glass .nav-item.active {
    border-top: 3px solid var(--lg-accent);
    border-radius: 0 12px 12px 0;
  }
  body.liquid-glass .main-content {
    margin-left: var(--sidebar-width);
    padding: 16px;
  }
  body.liquid-glass .topbar {
    padding: 0 16px;
  }
  body.liquid-glass .topbar-center {
    display: none;
  }
  body.liquid-glass .panel-header {
    flex-direction: column;
    align-items: flex-start;
  }
  body.liquid-glass .panel-actions {
    width: 100%;
    justify-content: space-between;
  }
  body.liquid-glass .login-container {
    padding: 32px 24px;
    border-radius: 20px;
  }
  body.liquid-glass .modal-box {
    border-radius: 20px;
  }
}

/* ========================================
   Accessibility - Keyboard Navigation
   ======================================== */

:focus-visible {
  outline: 2px solid var(--accent-blue);
  outline-offset: 2px;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent-blue);
  outline-offset: 2px;
}

.topbar-btn:focus-visible,
.action-btn:focus-visible,
.nav-item:focus-visible,
.rs-btn:focus-visible {
  outline: 2px solid var(--accent-blue);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(88,166,255,0.2);
}

body.liquid-glass :focus-visible {
  outline: 2px solid var(--lg-accent);
  outline-offset: 2px;
}

body.liquid-glass button:focus-visible,
body.liquid-glass a:focus-visible,
body.liquid-glass input:focus-visible {
  outline: 2px solid var(--lg-accent);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px var(--lg-accent-glow);
}

/* ========================================
   HTML文件管理系统样式
   ======================================== */

.html-manager-panel {
  padding: 20px;
}

.html-upload-section {
  background: var(--bg-secondary, #161b22);
  border-radius: var(--radius-lg, 16px);
  padding: 24px;
  margin-bottom: 20px;
  border: 1px solid var(--border-light, #484f58);
  box-shadow: var(--shadow-sm, 0 1px 3px rgba(0,0,0,0.2));
}

.html-drop-zone {
  border: 2px dashed var(--accent-blue, #58a6ff);
  border-radius: var(--radius-lg, 12px);
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  background: linear-gradient(135deg, rgba(88,166,255,0.05) 0%, rgba(63,185,80,0.05) 100%);
}

.html-drop-zone:hover,
.html-drop-zone.dragover {
  border-color: var(--accent-cyan, #1f9eff);
  background: linear-gradient(135deg, rgba(88,166,255,0.1) 0%, rgba(63,185,80,0.1) 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(88,166,255,0.2);
}

.html-drop-zone .drop-zone-icon {
  font-size: 48px;
  margin-bottom: 12px;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.html-drop-zone p {
  margin: 8px 0;
  color: var(--text-secondary, #8b949e);
  font-size: 15px;
}

.html-drop-zone .hint {
  font-size: 13px;
  color: var(--text-muted, #6e7681);
}

#html-upload-result .result-success {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  font-size: 15px;
  color: var(--accent-green, #3fb950);
  font-weight: 500;
}

#html-upload-result .result-icon {
  font-size: 20px;
}

#html-upload-result .url-display {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
}

#html-upload-result .url-display input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid var(--border-color, #30363d);
  border-radius: var(--radius-md, 8px);
  background: var(--bg-input, #0d1117);
  font-size: 13px;
  font-family: 'Consolas', monospace;
  color: var(--text-primary, #f0f6fc);
  transition: all 0.2s ease;
}

#html-upload-result .url-display input:focus {
  outline: none;
  border-color: var(--accent-blue, #58a6ff);
  box-shadow: 0 0 0 3px rgba(88,166,255,0.2);
}

#html-upload-result .copy-btn {
  padding: 10px 18px;
  background: var(--accent-blue, #58a6ff);
  color: white;
  border: none;
  border-radius: var(--radius-md, 8px);
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s ease;
  white-space: nowrap;
}

#html-upload-result .copy-btn:hover {
  background: var(--accent-blue-hover, #3182ce);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(88,166,255,0.3);
}

#html-upload-result .action-btn.primary {
  background: linear-gradient(135deg, var(--accent-green, #3fb950), #2ea043);
  color: white;
  border: none;
  border-radius: var(--radius-md, 8px);
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s ease;
  align-items: center;
  justify-content: center;
}

#html-upload-result .action-btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(63,185,80,0.35);
}

#html-result-file-info {
  margin-top: 12px;
  padding: 10px 14px;
  background: var(--bg-tertiary, #21262d);
  border-radius: var(--radius-md, 8px);
  font-size: 13px;
  color: var(--text-secondary, #8b949e);
}

.visit-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  background: linear-gradient(135deg, rgba(88,166,255,0.1), rgba(63,185,80,0.1));
  color: var(--accent-blue, #58a6ff);
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
}

.filename-cell {
  max-width: 250px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: inline-block;
  vertical-align: middle;
  color: var(--text-primary, #f0f6fc);
}

.cell-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.cell-actions .btn-action {
  padding: 6px 12px;
  font-size: 12px;
  border: none;
  border-radius: var(--radius-sm, 6px);
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 500;
  white-space: nowrap;
}

.cell-actions .btn-copy {
  background: linear-gradient(135deg, var(--accent-blue, #58a6ff), var(--accent-blue-hover, #3182ce));
  color: white;
}

.cell-actions .btn-copy:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(88,166,255,0.3);
}

.cell-actions .btn-view {
  background: linear-gradient(135deg, var(--accent-green, #3fb950), #2ea043);
  color: white;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  line-height: normal;
}

.cell-actions .btn-view:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(63,185,80,0.3);
}

.cell-actions .btn-del {
  background: linear-gradient(135deg, var(--accent-red, #f85149), #da3633);
  color: white;
}

.cell-actions .btn-del:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(248,81,73,0.3);
}

#html-table-empty svg {
  width: 64px;
  height: 64px;
  margin-bottom: 16px;
  opacity: 0.3;
  color: var(--text-secondary, #8b949e);
}

#html-table-empty p {
  color: var(--text-secondary, #8b949e);
  margin-bottom: 12px;
}

#html-table-empty button {
  background: var(--accent-blue, #58a6ff);
  color: white;
  border: none;
  padding: 10px 16px;
  border-radius: var(--radius-md, 8px);
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s ease;
}

#html-table-empty button:hover {
  background: var(--accent-blue-hover, #3182ce);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(88,166,255,0.3);
}

@media (max-width: 768px) {
  .html-upload-section {
    padding: 16px;
  }

  .html-drop-zone {
    padding: 30px 16px;
  }

  .html-drop-zone .drop-zone-icon {
    font-size: 36px;
  }

  .filename-cell {
    max-width: 150px;
  }

  .cell-actions {
    flex-direction: column;
    gap: 4px;
  }

  .cell-actions .btn-action {
    width: 100%;
    text-align: center;
  }

  #html-upload-result .url-display {
    flex-direction: column;
  }
}

/* ========================================
   液态玻璃模式下的HTML管理样式
   ======================================== */

body.liquid-glass .html-upload-section {
  background: var(--lg-surface);
  border: 1px solid var(--lg-border);
  box-shadow: var(--lg-shadow);
}

body.liquid-glass .html-drop-zone {
  border: 2px dashed var(--lg-accent);
  background: linear-gradient(135deg, rgba(0,122,255,0.05) 0%, rgba(88,86,214,0.05) 100%);
}

body.liquid-glass .html-drop-zone:hover,
body.liquid-glass .html-drop-zone.dragover {
  border-color: var(--lg-accent-hover);
  background: linear-gradient(135deg, rgba(0,122,255,0.1) 0%, rgba(88,86,214,0.1) 100%);
  box-shadow: 0 8px 25px rgba(0,122,255,0.2);
}

body.liquid-glass .html-drop-zone p {
  color: var(--lg-text-secondary);
}

body.liquid-glass .html-drop-zone .hint {
  color: var(--lg-text-muted);
}

body.liquid-glass #html-upload-result .result-success {
  color: var(--lg-green);
}

body.liquid-glass #html-upload-result .url-display input {
  border: 1px solid var(--lg-border);
  background: var(--lg-surface-active);
  color: var(--lg-text-primary);
}

body.liquid-glass #html-upload-result .url-display input:focus {
  border-color: var(--lg-accent);
  box-shadow: 0 0 0 3px var(--lg-accent-glow);
}

body.liquid-glass #html-upload-result .copy-btn {
  background: var(--lg-accent);
}

body.liquid-glass #html-upload-result .copy-btn:hover {
  background: var(--lg-accent-hover);
  box-shadow: 0 4px 12px rgba(0,122,255,0.3);
}

body.liquid-glass #html-upload-result .action-btn.primary {
  background: linear-gradient(135deg, var(--lg-green), #28a745);
}

body.liquid-glass #html-upload-result .action-btn.primary:hover {
  box-shadow: 0 6px 20px rgba(52,199,89,0.35);
}

body.liquid-glass #html-result-file-info {
  background: var(--lg-surface-hover);
  color: var(--lg-text-secondary);
}

body.liquid-glass .visit-badge {
  background: linear-gradient(135deg, rgba(0,122,255,0.1), rgba(52,199,89,0.1));
  color: var(--lg-accent);
}

body.liquid-glass .filename-cell {
  color: var(--lg-text-primary);
}

body.liquid-glass .cell-actions .btn-copy {
  background: linear-gradient(135deg, var(--lg-accent), var(--lg-accent-hover));
}

body.liquid-glass .cell-actions .btn-copy:hover {
  box-shadow: 0 4px 12px rgba(0,122,255,0.3);
}

body.liquid-glass .cell-actions .btn-view {
  background: linear-gradient(135deg, var(--lg-green), #28a745);
}

body.liquid-glass .cell-actions .btn-view:hover {
  box-shadow: 0 4px 12px rgba(52,199,89,0.3);
}

body.liquid-glass .cell-actions .btn-del {
  background: linear-gradient(135deg, var(--lg-red), #dc3545);
}

body.liquid-glass .cell-actions .btn-del:hover {
  box-shadow: 0 4px 12px rgba(255,59,48,0.3);
}

body.liquid-glass #html-table-empty svg {
  color: var(--lg-text-muted);
}

body.liquid-glass #html-table-empty p {
  color: var(--lg-text-secondary);
}

body.liquid-glass #html-table-empty button {
  background: var(--lg-accent);
}

body.liquid-glass #html-table-empty button:hover {
  background: var(--lg-accent-hover);
  box-shadow: 0 4px 12px rgba(0,122,255,0.3);
}
