/* 策略管理系统 - 组件样式 */

/* ==================== 按钮组件 ==================== */
.btn {
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
}

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

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

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

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

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

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

.btn-outline:hover {
  background: var(--background-secondary);
}

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

.btn-warning {
  background: #f59e0b;
  color: white;
}

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

/* 🚨 强制退出按钮特殊样式 */
.force-exit-btn {
  position: relative;
  background: linear-gradient(135deg, #dc2626, #ef4444);
  border: 1px solid #dc2626;
  color: white;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.3);
  animation: forceExitGlow 2s ease-in-out infinite alternate;
}

.force-exit-btn:hover {
  background: linear-gradient(135deg, #b91c1c, #dc2626);
  border-color: #b91c1c;
  box-shadow: 0 4px 16px rgba(220, 38, 38, 0.5);
  transform: translateY(-2px);
}

.force-exit-btn:active {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.4);
}

.force-exit-btn .btn-icon {
  animation: forceExitIconPulse 1.5s ease-in-out infinite;
}

/* 强制退出按钮发光动画 */
@keyframes forceExitGlow {
  0% {
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.3);
  }
  100% {
    box-shadow: 0 2px 12px rgba(220, 38, 38, 0.5);
  }
}

/* 强制退出图标脉冲动画 */
@keyframes forceExitIconPulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

.btn-sm {
  padding: 4px 8px;
  font-size: 12px;
}

.btn-large {
  padding: 12px 24px;
  font-size: 16px;
}

.btn-icon {
  margin-right: 4px;
}

.btn-loading {
  opacity: 0.8;
}

.spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top: 2px solid white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-right: 8px;
}

/* ==================== 表单组件 ==================== */
.form-group {
  margin-bottom: 16px;
}

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

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
  color: var(--text-primary);
  font-size: 14px;
}

.required {
  color: #ef4444;
}

.form-help {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
}

input[type="text"],
input[type="number"],
select,
.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: var(--background-primary);
  color: var(--text-primary);
  font-size: 14px;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

input[type="text"]:focus,
input[type="number"]:focus,
select:focus,
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

input.error,
select.error {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

/* 代币选择框样式 */
.token-select {
  position: relative;
}

.token-select select:disabled {
  background-color: var(--background-secondary);
  color: var(--text-secondary);
  cursor: not-allowed;
}

.token-select.loading select {
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='10' stroke='%236b7280' stroke-width='2'/%3E%3Cpath d='M4 12a8 8 0 0 1 8-8V0C5.373 0 0 5.373 0 12h4z' fill='%236b7280'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  animation: spin 1s linear infinite;
}

.token-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 8px;
  padding: 8px;
  background: var(--background-secondary);
  border-radius: 4px;
  border-left: 3px solid var(--primary-color);
  font-size: 12px;
}

.token-info.hidden {
  display: none;
}

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

.token-symbol {
  font-weight: 600;
  color: var(--text-primary);
}

.token-name {
  color: var(--text-secondary);
}

.form-error {
  color: #ef4444;
  font-size: 12px;
  margin-top: 4px;
  display: none;
}

.form-textarea {
  resize: vertical;
  min-height: 80px;
}

/* ==================== 策略表单样式 ==================== */
.strategy-form-wrapper {
  max-width: 800px;
  margin: 0 auto;
}

.form-section {
  background: var(--background-primary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 24px;
  margin-bottom: 20px;
}

.form-section h3 {
  margin: 0 0 20px 0;
  color: var(--text-primary);
  font-size: 18px;
  font-weight: 600;
  border-bottom: 2px solid var(--primary-color);
  padding-bottom: 8px;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 20px 0;
}

.range-preview {
  margin-top: 12px;
  padding: 12px;
  background: var(--background-secondary);
  border-radius: 6px;
  border-left: 4px solid var(--primary-color);
}

.range-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.range-label {
  font-weight: 500;
  color: var(--text-primary);
}

.range-valid {
  color: #10b981;
  font-weight: 500;
}

.range-invalid {
  color: #ef4444;
  font-weight: 500;
}

.config-preview {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.preview-content {
  background: var(--background-primary);
  border-radius: 8px;
  padding: 24px;
  width: 90%;
  max-width: 600px;
  max-height: 80vh;
  overflow-y: auto;
}

.preview-content h4 {
  margin: 0 0 16px 0;
  color: var(--text-primary);
}

.config-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-color);
}

.config-item:last-child {
  border-bottom: none;
}

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

.config-item span {
  color: var(--text-primary);
  font-weight: 500;
}

.preview-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
}

/* ==================== 策略列表样式 ==================== */
.strategy-list-wrapper {
  width: 100%;
}

.list-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding: 16px;
  background: var(--background-primary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
}

