/* ===== 动画效果 ===== */
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-50px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

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

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

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

@keyframes bounce {
  0%, 20%, 53%, 80%, 100% {
    transform: translate3d(0,0,0);
  }
  40%, 43% {
    transform: translate3d(0, -8px, 0);
  }
  70% {
    transform: translate3d(0, -4px, 0);
  }
  90% {
    transform: translate3d(0, -2px, 0);
  }
}

@keyframes shimmer {
  0% {
    background-position: -200px 0;
  }
  100% {
    background-position: calc(200px + 100%) 0;
  }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes glow {
  0%, 100% {
    box-shadow: 0 0 5px rgba(139, 92, 246, 0.3);
  }
  50% {
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.6), 0 0 30px rgba(139, 92, 246, 0.4);
  }
}

/* ===== 基础样式 ===== */
body {
  font-family: 'Inter', system-ui, sans-serif;
  margin: 0;
  background: #f9fafb;
  color: #111827;
}

/* ===== 导航栏样式 ===== */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: white;
  border-bottom: 1px solid #e5e7eb;
  padding: 0.75rem 1.5rem;
  position: sticky;
  top: 0;
  z-index: 50;
}

.navbar h1 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #2563eb;
}

.nav-links {
  display: flex;
  gap: 1rem;
}

.nav-links a {
  text-decoration: none;
  color: #374151;
  padding: 0.5rem 0.75rem;
  border-radius: 0.375rem;
  transition: background 0.2s, color 0.2s;
}

.nav-links a:hover {
  background: #eff6ff;
  color: #1d4ed8;
}

.nav-links a.active {
  background: #2563eb;
  color: white;
}

/* ===== 容器样式 ===== */
.container {
  max-width: 900px;
  margin: 2rem auto;
  padding: 1.5rem;
  background: white;
  border-radius: 1rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

/* ===== 加载页面样式 ===== */
.loading-page {
  font-family: 'Inter', system-ui, sans-serif;
  /* background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); */
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  overflow: hidden;
}

.loading-container {
  text-align: center;
  max-width: 400px;
  padding: 2rem;
}

.loading-logo {
  margin-bottom: 3rem;
}

.logo-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 1rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.logo-icon svg {
  width: 40px;
  height: 40px;
  color: white;
}

.logo-text {
  font-size: 2.5rem;
  font-weight: 700;
  margin: 0;
  background: linear-gradient(45deg, #fff, #e0e7ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.loading-content {
  margin-bottom: 3rem;
}

.loader {
  border: 4px solid rgba(255, 255, 255, 0.2);
  border-top: 4px solid white;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  animation: spin 1s linear infinite;
  margin: 0 auto 1.5rem;
}

.loading-text {
  font-size: 1.1rem;
  margin: 0 0 1rem;
  opacity: 0.9;
  font-weight: 500;
}

.loading-dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
}

.loading-dots span {
  width: 8px;
  height: 8px;
  background: white;
  border-radius: 50%;
  animation: pulse 1.5s ease-in-out infinite;
}

.loading-dots span:nth-child(2) {
  animation-delay: 0.2s;
}

.loading-dots span:nth-child(3) {
  animation-delay: 0.4s;
}

.loading-footer {
  opacity: 0.7;
}

.loading-tip {
  font-size: 0.9rem;
  margin: 0;
  font-weight: 400;
}

@keyframes pulse {
  0%, 100% {
    opacity: 0.3;
    transform: scale(0.8);
  }
  50% {
    opacity: 1;
    transform: scale(1);
  }
}

/* ===== 规则配置卡片样式 ===== */
.rule-config-card {
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  padding: 1.5rem;
  margin-bottom: 1rem;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.rule-config-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  border-color: #3b82f6;
}

.rule-config-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #3b82f6, #8b5cf6, #06b6d4);
  border-radius: 1rem 1rem 0 0;
}

.rule-config-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #e2e8f0;
}

.rule-config-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.rule-config-icon {
  width: 24px;
  height: 24px;
  color: #3b82f6;
}

.rule-config-remove {
  background: none;
  border: none;
  color: #ef4444;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 0.375rem;
  transition: all 0.2s ease;
}

.rule-config-remove:hover {
  background: #fee2e2;
  transform: scale(1.1);
}

.rule-config-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 768px) {
  .rule-config-form {
    grid-template-columns: 1fr 1fr;
  }
}

.rule-config-field {
  display: flex;
  flex-direction: column;
}

.rule-config-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: #475569;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.rule-config-input {
  padding: 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  transition: all 0.2s ease;
  background: white;
}

.rule-config-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.rule-config-textarea {
  grid-column: 1 / -1;
  min-height: 80px;
  resize: vertical;
}

.rule-config-textarea.rule-config-input {
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 0.8rem;
}

/* 自定义参数（JSON）只读展示优化 */
.rule-config-json {
  background: #0b1020;
  color: #e2e8f0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.85rem;
  line-height: 1.6;
  border: 1px solid #1f2937;
  border-radius: 0.5rem;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
  opacity: 0.9;
  cursor: not-allowed;
}

.rule-config-json::placeholder {
  color: #94a3b8;
}

/* ===== 规则选择器样式 ===== */
.rule-picker-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 50;
  backdrop-filter: blur(4px);
}

.rule-picker-content {
  background: white;
  border-radius: 1.5rem;
  width: 100%;
  max-width: 5xl;
  max-height: 85vh;
  overflow: hidden;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
  animation: modalSlideIn 0.3s ease-out;
}

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

.rule-picker-header {
  padding: 1.5rem;
  border-bottom: 1px solid #e5e7eb;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

.rule-picker-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.rule-picker-subtitle {
  color: #64748b;
  margin: 0.5rem 0 0;
  font-size: 0.9rem;
}

.rule-picker-filters {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid #e5e7eb;
  background: #f8fafc;
  display: flex;
  gap: 1rem;
  align-items: center;
}

.rule-picker-search {
  flex: 1;
  padding: 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  font-size: 0.875rem;
}

.rule-picker-select {
  padding: 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  background: white;
  font-size: 0.875rem;
  min-width: 120px;
}

.rule-picker-grid {
  padding: 1.5rem;
  max-height: 400px;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
}

.rule-template-card {
  border: 2px solid #e5e7eb;
  border-radius: 0.75rem;
  padding: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  background: white;
  position: relative;
}

.rule-template-card:hover {
  border-color: #3b82f6;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.rule-template-card.selected {
  border-color: #3b82f6;
  background: #eff6ff;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.rule-template-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.rule-template-name {
  font-weight: 600;
  color: #1e293b;
  font-size: 0.95rem;
}

.rule-template-id {
  background: #f1f5f9;
  color: #475569;
  padding: 0.25rem 0.5rem;
  border-radius: 0.375rem;
  font-size: 0.75rem;
  font-family: monospace;
}

.rule-template-details {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.rule-template-detail {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: #64748b;
}

.rule-template-badge {
  padding: 0.25rem 0.5rem;
  border-radius: 0.375rem;
  font-size: 0.75rem;
  font-weight: 500;
}

.rule-template-badge.platform {
  background: #e0e7ff;
  color: #3730a3;
}

.rule-template-badge.match {
  background: #dcfce7;
  color: #166534;
}

.rule-template-badge.redirect {
  background: #fef3c7;
  color: #92400e;
}

.rule-picker-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid #e5e7eb;
  background: #f8fafc;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.rule-picker-selected {
  color: #64748b;
  font-size: 0.875rem;
}

.rule-picker-actions {
  display: flex;
  gap: 0.75rem;
}

/* 规则选择器加载状态 */
.rule-picker-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  text-align: center;
}

.rule-picker-loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #e5e7eb;
  border-top: 3px solid #3b82f6;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 1rem;
}

