/* 检测进度动画样式 */

/* 进度容器 */
.detection-progress {
  background: var(--card-bg);
  border-radius: 16px;
  padding: 30px;
  backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  animation: slideIn 0.3s ease-out;
}

/* 进度头部 */
.progress-header {
  margin-bottom: 30px;
  text-align: center;
}

.progress-header h3 {
  font-size: 1.5rem;
  margin-bottom: 20px;
  color: var(--text);
}

.ip-highlight {
  color: var(--primary);
  font-weight: 700;
  font-family: 'Courier New', monospace;
}

/* 进度条容器 */
.progress-bar-container {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 10px;
  position: relative;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), #00ff88);
  border-radius: 10px;
  width: 0%;
  transition: width 0.5s ease;
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.5);
  position: relative;
  overflow: hidden;
}

.progress-bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  animation: shimmer 1.5s infinite;
}

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

.progress-percent {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary);
  font-family: 'Courier New', monospace;
}

/* 检测步骤列表 */
.detection-steps {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 20px;
}

.step-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px 20px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

.step-item[data-status="running"] {
  background: rgba(0, 212, 255, 0.1);
  border-color: var(--primary);
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.2);
}

.step-item[data-status="completed"] {
  background: rgba(0, 255, 136, 0.1);
  border-color: #00ff88;
}

.step-item[data-status="error"] {
  background: rgba(255, 68, 68, 0.1);
  border-color: #ff4444;
}

.step-icon {
  font-size: 1.8rem;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
}

.step-info {
  flex: 1;
}

.step-name {
  font-weight: 600;
  font-size: 1rem;
  color: var(--text);
  margin-bottom: 4px;
}

.step-status {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
}