.toolbar-left h3 {
  margin: 0 0 4px 0;
  color: var(--text-primary);
}

.strategy-count {
  font-size: 14px;
  color: var(--text-secondary);
}

.toolbar-right {
  display: flex;
  gap: 12px;
}

.list-filters {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
  padding: 16px;
  background: var(--background-primary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
}

.filter-select,
.filter-input {
  padding: 8px 12px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: var(--background-primary);
  color: var(--text-primary);
}

.filter-input {
  flex: 1;
  max-width: 300px;
}

.strategies-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
  gap: 20px;
}

.strategy-card {
  background: var(--background-primary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 20px;
  transition: all 0.2s ease;
}

.strategy-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
}

.card-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-title h4 {
  margin: 0;
  color: var(--text-primary);
  font-size: 16px;
}

.strategy-checkbox {
  margin: 0;
}

.card-status {
  display: flex;
  align-items: center;
}

.card-content {
  margin-bottom: 16px;
}

.strategy-info {
  margin-bottom: 16px;
}

.info-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0;
  font-size: 14px;
}

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

.info-item span {
  color: var(--text-primary);
}

.pool-address {
  font-family: monospace;
  background: var(--background-secondary);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12px;
}

.progress-section {
  margin: 16px 0;
  padding: 12px;
  background: var(--background-secondary);
  border-radius: 6px;
}

.progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

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

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

.progress-bar {
  height: 6px;
  background: var(--border-color);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 8px;
}

.progress-fill {
  height: 100%;
  background: var(--primary-color);
  border-radius: 3px;
  transition: width 0.3s ease;
}

.progress-stages {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
}

.stage {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  transition: all 0.2s ease;
}

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

.stage.current {
  background: var(--primary-color);
  color: white;
  animation: pulse 2s infinite;
}

.position-info,
.profit-info {
  margin: 12px 0;
  padding: 12px;
  background: var(--background-secondary);
  border-radius: 6px;
  border-left: 4px solid var(--primary-color);
}

.position-header,
.profit-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.position-label,
.profit-label {
  font-weight: 500;
  color: var(--text-primary);
  font-size: 14px;
}

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

.position-details,
.profit-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.detail-item,
.profit-item {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
}

.detail-item label,
.profit-item label {
  color: var(--text-secondary);
}

.detail-item span,
.profit-item span {
  color: var(--text-primary);
  font-weight: 500;
}

.profit-value.profit,
.profit-rate.profit {
  color: #10b981;
}

.profit-value.loss,
.profit-rate.loss {
  color: #ef4444;
}

.card-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  background: var(--background-primary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
}

.empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.empty-state h3 {
  margin: 0 0 8px 0;
  color: var(--text-primary);
}

.empty-state p {
  margin: 0 0 20px 0;
  color: var(--text-secondary);
}

.batch-toolbar {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--background-primary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 16px 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 20px;
}

.batch-info {
  color: var(--text-primary);
  font-weight: 500;
}

.batch-actions {
  display: flex;
  gap: 8px;
}