.rule-picker-loading-text {
  color: #6b7280;
  font-size: 0.875rem;
  margin: 0;
}

/* 规则选择器空状态 */
.rule-picker-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  text-align: center;
}

.rule-picker-empty-icon {
  width: 64px;
  height: 64px;
  color: #d1d5db;
  margin-bottom: 1rem;
}

.rule-picker-empty-icon svg {
  width: 100%;
  height: 100%;
}

.rule-picker-empty-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: #374151;
  margin: 0 0 0.5rem 0;
}

.rule-picker-empty-subtitle {
  color: #6b7280;
  font-size: 0.875rem;
  margin: 0;
}

/* ===== 工具提示样式 ===== */
.rule-tooltip {
  position: fixed;
  z-index: 9999;
  background: white;
  border-radius: 0.75rem;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
  border: 1px solid #e5e7eb;
  padding: 1rem;
  width: 320px;
  max-width: 90vw;
  animation: tooltipFadeIn 0.2s ease-out;
  opacity: 1;
  visibility: visible;
}

@keyframes tooltipFadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.rule-tooltip-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #e5e7eb;
}

.rule-tooltip-close {
  background: none;
  border: none;
  color: #64748b;
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 0.25rem;
  transition: all 0.2s ease;
}

.rule-tooltip-close:hover {
  background: #f1f5f9;
  color: #1e293b;
}

.rule-tooltip-close svg {
  width: 16px;
  height: 16px;
}

.rule-tooltip-title {
  font-weight: 600;
  color: #1e293b;
  font-size: 0.95rem;
}

