@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;800&family=JetBrains+Mono:wght@400;700&display=swap');

:root {
  --bg-primary: #0a0c10;
  --bg-secondary: rgba(18, 22, 30, 0.7);
  --accent-purple: #8b5cf6;
  --accent-blue: #3b82f6;
  --accent-cyan: #06b6d4;
  --success: #10b981;
  --error: #ef4444;
  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --border-glass: rgba(255, 255, 255, 0.08);
  --neon-shadow: 0 0 20px rgba(139, 92, 246, 0.15);
}

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

body {
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  overflow-x: hidden;
  background-image: 
    radial-gradient(at 0% 0%, rgba(139, 92, 246, 0.1) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(6, 182, 212, 0.1) 0px, transparent 50%);
}

.container {
  max-width: 900px;
  width: 95%;
  margin: 40px auto;
  padding: 40px;
  background: var(--bg-secondary);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-glass);
  border-radius: 24px;
  box-shadow: var(--neon-shadow), inset 0 1px 1px rgba(255, 255, 255, 0.05);
  animation: fadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

header {
  text-align: center;
  margin-bottom: 40px;
}

header h1 {
  font-size: 2.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, #fff 30%, var(--accent-purple) 70%, var(--accent-cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}

header p {
  color: var(--text-muted);
  font-size: 1.1rem;
}

/* 雷达/检测动画区域 */
.scanner-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-bottom: 40px;
}

.radar {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  border: 2px solid rgba(139, 92, 246, 0.3);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.05) 0%, transparent 70%);
  box-shadow: 0 0 30px rgba(139, 92, 246, 0.05);
  margin-bottom: 24px;
}

.radar::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid transparent;
  border-top-color: var(--accent-purple);
  animation: spin 2s linear infinite;
}

.radar-ping {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--accent-purple);
  opacity: 0.15;
  animation: ping 2.5s cubic-bezier(0, 0, 0.2, 1) infinite;
}

.radar-icon {
  font-size: 2.5rem;
  z-index: 2;
  filter: drop-shadow(0 0 10px rgba(139, 92, 246, 0.5));
  animation: pulse 2s ease-in-out infinite;
}

.scan-status-text {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1rem;
  color: var(--accent-cyan);
  height: 24px;
  letter-spacing: 1px;
}

/* 按钮样式 */
.btn {
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-blue));
  border: none;
  color: white;
  padding: 14px 32px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(139, 92, 246, 0.5);
}

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

/* 结果报告区域 */
.results-panel {
  display: none;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-glass);
  border-radius: 16px;
  padding: 30px;
  margin-top: 30px;
  animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.result-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-glass);
  padding-bottom: 20px;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 16px;
}

.inferred-version-box {
  display: flex;
  flex-direction: column;
}

.inferred-version-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 4px;
}

.inferred-version-val {
  font-size: 2.2rem;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
}

.comparison-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  padding: 12px 20px;
  font-size: 0.95rem;
}

.comparison-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 6px;
}

.comparison-row:last-child {
  margin-bottom: 0;
}

.comparison-label {
  color: var(--text-muted);
}

.comparison-val {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
}

/* 特征网格列表 */
.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  max-height: 400px;
  overflow-y: auto;
  padding-right: 8px;
  margin-top: 20px;
}

/* 自定义滚动条 */
.features-grid::-webkit-scrollbar {
  width: 6px;
}
.features-grid::-webkit-scrollbar-track {
  background: transparent;
}
.features-grid::-webkit-scrollbar-thumb {
  background: var(--border-glass);
  border-radius: 4px;
}
.features-grid::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.15);
}

.feature-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  padding: 16px 20px;
  transition: all 0.3s ease;
}

.feature-card:hover {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(139, 92, 246, 0.2);
}

.feature-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

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

.feature-name {
  font-weight: 600;
  font-size: 1rem;
}

.feature-version-badge {
  background: rgba(139, 92, 246, 0.1);
  color: var(--accent-purple);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 6px;
  border: 1px solid rgba(139, 92, 246, 0.2);
}

.feature-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.status-badge {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 4px 10px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.status-badge.supported {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.status-badge.unsupported {
  background: rgba(239, 68, 68, 0.1);
  color: var(--error);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

/* 动画定义 */
@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.98); }
  to { opacity: 1; transform: scale(1); }
}

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

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

@keyframes ping {
  75%, 100% {
    transform: scale(1.6);
    opacity: 0;
  }
}

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

@media (max-width: 600px) {
  .container {
    padding: 24px;
  }
  header h1 {
    font-size: 1.8rem;
  }
  .result-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .comparison-box {
    width: 100%;
  }
}