/* ==================== 卡片组件 ==================== */
.card {
  background: var(--background-primary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}

.card-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.card-body {
  color: var(--text-secondary);
}

/* ==================== 统计卡片 ==================== */
.stat-card {
  background: var(--background-primary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 20px;
  text-align: center;
  transition: transform 0.2s ease;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.stat-icon {
  font-size: 24px;
  margin-bottom: 8px;
}

.stat-content h3 {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 4px 0;
}

.stat-content h3.profit {
  color: #10b981;
}

.stat-content h3.loss {
  color: #ef4444;
}

.stat-content p {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0;
}

/* ==================== 表格组件 ==================== */
.table {
  width: 100%;
  border-collapse: collapse;
  background: var(--background-primary);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.table th,
.table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.table th {
  background: var(--background-secondary);
  font-weight: 600;
  color: var(--text-primary);
}

.table td {
  color: var(--text-secondary);
}

/* ==================== 状态指示器 ==================== */
.status-badge {
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-init {
  background: #e5e7eb;
  color: #6b7280;
}

.status-preparing {
  background: #fef3c7;
  color: #f59e0b;
}

.status-running {
  background: #d1fae5;
  color: #10b981;
}

.status-monitoring {
  background: #dbeafe;
  color: #3b82f6;
}

.status-paused {
  background: #fde68a;
  color: #d97706;
}

.status-completed {
  background: #d1fae5;
  color: #059669;
}

.status-error {
  background: #fecaca;
  color: #dc2626;
}

.status-unknown {
  background: #f3f4f6;
  color: #9ca3af;
}

/* ==================== 进度条 ==================== */
.progress {
  width: 100%;
  height: 8px;
  background: var(--background-secondary);
  border-radius: 4px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: var(--primary-color);
  transition: width 0.3s ease;
}

/* ==================== 模态框 ==================== */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(4px);
}

.modal.show {
  display: flex;
  justify-content: center;
  align-items: center;
}

.modal-content {
  background: var(--background-primary);
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  width: 90%;
  max-width: 600px;
  max-height: 80vh;
  overflow-y: auto;
  animation: modalSlideIn 0.3s ease-out;
}

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

.modal-title {
  margin: 0;
  color: var(--text-primary);
  font-size: 18px;
  font-weight: 600;
}

.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--text-secondary);
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.2s ease;
}

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

.modal-body {
  padding: 24px;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 24px;
  border-top: 1px solid var(--border-color);
  background: var(--background-secondary);
}

/* ==================== 通知组件 ==================== */
.notifications-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1100;
  max-width: 400px;
}

.notification {
  background: var(--background-primary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  animation: slideIn 0.3s ease-out;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: 300px;
}

.notification-content {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.notification-icon {
  font-size: 16px;
}

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

.notification-close {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: var(--text-secondary);
  padding: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.2s ease;
  margin-left: 8px;
}

.notification-close:hover {
  background: var(--background-secondary);
}

.notification-success {
  border-left: 4px solid #10b981;
}

.notification-error {
  border-left: 4px solid #ef4444;
}

.notification-warning {
  border-left: 4px solid #f59e0b;
}

.notification-info {
  border-left: 4px solid #3b82f6;
}

/* ==================== 详情弹窗样式 ==================== */
.strategy-details {
  max-width: 100%;
}

.details-section {
  margin-bottom: 24px;
}

.details-section h4 {
  margin: 0 0 12px 0;
  color: var(--text-primary);
  font-size: 16px;
  font-weight: 600;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 8px;
}

.config-grid,
.market-data,
.position-data {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

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

.data-item label {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 500;
}

.data-item span {
  font-size: 14px;
  color: var(--text-primary);
  font-weight: 500;
  word-break: break-all;
}

.details-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
}

/* ==================== 占位符页面样式 ==================== */
.monitor-placeholder,
.analytics-placeholder {
  text-align: center;
  padding: 60px 20px;
  background: var(--background-primary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
}

.monitor-placeholder h3,
.analytics-placeholder h3 {
  margin: 0 0 12px 0;
  color: var(--text-primary);
}

.monitor-placeholder p,
.analytics-placeholder p {
  margin: 0 0 32px 0;
  color: var(--text-secondary);
}

.monitor-features,
.analytics-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 32px;
}

.feature-card {
  background: var(--background-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 20px;
  text-align: left;
}

.feature-card h4 {
  margin: 0 0 8px 0;
  color: var(--text-primary);
  font-size: 16px;
}

.feature-card p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 14px;
}

/* ==================== 动画定义 ==================== */
@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

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

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

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

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

.loading-spinner {
  border: 4px solid rgba(0, 0, 0, 0.1);
  border-left: 4px solid var(--primary-color);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: 20px auto;
}

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

  .strategy-form-wrapper {
    max-width: 100%;
    padding: 0 16px;
  }

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

  .form-actions {
    flex-direction: column;
  }

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

  .list-toolbar {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }

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

  .list-filters {
    flex-direction: column;
    gap: 12px;
  }

  .filter-input {
    max-width: 100%;
  }

  .batch-toolbar {
    left: 10px;
    right: 10px;
    transform: none;
    flex-direction: column;
    gap: 12px;
  }

  .notifications-container {
    left: 10px;
    right: 10px;
    max-width: none;
  }

  .notification {
    min-width: auto;
  }

  .config-grid,
  .market-data,
  .position-data {
    grid-template-columns: 1fr;
  }

  .monitor-features,
  .analytics-features {
    grid-template-columns: 1fr;
  }

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

  .progress-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
} 

/* ==================== Tick范围可视化组件 ==================== */

.tick-visualization {
  margin: 12px 0;
  padding: 10px;
  background: var(--background-secondary);
  border-radius: 6px;
  border-left: 3px solid var(--primary-color);
}

.tick-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 12px;
}

.current-tick {
  color: var(--primary-color);
  font-weight: 600;
}

/* 🔧 新增：超出范围状态样式 */
.current-tick.out-of-range {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.current-tick.in-range {
  color: #10b981;
  background: rgba(16, 185, 129, 0.1);
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

/* 🔧 新增：超时警告样式 */
.timeout-warning {
  background: linear-gradient(135deg, #fef3c7, #fbbf24);
  border: 1px solid #f59e0b;
  border-radius: 6px;
  padding: 8px 12px;
  margin: 8px 0;
  font-size: 12px;
  font-weight: 600;
  color: #92400e;
  text-align: center;
  animation: timeoutPulse 2s ease-in-out infinite;
}

@keyframes timeoutPulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.4);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(245, 158, 11, 0);
  }
}

.tick-range {
  color: var(--text-secondary);
  font-family: 'Monaco', 'Menlo', monospace;
}

.tick-range-container {
  position: relative;
  margin: 8px 0;
}

.tick-range-bar {
  position: relative;
  height: 8px;
  background: #3b82f6; /* 蓝色进度条 */
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(59, 130, 246, 0.2);
  overflow: hidden;
}

/* 🔧 新增：警告状态的进度条 */
.tick-range-bar.warning {
  background: linear-gradient(90deg, #ef4444, #dc2626);
  box-shadow: 0 2px 4px rgba(239, 68, 68, 0.3);
  animation: warningGlow 2s ease-in-out infinite;
}

@keyframes warningGlow {
  0%, 100% {
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.3);
  }
  50% {
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.6);
  }
}