.rule-tooltip-content {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.rule-tooltip-item {
  background: #f8fafc;
  padding: 0.75rem;
  border-radius: 0.5rem;
  border: 1px solid #e2e8f0;
}

.rule-tooltip-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.rule-tooltip-item-name {
  font-weight: 600;
  color: #1e293b;
  font-size: 0.9rem;
}

.rule-tooltip-item-id {
  background: #3b82f6;
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 0.375rem;
  font-size: 0.75rem;
  font-weight: 500;
}

.rule-tooltip-item-details {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.rule-tooltip-item-detail {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.rule-tooltip-item-label {
  font-weight: 500;
  color: #64748b;
  font-size: 0.8rem;
}

.rule-tooltip-item-value {
  color: #1e293b;
  font-size: 0.8rem;
  word-break: break-all;
}

.rule-tooltip-label {
  font-weight: 500;
  color: #475569;
  font-size: 0.8rem;
  margin-bottom: 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.rule-tooltip-value {
  color: #1e293b;
  font-size: 0.85rem;
  word-break: break-all;
}

.rule-tooltip-id {
  background: #3b82f6;
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 0.375rem;
  font-size: 0.75rem;
  font-weight: 500;
}

.rule-tooltip-json {
  background: #f1f5f9;
  padding: 0.5rem;
  border-radius: 0.375rem;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 0.75rem;
  color: #475569;
  max-height: 80px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-all;
}

/* ===== 通用按钮样式 ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-weight: 500;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-primary {
  background-color: #3b82f6;
  color: white;
}

.btn-primary:hover {
  background-color: #2563eb;
}

.btn-secondary {
  background-color: #6b7280;
  color: white;
}

.btn-secondary:hover {
  background-color: #4b5563;
}

.btn-success {
  background-color: #10b981;
  color: white;
}

.btn-success:hover {
  background-color: #059669;
}

.btn-danger {
  background-color: #ef4444;
  color: white;
}

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

.btn-sm {
  padding: 0.25rem 0.5rem;
  font-size: 0.875rem;
}

.btn-lg {
  padding: 0.75rem 1.5rem;
  font-size: 1.125rem;
}

/* ===== 表单样式 ===== */
.form-group {
  margin-bottom: 1rem;
}

.form-label {
  display: block;
  font-weight: 500;
  color: #374151;
  margin-bottom: 0.25rem;
}

.form-input {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  font-size: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-select {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  background-color: white;
  font-size: 1rem;
  cursor: pointer;
}

.form-textarea {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  font-size: 1rem;
  resize: vertical;
  min-height: 100px;
}

/* ===== 卡片样式 ===== */
.card {
  background: white;
  border-radius: 0.75rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.card-header {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid #e5e7eb;
  background-color: #f9fafb;
}

.card-body {
  padding: 1.5rem;
}

.card-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid #e5e7eb;
  background-color: #f9fafb;
}

/* ===== 徽章样式 ===== */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 0.375rem;
}

.badge-primary {
  background-color: #dbeafe;
  color: #1e40af;
}

.badge-success {
  background-color: #d1fae5;
  color: #065f46;
}

.badge-warning {
  background-color: #fef3c7;
  color: #92400e;
}

.badge-danger {
  background-color: #fee2e2;
  color: #991b1b;
}

.badge-info {
  background-color: #e0f2fe;
  color: #0c4a6e;
}

/* ===== 网格布局 ===== */
.grid {
  display: grid;
  gap: 1rem;
}

.grid-cols-1 {
  grid-template-columns: repeat(1, minmax(0, 1fr));
}

.grid-cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (min-width: 768px) {
  .md\:grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .md\:grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* ===== 工具类 ===== */
.text-center {
  text-align: center;
}

.text-left {
  text-align: left;
}

.text-right {
  text-align: right;
}

.font-bold {
  font-weight: 700;
}

.font-semibold {
  font-weight: 600;
}

.font-medium {
  font-weight: 500;
}

.text-sm {
  font-size: 0.875rem;
}

.text-lg {
  font-size: 1.125rem;
}

.text-xl {
  font-size: 1.25rem;
}

.text-2xl {
  font-size: 1.5rem;
}

.text-3xl {
  font-size: 1.875rem;
}

.text-gray-500 {
  color: #6b7280;
}

.text-gray-600 {
  color: #4b5563;
}

.text-gray-700 {
  color: #374151;
}

.text-gray-800 {
  color: #1f2937;
}

.text-blue-600 {
  color: #2563eb;
}

.text-green-600 {
  color: #059669;
}

.text-red-600 {
  color: #dc2626;
}

.text-purple-600 {
  color: #9333ea;
}

.mb-1 {
  margin-bottom: 0.25rem;
}

.mb-2 {
  margin-bottom: 0.5rem;
}

.mb-3 {
  margin-bottom: 0.75rem;
}

.mb-4 {
  margin-bottom: 1rem;
}

.mb-6 {
  margin-bottom: 1.5rem;
}

.mb-8 {
  margin-bottom: 2rem;
}

.mt-1 {
  margin-top: 0.25rem;
}

.mt-2 {
  margin-top: 0.5rem;
}

.mt-3 {
  margin-top: 0.75rem;
}

.mt-4 {
  margin-top: 1rem;
}

.mt-6 {
  margin-top: 1.5rem;
}

.mt-8 {
  margin-top: 2rem;
}

.p-2 {
  padding: 0.5rem;
}

.p-3 {
  padding: 0.75rem;
}

.p-4 {
  padding: 1rem;
}

.p-6 {
  padding: 1.5rem;
}

.px-2 {
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}

.px-3 {
  padding-left: 0.75rem;
  padding-right: 0.75rem;
}

.px-4 {
  padding-left: 1rem;
  padding-right: 1rem;
}

.px-6 {
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.py-1 {
  padding-top: 0.25rem;
  padding-bottom: 0.25rem;
}

.py-2 {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.py-3 {
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.py-4 {
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.py-6 {
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
}

.py-8 {
  padding-top: 2rem;
  padding-bottom: 2rem;
}

.py-10 {
  padding-top: 2.5rem;
  padding-bottom: 2.5rem;
}

.rounded {
  border-radius: 0.25rem;
}

.rounded-lg {
  border-radius: 0.5rem;
}

.rounded-xl {
  border-radius: 0.75rem;
}

.shadow {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
}

.shadow-md {
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07), 0 2px 4px rgba(0, 0, 0, 0.06);
}

.shadow-lg {
  box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1), 0 4px 6px rgba(0, 0, 0, 0.05);
}

.border {
  border: 1px solid #e5e7eb;
}

.border-gray-200 {
  border-color: #e5e7eb;
}

.border-gray-300 {
  border-color: #d1d5db;
}

.bg-white {
  background-color: white;
}

.bg-gray-50 {
  background-color: #f9fafb;
}

.bg-gray-100 {
  background-color: #f3f4f6;
}

.bg-blue-100 {
  background-color: #dbeafe;
}

.bg-green-100 {
  background-color: #d1fae5;
}

.bg-red-100 {
  background-color: #fee2e2;
}

.bg-purple-100 {
  background-color: #e9d5ff;
}

.bg-orange-100 {
  background-color: #fed7aa;
}

.hover\:bg-gray-50:hover {
  background-color: #f9fafb;
}

.hover\:bg-blue-200:hover {
  background-color: #bfdbfe;
}

.hover\:bg-green-200:hover {
  background-color: #a7f3d0;
}

.hover\:bg-red-200:hover {
  background-color: #fecaca;
}

.hover\:bg-purple-200:hover {
  background-color: #ddd6fe;
}

.hover\:bg-orange-200:hover {
  background-color: #fed7aa;
}

.hover\:bg-gray-200:hover {
  background-color: #e5e7eb;
}

.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.items-center {
  align-items: center;
}

.justify-center {
  justify-content: center;
}

.justify-between {
  justify-content: space-between;
}

.justify-start {
  justify-content: flex-start;
}

.justify-end {
  justify-content: flex-end;
}

.space-x-2 > * + * {
  margin-left: 0.5rem;
}

.space-x-4 > * + * {
  margin-left: 1rem;
}

.space-y-2 > * + * {
  margin-top: 0.5rem;
}

.space-y-4 > * + * {
  margin-top: 1rem;
}

.gap-2 {
  gap: 0.5rem;
}

.gap-3 {
  gap: 0.75rem;
}

.gap-4 {
  gap: 1rem;
}

.w-full {
  width: 100%;
}

.max-w-3xl {
  max-width: 48rem;
}

.max-w-4xl {
  max-width: 56rem;
}

.max-h-48 {
  max-height: 12rem;
}

.max-h-64 {
  max-height: 16rem;
}

.overflow-auto {
  overflow: auto;
}

.overflow-hidden {
  overflow: hidden;
}

.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cursor-pointer {
  cursor: pointer;
}

.transition {
  transition: all 0.2s ease;
}

.transition-colors {
  transition: color 0.2s ease, background-color 0.2s ease;
}

.relative {
  position: relative;
}

.absolute {
  position: absolute;
}

.fixed {
  position: fixed;
}

.inset-0 {
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
}

.z-20 {
  z-index: 20;
}

.z-40 {
  z-index: 40;
}

.z-50 {
  z-index: 50;
}

/* ===== 响应式设计 ===== */
@media (max-width: 768px) {
  .container {
    margin: 1rem;
    padding: 1rem;
  }

  .navbar {
    padding: 0.5rem 1rem;
  }

  .nav-links {
    gap: 0.5rem;
  }

  .nav-links a {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
  }
}

/* 菜单页面样式 */
.menu-page {
  font-family: 'Inter', system-ui, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  color: white;
  overflow-x: hidden;
}

.menu-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.menu-app {
  width: 100%;
  text-align: center;
}

.menu-content {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
}

.menu-header {
  text-align: center;
  margin-bottom: 3rem;
}

.menu-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  gap: 1rem;
}

.menu-logo-icon {
  width: 4rem;
  height: 4rem;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.menu-logo-icon svg {
  width: 2rem;
  height: 2rem;
  color: white;
}

.menu-title {
  font-size: 3.5rem;
  font-weight: 800;
  margin: 0;
  background: linear-gradient(45deg, #ffffff, #e0e7ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.menu-subtitle {
  font-size: 1.25rem;
  color: rgba(255, 255, 255, 0.9);
  margin: 0;
  font-weight: 400;
}

.menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
  max-width: 800px;
  margin: 0 auto 3rem;
}

.menu-card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 1.5rem;
  padding: 2.5rem;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.menu-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #667eea, #764ba2);
  border-radius: 1.5rem 1.5rem 0 0;
}

.menu-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
  background: rgba(255, 255, 255, 0.15);
}

.menu-card-rule:hover {
  box-shadow: 0 25px 50px rgba(99, 102, 241, 0.3);
}

.menu-card-link:hover {
  box-shadow: 0 25px 50px rgba(59, 130, 246, 0.3);
}

.menu-card-content {
  text-align: center;
  position: relative;
  z-index: 1;
}

.menu-card-icon {
  width: 4rem;
  height: 4rem;
  border-radius: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  transition: all 0.3s ease;
}

.menu-card-icon-rule {
  background: linear-gradient(135deg, #8b5cf6, #a855f7);
  box-shadow: 0 8px 25px rgba(139, 92, 246, 0.3);
}

.menu-card-icon-link {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  box-shadow: 0 8px 25px rgba(59, 130, 246, 0.3);
}

.menu-card:hover .menu-card-icon {
  transform: scale(1.1) rotate(5deg);
}

.menu-card-icon svg {
  width: 2rem;
  height: 2rem;
  color: white;
}

.menu-card-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0 0 1rem 0;
  color: white;
}

.menu-card-description {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.8);
  margin: 0 0 2rem 0;
  line-height: 1.6;
}

.menu-card-button {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(255, 255, 255, 0.2);
  color: white;
  padding: 1rem 2rem;
  border-radius: 0.75rem;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(10px);
}

.menu-card-button:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.menu-card-arrow {
  width: 1.25rem;
  height: 1.25rem;
  transition: transform 0.3s ease;
}

.menu-card-button:hover .menu-card-arrow {
  transform: translateX(4px);
}

.menu-footer {
  text-align: center;
  margin-top: 3rem;
}

.menu-info-card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 1rem;
  padding: 2rem;
  max-width: 600px;
  margin: 0 auto;
}

.menu-info-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: white;
  margin: 0 0 1.5rem 0;
}

.menu-info-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.menu-info-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  text-align: left;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.95rem;
  line-height: 1.5;
}

.menu-info-dot {
  width: 6px;
  height: 6px;
  background: linear-gradient(45deg, #8b5cf6, #3b82f6);
  border-radius: 50%;
  margin-top: 0.5rem;
  flex-shrink: 0;
}

/* 菜单页面响应式设计 */
@media (max-width: 768px) {
  .menu-container {
    padding: 1rem 0.5rem;
  }

  .menu-title {
    font-size: 2.5rem;
  }

  .menu-subtitle {
    font-size: 1.1rem;
  }

  .menu-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .menu-card {
    padding: 2rem;
  }

  .menu-logo {
    flex-direction: column;
    gap: 0.5rem;
  }

  .menu-logo-icon {
    width: 3rem;
    height: 3rem;
  }

  .menu-logo-icon svg {
    width: 1.5rem;
    height: 1.5rem;
  }
}

/* 规则管理页面样式 */
.rule-page {
  font-family: 'Inter', system-ui, sans-serif;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  min-height: 100vh;
  color: #1f2937;
}

.rule-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.rule-app {
  width: 100%;
}

.rule-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 2rem;
  padding: 2rem;
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border-radius: 1.5rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.8);
}