.step-indicator {
  position: relative;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.step-spinner,
.step-check {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.step-spinner {
  opacity: 0;
}

.step-check {
  opacity: 0;
  font-size: 1.2rem;
  color: #00ff88;
  font-weight: 700;
}

.step-item[data-status="running"] .step-spinner {
  opacity: 1;
  animation: spin 1s linear infinite;
}

.step-item[data-status="running"] .step-spinner::after {
  content: '';
  display: block;
  width: 20px;
  height: 20px;
  border: 3px solid var(--primary);
  border-top-color: transparent;
  border-radius: 50%;
}

.step-item[data-status="completed"] .step-check {
  opacity: 1;
  animation: checkmark 0.5s ease;
}

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

@keyframes checkmark {
  0% { transform: scale(0); }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

/* 结果卡片增强样式 */
.result-card {
  background: transparent;
  border-radius: 0;
  padding: 0;
  backdrop-filter: none;
  border: none;
  box-shadow: none;
}

.result-card.fade-in {
  animation: fadeInUp 0.5s ease-out;
}

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

.result-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 40px;
  flex-wrap: wrap;
  gap: 15px;
  padding: 0;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
}

.result-header h2 {
  font-size: 1.8rem;
  color: var(--text);
  font-family: 'Courier New', monospace;
  margin: 0;
}

.cache-tag,
.fresh-tag {
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
}

.cache-tag {
  background: rgba(255, 193, 7, 0.2);
  color: #ffc107;
  border: 1px solid rgba(255, 193, 7, 0.3);
}

.fresh-tag {
  background: rgba(0, 212, 255, 0.2);
  color: var(--primary);
  border: 1px solid rgba(0, 212, 255, 0.3);
}

.badge {
  padding: 8px 20px;
  border-radius: 25px;
  font-weight: 700;
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.badge.good {
  background: rgba(0, 255, 136, 0.2);
  color: #00ff88;
  border: 2px solid #00ff88;
}

.badge.medium {
  background: rgba(255, 193, 7, 0.2);
  color: #ffc107;
  border: 2px solid #ffc107;
}

.badge.bad {
  background: rgba(255, 68, 68, 0.2);
  color: #ff4444;
  border: 2px solid #ff4444;
}

/* 评分圆环 */
.score-section {
  display: flex;
  gap: 50px;
  margin-bottom: 30px;
  align-items: center;
  padding: 0;
  background: transparent;
  border-radius: 0;
  border: none;
}

.score-display {
  flex-shrink: 0;
  position: relative;
  background: transparent;
  border: none;
  padding: 0;
  margin: 0;
}

.score-circle {
  width: 160px;
  height: 160px;
  transform: rotate(-90deg);
  filter: drop-shadow(0 0 15px rgba(0, 212, 255, 0.3));
  display: block;
  overflow: visible;
  background: transparent;
  border: none;
}

.score-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.08);
  stroke-width: 10;
}

.score-progress {
  fill: none;
  stroke: url(#scoreGradient);
  stroke-width: 10;
  stroke-linecap: round;
  transition: stroke-dasharray 1.5s cubic-bezier(0.4, 0, 0.2, 1);
  filter: drop-shadow(0 0 8px currentColor);
}

.result-card.good .score-progress {
  stroke: #00ff88;
}

.result-card.medium .score-progress {
  stroke: #ffc107;
}

.result-card.bad .score-progress {
  stroke: #ff4444;
}

.score-number {
  font-size: 3.8rem;
  font-weight: 700;
  fill: var(--text);
  font-family: 'Courier New', monospace;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
  writing-mode: horizontal-tb;
}

.result-card.good .score-number {
  fill: #00ff88;
}

.result-card.medium .score-number {
  fill: #ffc107;
}

.result-card.bad .score-number {
  fill: #ff4444;
}

.score-sublabel {
  font-size: 0.8rem;
  fill: rgba(255, 255, 255, 0.5);
  font-weight: 400;
  letter-spacing: 1px;
  writing-mode: horizontal-tb;
  font-family: 'Microsoft YaHei', 'PingFang SC', sans-serif;
}

.score-info {
  flex: 1;
}

.score-info h3 {
  font-size: 1.5rem;
  margin-bottom: 15px;
  color: var(--text);
  font-weight: 600;
}

.score-description {
  font-size: 0.95rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 0;
}

/* 黑名单部分 */
.blacklists-section {
  margin: 30px 0;
  padding: 20px;
  background: rgba(255, 68, 68, 0.1);
  border-radius: 12px;
  border: 1px solid rgba(255, 68, 68, 0.3);
}

.blacklists-section h4 {
  margin-bottom: 15px;
  color: #ff4444;
}

.blacklist-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.blacklist-tag {
  padding: 8px 16px;
  background: rgba(255, 68, 68, 0.2);
  color: #ff4444;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 600;
  border: 1px solid rgba(255, 68, 68, 0.4);
}

.no-blacklists {
  padding: 20px;
  text-align: center;
  font-size: 1.1rem;
  color: #00ff88;
  background: rgba(0, 255, 136, 0.1);
  border-radius: 12px;
  border: 1px solid rgba(0, 255, 136, 0.3);
  margin: 20px 0;
}

/* 地理位置部分 */
.geo-section {
  margin: 30px 0;
  padding: 20px;
  background: rgba(0, 212, 255, 0.05);
  border-radius: 12px;
  border: 1px solid rgba(0, 212, 255, 0.2);
}

.geo-section h4 {
  margin-bottom: 15px;
  color: var(--primary);
}

.geo-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
}

.geo-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.geo-label {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
}

.geo-value {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

/* 检测结果列表 */
.checks-section {
  margin: 30px 0;
}

.checks-section h4 {
  margin-bottom: 20px;
  color: var(--text);
}

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

.check-item {
  padding: 15px 20px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  transition: all 0.3s ease;
}

.check-item:hover {
  transform: translateX(5px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.check-item.status-clean {
  border-left: 4px solid #00ff88;
}

.check-item.status-warning {
  border-left: 4px solid #ffc107;
}

.check-item.status-danger {
  border-left: 4px solid #ff4444;
}

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

.check-source {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text);
}

.check-weight {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.1);
  padding: 4px 10px;
  border-radius: 12px;
}

.check-status {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.status-icon {
  font-size: 1.2rem;
}

.status-text {
  font-weight: 600;
  font-size: 0.95rem;
}

.check-details {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.5;
}

/* 错误消息 */
.error-message {
  text-align: center;
  padding: 40px;
  background: rgba(255, 68, 68, 0.1);
  border-radius: 16px;
  border: 1px solid rgba(255, 68, 68, 0.3);
}

.error-icon {
  font-size: 3rem;
  margin-bottom: 15px;
}

.error-message h3 {
  color: #ff4444;
  margin-bottom: 10px;
}

.error-message p {
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 20px;
}

/* 信息区域样式 */
.info-section {
  margin: 25px 0;
  padding: 30px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.info-section:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.info-section h4 {
  margin-bottom: 25px;
  color: var(--text);
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  padding-bottom: 15px;
  border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.info-grid {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

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

.info-item {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 20px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 10px;
  border-left: 4px solid var(--primary);
  transition: all 0.3s ease;
}

.info-item:hover {
  background: rgba(255, 255, 255, 0.06);
  transform: translateX(5px);
}

.info-item.full-width {
  grid-column: 1 / -1;
}

.info-label {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.5);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.info-value {
  font-size: 1.05rem;
  color: var(--text);
  font-weight: 600;
}

/* 重要检测区域 */
.important-check-section {
  background: linear-gradient(135deg, rgba(255, 193, 7, 0.08) 0%, rgba(255, 152, 0, 0.05) 100%);
  border-color: rgba(255, 193, 7, 0.25);
}

.check-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.check-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.check-item-simple {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 10px;
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.check-item-simple:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateX(5px);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.check-label {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 500;
}

.check-value {
  font-size: 1rem;
  font-weight: 700;
  padding: 6px 16px;
  border-radius: 15px;
  min-width: 50px;
  text-align: center;
}

.check-value.safe {
  color: #00ff88;
  background: rgba(0, 255, 136, 0.2);
  box-shadow: 0 0 10px rgba(0, 255, 136, 0.2);
}

.check-value.warning {
  color: #ffc107;
  background: rgba(255, 193, 7, 0.2);
  box-shadow: 0 0 10px rgba(255, 193, 7, 0.2);
}

.check-value.danger {
  color: #ff4444;
  background: rgba(255, 68, 68, 0.2);
  box-shadow: 0 0 10px rgba(255, 68, 68, 0.2);
}

/* 地区时区区域 */
.region-time-section {
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.08) 0%, rgba(0, 150, 255, 0.05) 100%);
  border-color: rgba(0, 212, 255, 0.25);
}

/* 主要信息区域 */
.main-info-section {
  background: linear-gradient(135deg, rgba(0, 255, 136, 0.08) 0%, rgba(0, 200, 100, 0.05) 100%);
  border-color: rgba(0, 255, 136, 0.25);
}

/* 响应式设计 */
@media (max-width: 768px) {
  .detection-progress {
    padding: 20px;
  }
  
  .step-item {
    padding: 12px 15px;
  }
  
  .step-icon {
    font-size: 1.5rem;
    width: 35px;
    height: 35px;
  }
  
  .score-section {
    flex-direction: column;
    gap: 30px;
    padding: 25px;
  }
  
  .score-circle {
    width: 180px;
    height: 180px;
  }
  
  .score-number {
    font-size: 3rem;
  }
  
  .score-info h3 {
    font-size: 1.5rem;
  }
  
  .score-description {
    font-size: 1rem;
  }
  
  .geo-details {
    grid-template-columns: 1fr;
  }
  
  .result-header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .info-row,
  .check-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .info-section {
    padding: 15px;
  }
}

/* 滑入动画 */
@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