.tick-range-bar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, 
    rgba(255, 255, 255, 0.1) 0%, 
    rgba(255, 255, 255, 0.2) 50%, 
    rgba(255, 255, 255, 0.1) 100%);
  animation: shimmer 2s linear infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.tick-indicator {
  position: absolute;
  top: -4px;
  width: 4px;
  height: 16px;
  background: #ef4444; /* 红色指示器 */
  border-radius: 2px;
  transform: translateX(-50%);
  transition: left 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  z-index: 10;
}

/* 🔧 新增：超出范围指示器样式 */
.tick-indicator.out-of-range-left {
  background: #dc2626; /* 红色：向左脱离（下跌） */
  box-shadow: 0 0 12px rgba(220, 38, 38, 0.8);
  animation: dangerPulse 1.5s ease-in-out infinite;
}

.tick-indicator.out-of-range-right {
  background: #16a34a; /* 绿色：向右脱离（上涨） */
  box-shadow: 0 0 12px rgba(22, 163, 74, 0.8);
  animation: successPulse 1.5s ease-in-out infinite;
}

/* 保留原有的out-of-range样式作为fallback */
.tick-indicator.out-of-range {
  background: #dc2626;
  box-shadow: 0 0 12px rgba(220, 38, 38, 0.8);
  animation: dangerPulse 1.5s ease-in-out infinite;
}

@keyframes dangerPulse {
  0%, 100% {
    transform: translateX(-50%) scale(1);
    box-shadow: 0 0 12px rgba(220, 38, 38, 0.8);
  }
  50% {
    transform: translateX(-50%) scale(1.2);
    box-shadow: 0 0 20px rgba(220, 38, 38, 1);
  }
}

@keyframes successPulse {
  0%, 100% {
    transform: translateX(-50%) scale(1);
    box-shadow: 0 0 12px rgba(22, 163, 74, 0.8);
  }
  50% {
    transform: translateX(-50%) scale(1.2);
    box-shadow: 0 0 20px rgba(22, 163, 74, 1);
  }
}

.tick-needle {
  position: absolute;
  top: 0;
  left: 50%;
  width: 2px;
  height: 16px;
  background: inherit;
  transform: translateX(-50%);
}

.tick-tooltip {
  position: absolute;
  top: -30px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 10px;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.tick-indicator:hover .tick-tooltip {
  opacity: 1;
}

.tick-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 10px;
  color: var(--text-muted);
  font-family: 'Monaco', 'Menlo', monospace;
}

.tick-label-left,
.tick-label-right {
  background: var(--background-primary);
  padding: 2px 6px;
  border-radius: 3px;
  border: 1px solid var(--border-color);
}

.tick-indicator.animated {
  animation: tickPulse 2s ease-in-out infinite;
}

.tick-indicator.updating {
  transition: left 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 12px rgba(239, 68, 68, 0.6);
}

@keyframes tickPulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(239, 68, 68, 0);
  }
}

/* 策略名称样式优化 */
.strategy-name {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 15px;
}

.strategy-name .token-pair {
  color: var(--primary-color);
}

/* 动画效果 */
@keyframes tickPulse {
  0%, 100% { 
    transform: scaleY(1);
    opacity: 1;
  }
  50% { 
    transform: scaleY(1.2);
    opacity: 0.8;
  }
}

.tick-indicator.animated {
  animation: tickPulse 2s ease-in-out infinite;
}

.tick-indicator.updating {
  transition: left 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 12px rgba(239, 68, 68, 0.6);
}

/* 响应式设计 */
@media (max-width: 768px) {
  .tick-visualization {
    padding: 8px;
    margin: 8px 0;
  }
  
  .tick-info {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
  
  .tick-labels {
    font-size: 9px;
  }
} 