.rule-title-section {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.rule-title-icon {
  width: 3rem;
  height: 3rem;
  background: linear-gradient(135deg, #8b5cf6, #a855f7);
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 25px rgba(139, 92, 246, 0.3);
}

.rule-title-icon svg {
  width: 1.5rem;
  height: 1.5rem;
  color: white;
}

.rule-title {
  font-size: 2rem;
  font-weight: 700;
  margin: 0;
  background: linear-gradient(135deg, #1f2937, #4b5563);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.rule-subtitle {
  font-size: 1rem;
  color: #6b7280;
  margin: 0.25rem 0 0 0;
  font-weight: 400;
}

.rule-actions {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.rule-count {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  background: linear-gradient(135deg, #e0e7ff, #c7d2fe);
  border-radius: 0.75rem;
  border: 1px solid #a5b4fc;
}

.rule-count-number {
  font-size: 1.5rem;
  font-weight: 700;
  color: #3730a3;
}

.rule-count-label {
  font-size: 0.875rem;
  color: #5b21b6;
  font-weight: 500;
}

.rule-add-button {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, #8b5cf6, #a855f7);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 0.75rem;
  border: none;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.rule-add-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(139, 92, 246, 0.4);
}

.rule-add-button svg {
  width: 1.25rem;
  height: 1.25rem;
}

/* 规则表单样式 */
.rule-form-card {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border-radius: 1.5rem;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.8);
  position: relative;
  overflow: hidden;
}

.rule-form-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #8b5cf6, #a855f7);
  border-radius: 1.5rem 1.5rem 0 0;
}

.rule-form-header {
  margin-bottom: 2rem;
  text-align: center;
}

.rule-form-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.rule-form-icon {
  width: 1.5rem;
  height: 1.5rem;
  color: #8b5cf6;
}

.rule-form-title h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1f2937;
  margin: 0;
}

.rule-form-subtitle {
  color: #6b7280;
  font-size: 1rem;
  margin: 0;
}

.rule-form-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.rule-form-field {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.rule-form-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: #374151;
  font-size: 0.95rem;
}

.rule-form-label-icon {
  width: 1.25rem;
  height: 1.25rem;
  color: #8b5cf6;
}

.rule-form-input,
.rule-form-select {
  padding: 0.875rem 1rem;
  border: 2px solid #e5e7eb;
  border-radius: 0.75rem;
  font-size: 1rem;
  transition: all 0.3s ease;
  background: white;
}

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

.rule-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
}

/* 下拉选择器样式 */
.rule-form-dropdown {
  position: relative;
}

.rule-form-dropdown-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.875rem 1rem;
  border: 2px solid #e5e7eb;
  border-radius: 0.75rem;
  background: white;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 100%;
  font-size: 1rem;
  color: #374151;
}

.rule-form-dropdown-toggle:hover {
  border-color: #8b5cf6;
}

.rule-form-dropdown-icon {
  width: 1.25rem;
  height: 1.25rem;
  color: #9ca3af;
  transition: transform 0.3s ease;
}

.rule-form-dropdown-open .rule-form-dropdown-icon {
  transform: rotate(180deg);
}

.rule-form-dropdown-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.875rem 1rem;
  border: 2px solid #e5e7eb;
  border-radius: 0.75rem;
  background: white;
  cursor: pointer;
  transition: all 0.3s ease;
}

.rule-form-dropdown-trigger:hover {
  border-color: #8b5cf6;
}

.rule-form-dropdown-text {
  color: #374151;
  font-size: 1rem;
}

.rule-form-dropdown-arrow {
  width: 1.25rem;
  height: 1.25rem;
  color: #9ca3af;
  transition: transform 0.3s ease;
}

.rule-form-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 2px solid #e5e7eb;
  border-radius: 0.75rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  z-index: 50;
  margin-top: 0.5rem;
  max-height: 12rem;
  overflow-y: auto;
}

.rule-form-dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.rule-form-dropdown-item:hover {
  background-color: #f3f4f6;
}

.rule-form-dropdown-item-selected {
  background-color: #ede9fe;
  color: #8b5cf6;
  font-weight: 600;
}

.rule-form-dropdown-item-selected:hover {
  background-color: #ddd6fe;
}

.rule-form-checkbox {
  width: 1rem;
  height: 1rem;
  accent-color: #8b5cf6;
}

.rule-form-dropdown-item-text {
  color: #374151;
  font-size: 0.95rem;
}

/* 快捷选择按钮样式 */
.rule-form-quick-select {
  margin-top: 1rem;
}

.rule-form-quick-select-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: #6b7280;
  margin-bottom: 0.75rem;
}

.rule-form-quick-select-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.rule-form-quick-btn {
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  border: 1px solid;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.rule-form-quick-btn-asia {
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  border-color: #f59e0b;
  color: #92400e;
}

.rule-form-quick-btn-europe {
  background: linear-gradient(135deg, #d1fae5, #a7f3d0);
  border-color: #10b981;
  color: #065f46;
}

.rule-form-quick-btn-america {
  background: linear-gradient(135deg, #dbeafe, #bfdbfe);
  border-color: #3b82f6;
  color: #1e40af;
}

.rule-form-quick-btn-oceania {
  background: linear-gradient(135deg, #fce7f3, #fbcfe8);
  border-color: #ec4899;
  color: #be185d;
}

.rule-form-quick-btn-clear {
  background: linear-gradient(135deg, #fee2e2, #fecaca);
  border-color: #ef4444;
  color: #991b1b;
}

.rule-form-quick-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* 表单提交按钮 */
.rule-form-actions {
  margin-top: 2rem;
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  padding-top: 1.5rem;
  border-top: 1px solid #e5e7eb;
}

/* 编辑表单样式 - 使用与新增规则相同的样式 */

.rule-form-cancel {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, #6b7280, #4b5563);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 0.75rem;
  border: none;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(107, 114, 128, 0.3);
}

.rule-form-cancel:hover {
  background: linear-gradient(135deg, #4b5563, #374151);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(107, 114, 128, 0.4);
}

.rule-form-cancel-icon {
  width: 1.25rem;
  height: 1.25rem;
}

.rule-form-submit {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, #8b5cf6, #a855f7);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 0.75rem;
  border: none;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.rule-form-submit:hover {
  background: linear-gradient(135deg, #7c3aed, #9333ea);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4);
}

.rule-form-submit-icon {
  width: 1.25rem;
  height: 1.25rem;
}

/* 自定义参数配置样式 */
.rule-form-custom-params {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.5rem;
  margin-top: 0.5rem;
}

.rule-form-custom-params-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.rule-form-custom-params-desc {
  color: #64748b;
  font-size: 0.875rem;
  margin: 0;
  flex: 1;
  margin-right: 1rem;
}

.rule-form-add-param {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.rule-form-add-param:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

.rule-form-add-param svg {
  width: 1rem;
  height: 1rem;
}

.rule-form-custom-params-empty {
  text-align: center;
  padding: 2rem;
  color: #94a3b8;
}

.rule-form-custom-params-empty svg {
  width: 3rem;
  height: 3rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.rule-form-custom-params-empty p {
  margin: 0;
  font-size: 0.875rem;
}

.rule-form-custom-params-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.rule-form-custom-param-item {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 1rem;
  transition: all 0.3s ease;
}

.rule-form-custom-param-item:hover {
  border-color: #3b82f6;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.1);
}

.rule-form-custom-param-content {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 1rem;
  align-items: end;
}

.rule-form-custom-param-field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.rule-form-custom-param-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #374151;
  margin: 0;
}

.rule-form-custom-param-input {
  padding: 0.5rem 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 0.875rem;
  transition: all 0.3s ease;
  background: white;
}

.rule-form-custom-param-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.rule-form-custom-param-actions {
  display: flex;
  align-items: center;
}

.rule-form-custom-param-remove {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  background: #ef4444;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.rule-form-custom-param-remove:hover {
  background: #dc2626;
  transform: scale(1.05);
}

.rule-form-custom-param-remove svg {
  width: 1rem;
  height: 1rem;
}

.rule-form-custom-param-error {
  color: #ef4444;
  font-size: 0.75rem;
  margin-top: 0.5rem;
  padding: 0.25rem 0.5rem;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 4px;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .rule-form-custom-param-content {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .rule-form-custom-params-header {
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
  }

  .rule-form-add-param {
    width: 100%;
    justify-content: center;
  }
}

/* 规则列表样式 */
.rule-list-card {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border-radius: 1.5rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.8);
  overflow: hidden;
}

.rule-list-header {
  padding: 1.5rem 2rem;
  background: linear-gradient(135deg, #f8fafc, #e2e8f0);
  border-bottom: 1px solid #e5e7eb;
}

.rule-list-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.rule-list-icon {
  width: 1.5rem;
  height: 1.5rem;
  color: #8b5cf6;
}

.rule-list-title h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1f2937;
  margin: 0;
}

.rule-list-content {
  padding: 2rem;
}

.rule-list-loading {
  text-align: center;
  padding: 3rem 0;
}

.rule-list-loading-spinner {
  width: 3rem;
  height: 3rem;
  border: 3px solid #e5e7eb;
  border-top: 3px solid #8b5cf6;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 1rem;
}

.rule-list-loading-text {
  color: #6b7280;
  font-size: 1rem;
  margin: 0;
}

.rule-list-empty {
  text-align: center;
  padding: 3rem 0;
}

.rule-list-empty-icon {
  width: 4rem;
  height: 4rem;
  margin: 0 auto 1.5rem;
  color: #9ca3af;
}

.rule-list-empty-icon svg {
  width: 100%;
  height: 100%;
}

.rule-list-empty-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #374151;
  margin: 0 0 0.5rem 0;
}

.rule-list-empty-subtitle {
  color: #6b7280;
  font-size: 1rem;
  margin: 0;
}

/* 规则项样式 */
.rule-list-items {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.rule-item {
  background: linear-gradient(135deg, #ffffff, #f8fafc);
  border: 1px solid #e5e7eb;
  border-radius: 1rem;
  padding: 1.5rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.rule-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #8b5cf6, #a855f7);
}

.rule-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  border-color: #8b5cf6;
}

.rule-item-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.5rem;
}

.rule-item-title-section {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.rule-item-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1f2937;
  margin: 0;
}

.rule-item-id {
  background: linear-gradient(135deg, #dbeafe, #bfdbfe);
  color: #1e40af;
  padding: 0.25rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid #93c5fd;
}

.rule-item-actions {
  display: flex;
  gap: 0.75rem;
}

.rule-item-action {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  border: 1px solid;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.rule-item-action svg {
  width: 1rem;
  height: 1rem;
}

.rule-item-action-edit {
  background: linear-gradient(135deg, #dbeafe, #bfdbfe);
  border-color: #3b82f6;
  color: #1e40af;
}

.rule-item-action-edit:hover {
  background: linear-gradient(135deg, #bfdbfe, #93c5fd);
  transform: translateY(-1px);
}

.rule-item-action-delete {
  background: linear-gradient(135deg, #fee2e2, #fecaca);
  border-color: #ef4444;
  color: #991b1b;
}

.rule-item-action-delete:hover {
  background: linear-gradient(135deg, #fecaca, #fca5a5);
  transform: translateY(-1px);
}

.rule-item-content {
  margin-top: 1rem;
}

.rule-item-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
}

.rule-item-detail {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: rgba(139, 92, 246, 0.05);
  border-radius: 0.5rem;
  border: 1px solid rgba(139, 92, 246, 0.1);
}

.rule-item-detail-icon {
  width: 1.25rem;
  height: 1.25rem;
  color: #8b5cf6;
  flex-shrink: 0;
}

.rule-item-detail-icon svg {
  width: 100%;
  height: 100%;
}

.rule-item-detail-content {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
}

.rule-item-detail-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.rule-item-detail-value {
  font-size: 0.875rem;
  font-weight: 600;
  color: #374151;
}

.rule-item-detail-badge {
  padding: 0.25rem 0.75rem;
  border-radius: 0.375rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-align: center;
  min-width: 3rem;
}

.rule-item-detail-badge-platform {
  background: linear-gradient(135deg, #e9d5ff, #d8b4fe);
  color: #7c3aed;
  border: 1px solid #c4b5fd;
}

.rule-item-detail-badge-success {
  background: linear-gradient(135deg, #d1fae5, #a7f3d0);
  color: #065f46;
  border: 1px solid #6ee7b7;
}

.rule-item-detail-badge-danger {
  background: linear-gradient(135deg, #fee2e2, #fecaca);
  color: #991b1b;
  border: 1px solid #fca5a5;
}

/* JSON 操作样式 */
.rule-json-actions {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
}

.rule-json-button {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  border-radius: 0.75rem;
  border: none;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  flex: 1;
  justify-content: center;
}

.rule-json-icon {
  width: 1.25rem;
  height: 1.25rem;
}

.rule-json-button-toggle {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.rule-json-button-toggle:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
}

.rule-json-button-upload {
  background: linear-gradient(135deg, #8b5cf6, #a855f7);
  color: white;
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.rule-json-button-upload:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(139, 92, 246, 0.4);
}

.rule-json-panel {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border-radius: 1.5rem;
  padding: 2rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.8);
}

.rule-json-header {
  margin-bottom: 1.5rem;
  text-align: center;
}

.rule-json-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1f2937;
  margin: 0 0 0.5rem 0;
}

.rule-json-subtitle {
  color: #6b7280;
  font-size: 1rem;
  margin: 0;
}

.rule-json-content {
  background: #1f2937;
  border-radius: 0.75rem;
  padding: 1.5rem;
  overflow-x: auto;
}

.rule-json-code {
  color: #e5e7eb;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 0.875rem;
  line-height: 1.5;
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
}

/* 规则页面响应式设计 */
@media (max-width: 768px) {
  .rule-container {
    padding: 1rem 0.5rem;
  }

  .rule-header {
    flex-direction: column;
    gap: 1.5rem;
    padding: 1.5rem;
  }

  .rule-title-section {
    flex-direction: column;
    text-align: center;
    gap: 0.75rem;
  }

  .rule-title {
    font-size: 1.5rem;
  }

  .rule-actions {
    flex-direction: column;
    gap: 1rem;
    width: 100%;
  }

  .rule-form-grid {
    grid-template-columns: 1fr;
  }

  .rule-item-details {
    grid-template-columns: 1fr;
  }

  .rule-item-header {
    flex-direction: column;
    gap: 1rem;
  }

  .rule-item-actions {
    width: 100%;
    justify-content: center;
  }

  .rule-json-actions {
    flex-direction: column;
  }
}

/* 链接管理页面样式 */
.link-page {
  font-family: 'Inter', system-ui, sans-serif;
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  min-height: 100vh;
  color: #1f2937;
}

.link-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.link-app {
  width: 100%;
}

.link-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 2rem;
  padding: 2rem;
  background: linear-gradient(135deg, #ffffff 0%, #f0f9ff 100%);
  border-radius: 1.5rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.8);
}

.link-title-section {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.link-title-icon {
  width: 3rem;
  height: 3rem;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 25px rgba(59, 130, 246, 0.3);
}

.link-title-icon svg {
  width: 1.5rem;
  height: 1.5rem;
  color: white;
}

.link-title {
  font-size: 2rem;
  font-weight: 700;
  margin: 0;
  background: linear-gradient(135deg, #1f2937, #4b5563);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.link-subtitle {
  font-size: 1rem;
  color: #6b7280;
  margin: 0.25rem 0 0 0;
  font-weight: 400;
}

.link-actions {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.link-count {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  background: linear-gradient(135deg, #dbeafe, #bfdbfe);
  border-radius: 0.75rem;
  border: 1px solid #93c5fd;
}

.link-count-number {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1e40af;
}

.link-count-label {
  font-size: 0.875rem;
  color: #1e3a8a;
  font-weight: 500;
}

.link-create-button {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 0.75rem;
  border: none;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.link-create-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
}

.link-create-button svg {
  width: 1.25rem;
  height: 1.25rem;
}

/* 链接列表样式 */
.link-list-card {
  background: linear-gradient(135deg, #ffffff 0%, #f0f9ff 100%);
  border-radius: 1.5rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.8);
  overflow: hidden;
}

.link-list-header {
  padding: 1.5rem 2rem;
  background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
  border-bottom: 1px solid #e5e7eb;
}

.link-list-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.link-list-icon {
  width: 1.5rem;
  height: 1.5rem;
  color: #3b82f6;
}

.link-list-title h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1f2937;
  margin: 0;
}

.link-list-content {
  padding: 2rem;
}

.link-list-loading {
  text-align: center;
  padding: 3rem 0;
}

.link-list-loading-spinner {
  width: 3rem;
  height: 3rem;
  border: 3px solid #e5e7eb;
  border-top: 3px solid #3b82f6;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 1rem;
}

.link-list-loading-text {
  color: #6b7280;
  font-size: 1rem;
  margin: 0;
}

.link-list-empty {
  text-align: center;
  padding: 3rem 0;
}

.link-list-empty-icon {
  width: 4rem;
  height: 4rem;
  margin: 0 auto 1.5rem;
  color: #9ca3af;
}

.link-list-empty-icon svg {
  width: 100%;
  height: 100%;
}

.link-list-empty-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #374151;
  margin: 0 0 0.5rem 0;
}

.link-list-empty-subtitle {
  color: #6b7280;
  font-size: 1rem;
  margin: 0;
}

/* 链接项样式 */
.link-list-items {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.link-item {
  background: linear-gradient(135deg, #ffffff, #f0f9ff);
  border: 1px solid #e5e7eb;
  border-radius: 1rem;
  padding: 1.5rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.link-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #3b82f6, #1d4ed8);
}

.link-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  border-color: #3b82f6;
}

.link-item-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.5rem;
}

.link-item-title-section {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.link-item-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1f2937;
  margin: 0;
}

.link-item-id {
  background: linear-gradient(135deg, #dbeafe, #bfdbfe);
  color: #1e40af;
  padding: 0.25rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid #93c5fd;
}

.link-item-actions {
  display: flex;
  gap: 0.75rem;
}

.link-item-action {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  border: 1px solid;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.link-item-action svg {
  width: 1rem;
  height: 1rem;
}

.link-item-action-edit {
  background: linear-gradient(135deg, #dbeafe, #bfdbfe);
  border-color: #3b82f6;
  color: #1e40af;
}

.link-item-action-edit:hover {
  background: linear-gradient(135deg, #bfdbfe, #93c5fd);
  transform: translateY(-1px);
}

.link-item-action-delete {
  background: linear-gradient(135deg, #fee2e2, #fecaca);
  border-color: #ef4444;
  color: #991b1b;
}

.link-item-action-delete:hover {
  background: linear-gradient(135deg, #fecaca, #fca5a5);
  transform: translateY(-1px);
}

.link-item-action-reset {
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  border-color: #f59e0b;
  color: #92400e;
}

.link-item-action-reset:hover {
  background: linear-gradient(135deg, #fde68a, #fcd34d);
  transform: translateY(-1px);
}

.link-item-content {
  margin-top: 1rem;
}

.link-item-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
}

.link-item-detail {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: rgba(59, 130, 246, 0.05);
  border-radius: 0.5rem;
  border: 1px solid rgba(59, 130, 246, 0.1);
}

.link-item-detail-icon {
  width: 1.25rem;
  height: 1.25rem;
  color: #3b82f6;
  flex-shrink: 0;
}

.link-item-detail-icon svg {
  width: 100%;
  height: 100%;
}

.link-item-detail-content {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
}

.link-item-detail-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.link-item-detail-value {
  font-size: 0.875rem;
  font-weight: 600;
  color: #374151;
}

.link-item-detail-url {
  word-break: break-all;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 0.8rem;
}

.link-item-detail-badge {
  padding: 0.25rem 0.75rem;
  border-radius: 0.375rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-align: center;
  min-width: 3rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.link-item-detail-badge-rules {
  background: linear-gradient(135deg, #e9d5ff, #d8b4fe);
  color: #7c3aed;
  border: 1px solid #c4b5fd;
}

.link-item-detail-badge-rules:hover {
  background: linear-gradient(135deg, #d8b4fe, #c4b5fd);
  transform: translateY(-1px);
}

.link-item-detail-badge-stats {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.link-item-detail-badge-stats:hover {
  background: linear-gradient(135deg, #059669, #047857);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.link-item-detail-badge-clickable {
  cursor: pointer;
  user-select: none;
}

.link-item-detail-badge-clickable:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(16, 185, 129, 0.5);
}

.link-item-detail-stats-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  border: none;
  border-radius: 0.75rem;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
  flex-shrink: 0;
}

.link-item-detail-stats-btn:hover {
  background: linear-gradient(135deg, #059669, #047857);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.link-item-detail-stats-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.link-item-detail-stats-btn svg {
  width: 16px;
  height: 16px;
}

.link-item-detail-value-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.link-item-detail-badge-stats {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.link-item-detail-badge-stats:hover {
  background: linear-gradient(135deg, #059669, #047857);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

/* 规则统计弹窗样式 */
.rule-stats-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.rule-stats-modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

.rule-stats-modal-content {
  position: relative;
  background: white;
  border-radius: 1rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  max-width: 600px;
  width: 100%;
  max-height: 80vh;
  overflow: hidden;
  animation: ruleStatsModalSlideIn 0.3s ease-out;
}

@keyframes ruleStatsModalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.rule-stats-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem;
  border-bottom: 1px solid #e5e7eb;
  background: linear-gradient(135deg, #f8fafc, #f1f5f9);
}

.rule-stats-modal-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.25rem;
  font-weight: 600;
  color: #1f2937;
  margin: 0;
}

.rule-stats-modal-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border: none;
  background: #f3f4f6;
  border-radius: 0.5rem;
  color: #6b7280;
  cursor: pointer;
  transition: all 0.2s ease;
}

.rule-stats-modal-close:hover {
  background: #e5e7eb;
  color: #374151;
}

.rule-stats-modal-close svg {
  width: 1.25rem;
  height: 1.25rem;
}

.rule-stats-modal-body {
  padding: 1.5rem;
  max-height: 60vh;
  overflow-y: auto;
}

.rule-stats-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.rule-stats-item {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  padding: 1rem;
  transition: all 0.2s ease;
}

.rule-stats-item:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.rule-stats-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.rule-stats-item-name {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  color: #1f2937;
}

.rule-stats-item-icon {
  width: 1.25rem;
  height: 1.25rem;
  color: #10b981;
}

.rule-stats-item-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.rule-stats-item-count {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.rule-stats-reset-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border: none;
  background: #fef3c7;
  border-radius: 0.5rem;
  color: #f59e0b;
  cursor: pointer;
  transition: all 0.2s ease;
}

.rule-stats-reset-btn:hover {
  background: #fde68a;
  color: #d97706;
  transform: scale(1.05);
}

.rule-stats-reset-btn svg {
  width: 1rem;
  height: 1rem;
}

.rule-stats-item-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.75rem;
}

.rule-stats-item-detail {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.rule-stats-item-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.rule-stats-item-value {
  font-size: 0.875rem;
  font-weight: 600;
  color: #374151;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
}

.rule-stats-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 1rem;
  text-align: center;
}

.rule-stats-empty-icon {
  width: 4rem;
  height: 4rem;
  color: #d1d5db;
  margin-bottom: 1rem;
}

.rule-stats-empty-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #6b7280;
  margin: 0 0 0.5rem 0;
}

.rule-stats-empty-subtitle {
  font-size: 0.875rem;
  color: #9ca3af;
  margin: 0;
}

.rule-stats-modal-footer {
  padding: 1.5rem;
  border-top: 1px solid #e5e7eb;
  background: #f8fafc;
  display: flex;
  justify-content: center;
}

.rule-stats-reset-all-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  color: #92400e;
  border: 1px solid #f59e0b;
  border-radius: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

.rule-stats-reset-all-btn:hover {
  background: linear-gradient(135deg, #fde68a, #fcd34d);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

.rule-stats-reset-all-btn svg {
  width: 1.25rem;
  height: 1.25rem;
}

/* 链接页面响应式设计 */
@media (max-width: 768px) {
  .link-container {
    padding: 1rem 0.5rem;
  }

  .link-header {
    flex-direction: column;
    gap: 1.5rem;
    padding: 1.5rem;
  }

  .link-title-section {
    flex-direction: column;
    text-align: center;
    gap: 0.75rem;
  }

  .link-title {
    font-size: 1.5rem;
  }

  .link-actions {
    flex-direction: column;
    gap: 1rem;
    width: 100%;
  }

  .link-item-details {
    grid-template-columns: 1fr;
  }

  .link-item-header {
    flex-direction: column;
    gap: 1rem;
  }

  .link-item-actions {
    width: 100%;
    justify-content: center;
  }
}

/* ===== 现代化设计元素 ===== */

/* 玻璃态效果 */
.glass-effect {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.glass-effect-dark {
  background: rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* 渐变文字效果 */
.gradient-text {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gradient-text-primary {
  background: linear-gradient(135deg, #8b5cf6, #a855f7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gradient-text-blue {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* 阴影效果 */
.shadow-soft {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.shadow-medium {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.shadow-large {
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.shadow-colored {
  box-shadow: 0 10px 25px rgba(139, 92, 246, 0.3);
}

.shadow-colored-blue {
  box-shadow: 0 10px 25px rgba(59, 130, 246, 0.3);
}

/* 动画工具类 */
.animate-fadeIn {
  animation: fadeIn 0.6s ease-out;
}

.animate-slideInLeft {
  animation: slideInLeft 0.6s ease-out;
}

.animate-slideInRight {
  animation: slideInRight 0.6s ease-out;
}

.animate-bounce {
  animation: bounce 1s infinite;
}

.animate-pulse {
  animation: pulse 2s infinite;
}

.animate-float {
  animation: float 3s ease-in-out infinite;
}

.animate-glow {
  animation: glow 2s ease-in-out infinite;
}

/* 悬停效果 */
.hover-lift {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.hover-scale {
  transition: transform 0.3s ease;
}

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

.hover-glow {
  transition: box-shadow 0.3s ease;
}

.hover-glow:hover {
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.4);
}

/* 加载骨架屏效果 */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200px 100%;
  animation: shimmer 1.5s infinite;
}

.skeleton-dark {
  background: linear-gradient(90deg, #374151 25%, #4b5563 50%, #374151 75%);
  background-size: 200px 100%;
  animation: shimmer 1.5s infinite;
}

/* 渐变背景 */
.bg-gradient-primary {
  background: linear-gradient(135deg, #8b5cf6, #a855f7);
}

.bg-gradient-blue {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
}

.bg-gradient-green {
  background: linear-gradient(135deg, #10b981, #059669);
}

.bg-gradient-orange {
  background: linear-gradient(135deg, #f59e0b, #d97706);
}

.bg-gradient-red {
  background: linear-gradient(135deg, #ef4444, #dc2626);
}

.bg-gradient-purple {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

/* 边框效果 */
.border-gradient {
  border: 2px solid transparent;
  background: linear-gradient(white, white) padding-box,
              linear-gradient(135deg, #8b5cf6, #a855f7) border-box;
}

.border-gradient-blue {
  border: 2px solid transparent;
  background: linear-gradient(white, white) padding-box,
              linear-gradient(135deg, #3b82f6, #1d4ed8) border-box;
}

/* 圆角工具类 */
.rounded-soft {
  border-radius: 0.5rem;
}

.rounded-medium {
  border-radius: 0.75rem;
}

.rounded-large {
  border-radius: 1rem;
}

.rounded-xl {
  border-radius: 1.5rem;
}

/* 间距工具类 */
.space-y-soft > * + * {
  margin-top: 0.5rem;
}

.space-y-medium > * + * {
  margin-top: 1rem;
}

.space-y-large > * + * {
  margin-top: 1.5rem;
}

.space-x-soft > * + * {
  margin-left: 0.5rem;
}

.space-x-medium > * + * {
  margin-left: 1rem;
}

.space-x-large > * + * {
  margin-left: 1.5rem;
}

/* 文本工具类 */
.text-gradient {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-shadow {
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.text-shadow-lg {
  text-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* 交互状态 */
.interactive {
  cursor: pointer;
  transition: all 0.3s ease;
}

.interactive:hover {
  transform: translateY(-2px);
}

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

/* 链接表单样式 */
.link-form-card {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.1);
  margin-bottom: 2rem;
  overflow: hidden;
  animation: slideInLeft 0.6s ease-out;
}

.link-form-header {
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  padding: 2rem;
  color: white;
  text-align: center;
}

.link-form-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.link-form-title h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
}

.link-form-icon {
  width: 1.5rem;
  height: 1.5rem;
  opacity: 0.9;
}

.link-form-subtitle {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.95rem;
  margin: 0;
}

.link-form-content {
  padding: 2rem;
}

.link-form-section {
  margin-bottom: 2rem;
}

.link-form-section:last-child {
  margin-bottom: 0;
}

.link-form-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid #e2e8f0;
}

.link-form-section-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.link-form-section-title::before {
  content: '';
  width: 4px;
  height: 1.25rem;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  border-radius: 2px;
}

.link-form-add-rule {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.link-form-add-rule:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.link-form-add-rule svg {
  width: 1rem;
  height: 1rem;
}

.link-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.link-form-field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.link-form-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 0.25rem;
}

.link-form-label-icon {
  width: 1rem;
  height: 1rem;
  color: #6b7280;
}

.link-form-input {
  padding: 0.75rem 1rem;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-size: 0.875rem;
  transition: all 0.3s ease;
  background: #ffffff;
}

.link-form-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.link-form-rules-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.link-form-actions {
  display: flex;
  justify-content: center;
  padding-top: 1.5rem;
  border-top: 1px solid #e5e7eb;
  margin-top: 2rem;
}

.link-form-submit {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 2rem;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 8px 25px rgba(59, 130, 246, 0.3);
  min-width: 200px;
  justify-content: center;
}

.link-form-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 35px rgba(59, 130, 246, 0.4);
}

.link-form-submit:active {
  transform: translateY(0);
}

.link-form-submit-icon {
  width: 1.25rem;
  height: 1.25rem;
}

/* 编辑/创建表单 - 次要按钮（取消）统一样式 */
.link-form-cancel {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 2rem;
  background: linear-gradient(135deg, #64748b, #475569);
  color: white;
  border: none;
  border-radius: 0.75rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 8px 25px rgba(71, 85, 105, 0.25);
  min-width: 160px;
  justify-content: center;
}

.link-form-cancel:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 35px rgba(71, 85, 105, 0.35);
}

.link-form-cancel:active {
  transform: translateY(0);
}

.link-form-cancel-icon {
  width: 1.25rem;
  height: 1.25rem;
}

/* 链接表单响应式设计 */
@media (max-width: 768px) {
  .link-form-header {
    padding: 1.5rem;
  }

  .link-form-content {
    padding: 1.5rem;
  }

  .link-form-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .link-form-section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .link-form-submit {
    width: 100%;
    min-width: auto;
  }
}

/* 响应式工具类 */
@media (max-width: 768px) {
  .mobile-hidden {
    display: none;
  }

  .mobile-full {
    width: 100%;
  }

  .mobile-center {
    text-align: center;
  }
}

@media (min-width: 769px) {
  .desktop-hidden {
    display: none;
  }
}

/* 无障碍访问 */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.focus-visible:focus {
  outline: 2px solid #8b5cf6;
  outline-offset: 2px;
}


.link-form-actions {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e5e7eb;
}

.link-form-submit {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, #8b5cf6, #a855f7);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 0.75rem;
  border: none;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.link-form-submit:hover {
  background: linear-gradient(135deg, #7c3aed, #9333ea);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4);
}

.link-form-submit-icon {
  width: 1.25rem;
  height: 1.25rem;
}


/* 规则配置详情模态框样式 */
.rule-configs-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.rule-configs-modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

.rule-configs-modal-content {
  position: relative;
  background: white;
  border-radius: 1rem;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
  width: 100%;
  max-width: 800px;
  max-height: 80vh;
  overflow: hidden;
  animation: ruleConfigsModalSlideIn 0.3s ease-out;
}

@keyframes ruleConfigsModalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.rule-configs-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 2rem;
  border-bottom: 1px solid #e5e7eb;
  background: linear-gradient(135deg, #f8fafc, #f1f5f9);
}

.rule-configs-modal-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.25rem;
  font-weight: 600;
  color: #1f2937;
}

.rule-configs-modal-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border: none;
  background: #f3f4f6;
  border-radius: 0.5rem;
  color: #6b7280;
  cursor: pointer;
  transition: all 0.2s ease;
}

.rule-configs-modal-close:hover {
  background: #e5e7eb;
  color: #374151;
}

.rule-configs-modal-close svg {
  width: 1.25rem;
  height: 1.25rem;
}

.rule-configs-modal-body {
  padding: 2rem;
  max-height: 60vh;
  overflow-y: auto;
}

.rule-configs-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.rule-config-item {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  padding: 1.5rem;
  transition: all 0.2s ease;
}

.rule-config-item:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.rule-config-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.rule-config-item-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.125rem;
  font-weight: 600;
  color: #1f2937;
}

.rule-config-item-icon {
  width: 1.25rem;
  height: 1.25rem;
  color: #8b5cf6;
}

.rule-config-item-id {
  background: #e0e7ff;
  color: #3730a3;
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  font-size: 0.875rem;
  font-weight: 500;
}

.rule-config-item-details {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.rule-config-item-detail {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.rule-config-item-label {
  font-weight: 500;
  color: #6b7280;
  min-width: 100px;
  flex-shrink: 0;
}

.rule-config-item-value {
  color: #1f2937;
  word-break: break-all;
}

.rule-config-item-json {
  background: #1f2937;
  color: #f9fafb;
  padding: 1rem;
  border-radius: 0.5rem;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 0.875rem;
  line-height: 1.5;
  overflow-x: auto;
  margin-top: 0.5rem;
}

.rule-config-item-json pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
}

.rule-configs-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 2rem;
  text-align: center;
}

.rule-configs-empty-icon {
  width: 4rem;
  height: 4rem;
  color: #d1d5db;
  margin-bottom: 1rem;
}

.rule-configs-empty-icon svg {
  width: 100%;
  height: 100%;
}

.rule-configs-empty-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #6b7280;
  margin-bottom: 0.5rem;
}

.rule-configs-empty-subtitle {
  color: #9ca3af;
  font-size: 0.875rem;
}

@media (max-width: 768px) {
  .rule-configs-modal-content {
    margin: 0.5rem;
    max-height: 90vh;
  }

  .rule-configs-modal-header {
    padding: 1rem 1.5rem;
  }

  .rule-configs-modal-body {
    padding: 1.5rem;
  }

  .rule-config-item {
    padding: 1rem;
  }

  .rule-config-item-detail {
    flex-direction: column;
    gap: 0.25rem;
  }

  .rule-config-item-label {
    min-width: auto;
  }
}

/* 规则统计模态框移动端样式 */
@media (max-width: 768px) {
  .rule-stats-modal-content {
    margin: 0.5rem;
    max-height: 90vh;
  }

  .rule-stats-modal-header {
    padding: 1rem 1.5rem;
  }

  .rule-stats-modal-body {
    padding: 1.5rem;
  }

  .rule-stats-item {
    padding: 1rem;
  }

  .rule-stats-item-details {
    grid-template-columns: 1fr;
  }

  .rule-stats-item-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .rule-stats-item-actions {
    width: 100%;
    justify-content: space-between;
  }

  .link-item-detail-stats-btn {
    width: 2rem;
    height: 2rem;
  }

  .link-item-detail-stats-btn svg {
    width: 14px;
    height: 14px;
  }
}

/* 打印样式 */
@media print {
  .no-print {
    display: none !important;
  }

  .print-break {
    page-break-before: always;
  }
}

/* 访问统计相关样式 */
.link-item-detail-badge-click {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(102, 126, 234, 0.3);
}

.link-item-detail-badge-click:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(102, 126, 234, 0.4);
}

.link-item-detail-reset-btn {
  background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
  color: white;
  border: none;
  padding: 6px 8px;
  border-radius: 50%;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(255, 107, 107, 0.3);
  margin-left: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
}

.link-item-detail-reset-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(255, 107, 107, 0.4);
}

/* 访问统计模态框样式 */
.click-stats-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.click-stats-modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

.click-stats-modal-content {
  position: relative;
  background: white;
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow: hidden;
  animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.click-stats-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid #e5e7eb;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.click-stats-modal-title {
  display: flex;
  align-items: center;
  font-size: 18px;
  font-weight: 600;
  gap: 8px;
}

.click-stats-modal-close {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  padding: 8px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.click-stats-modal-close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.05);
}

.click-stats-modal-body {
  padding: 24px;
  max-height: 60vh;
  overflow-y: auto;
}

.click-stats-details {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.click-stats-summary {
  text-align: center;
  padding: 20px;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  border-radius: 12px;
  border: 1px solid #e2e8f0;
}

.click-stats-total {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.click-stats-total-label {
  font-size: 14px;
  color: #64748b;
  font-weight: 500;
}

.click-stats-total-value {
  font-size: 32px;
  font-weight: 700;
  color: #1e293b;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.click-stats-info {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.click-stats-info-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.click-stats-info-label {
  font-size: 14px;
  color: #64748b;
  font-weight: 500;
}

.click-stats-info-value {
  font-size: 14px;
  color: #1e293b;
  font-weight: 600;
}

.click-stats-empty {
  text-align: center;
  padding: 40px 20px;
  color: #64748b;
}

.click-stats-empty-icon {
  margin-bottom: 16px;
  opacity: 0.5;
}

.click-stats-empty-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
  color: #475569;
}

.click-stats-empty-subtitle {
  font-size: 14px;
  color: #94a3b8;
}

.click-stats-modal-footer {
  padding: 20px 24px;
  border-top: 1px solid #e5e7eb;
  background: #f8fafc;
  display: flex;
  justify-content: center;
}

.click-stats-reset-btn {
  background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(255, 107, 107, 0.3);
  display: flex;
  align-items: center;
  gap: 8px;
}

.click-stats-reset-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(255, 107, 107, 0.4);
}

/* 响应式设计 */
@media (max-width: 640px) {
  .click-stats-modal-content {
    width: 95%;
    margin: 20px;
  }

  .click-stats-modal-header {
    padding: 16px 20px;
  }

  .click-stats-modal-body {
    padding: 20px;
  }

  .click-stats-total-value {
    font-size: 28px;
  }

  .click-stats-info-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
}
