/**
 * EAI-RobotX Common Design System
 * 所有页面共享的样式系统
 */

/* ========== 颜色变量 ========== */
:root {
    --color-accent: #ff6b00;
    --color-accent-dark: #e65100;
    --color-black: #0a0a0a;
    --color-dark: #111111;
    --color-gray: #1a1a1a;
    --color-light: #242424;
}

/* ========== 基础重置 ========== */
* { box-sizing: border-box; }
html, body {
    margin: 0;
    padding: 0;
    background-color: var(--color-black);
    color: #ffffff;
    font-family: 'Inter', sans-serif;
}

/* ========== 颜色工具类 ========== */
.text-accent { color: var(--color-accent); }
.bg-accent { background-color: var(--color-accent); }
.border-accent { border-color: var(--color-accent); }

/* ========== 导航样式 ========== */
.nav-link { position: relative; }
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--color-accent);
    transition: width 0.3s ease;
}
.nav-link:hover::after { width: 100%; }

/* ========== 按钮样式 ========== */
.btn-primary {
    background: var(--color-accent);
    color: #000;
    transition: all 0.3s ease;
}
.btn-primary:hover { background: var(--color-accent-dark); }

.btn-outline {
    border: 1px solid #333;
    transition: all 0.3s ease;
}
.btn-outline:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
}

/* ========== 标题样式 ========== */
.hero-title {
    font-size: clamp(48px, 10vw, 96px);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 0.95;
}

.section-title {
    font-size: clamp(36px, 6vw, 64px);
    font-weight: 700;
    letter-spacing: -0.02em;
}

.page-title {
    font-size: clamp(32px, 5vw, 48px);
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* ========== 装饰线条 ========== */
.line-reveal {
    position: relative;
    overflow: hidden;
}
.line-reveal::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 2px;
    background: var(--color-accent);
}

.section-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, #333, transparent);
}

.section-line {
    height: 1px;
    background: linear-gradient(90deg, var(--color-accent), #333, transparent);
}

/* ========== 卡片系统 ========== */
.stat-card {
    background: var(--color-dark);
    border: 1px solid #222;
    border-radius: 12px;
    padding: 24px;
    transition: border-color 0.3s ease;
}
.stat-card:hover { border-color: var(--color-accent); }

.company-card { transition: all 0.4s ease; }
.company-card:hover { transform: translateY(-4px); }
.company-card:hover .card-accent { width: 100%; }

.card-accent {
    height: 2px;
    width: 40px;
    background: var(--color-accent);
    transition: width 0.4s ease;
}

.chain-card {
    background: linear-gradient(135deg, var(--color-dark) 0%, var(--color-gray) 100%);
    border: 1px solid #333;
    transition: all 0.4s ease;
}
.chain-card:hover {
    border-color: var(--color-accent);
    transform: translateY(-4px);
}
.chain-card:hover .card-icon { color: var(--color-accent); }

.tech-card {
    background: var(--color-dark);
    border: 1px solid #222;
    border-radius: 12px;
    padding: 24px;
    transition: all 0.3s ease;
}
.tech-card:hover {
    border-color: var(--color-accent);
    transform: translateY(-4px);
}

/* ========== 技术规格页样式 ========== */
.spec-highlight { color: var(--color-accent); font-weight: 600; }

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

.product-logo {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--color-gray), var(--color-light));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 12px;
    color: var(--color-accent);
    border: 1px solid #333;
}

.tech-category-card {
    background: var(--color-dark);
    border: 1px solid #222;
    border-radius: 12px;
    padding: 24px;
    transition: all 0.3s ease;
}
.tech-category-card:hover {
    border-color: var(--color-accent);
    transform: translateY(-4px);
}

/* ========== 动画效果 ========== */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}
.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

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

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

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

.comment-enter { animation: slideIn 0.3s ease; }

/* ========== 表格样式 ========== */
table { border-collapse: collapse; width: 100%; }
th, td {
    padding: 20px 24px;
    text-align: left;
    border-bottom: 1px solid #222;
}
th {
    font-weight: 600;
    color: #999;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.1em;
}
tr:hover td { background: var(--color-dark); }

th.sortable {
    cursor: pointer;
    user-select: none;
    transition: color 0.3s ease;
}
th.sortable:hover { color: var(--color-accent); }
th.sortable .sort-icon {
    display: inline-block;
    margin-left: 8px;
    opacity: 0.5;
    transition: opacity 0.3s ease;
}
th.sortable:hover .sort-icon { opacity: 1; }
th.sorted .sort-icon { opacity: 1; color: var(--color-accent); }

/* ========== 进度条 ========== */
.progress-bar {
    height: 4px;
    background: #222;
    border-radius: 2px;
    overflow: hidden;
}
.progress-fill {
    height: 100%;
    background: var(--color-accent);
    border-radius: 2px;
    transition: width 0.6s ease;
}

.progress-bar-lg {
    background: linear-gradient(90deg, var(--color-accent) 0%, var(--color-accent) var(--progress), #333 var(--progress), #333 100%);
}

/* ========== 徽章/标签 ========== */
.tier-badge {
    background: linear-gradient(90deg, var(--color-accent), var(--color-accent-dark));
    color: #000;
    font-weight: 700;
    font-size: 11px;
    letter-spacing: 0.1em;
}

.company-tag {
    background: var(--color-light);
    border: 1px solid #333;
    transition: all 0.3s ease;
}
.company-tag:hover {
    background: var(--color-accent);
    color: #000;
    border-color: var(--color-accent);
}

.rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-weight: 700;
    font-size: 12px;
}
.rank-badge.top-3 { background: var(--color-accent); color: #000; }
.rank-badge.other { background: var(--color-gray); color: #666; border: 1px solid #333; }

/* ========== 骨架屏 ========== */
.skeleton {
    background: linear-gradient(90deg, #1a1a1a 25%, #242424 50%, #1a1a1a 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
}
@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
.skeleton-text { height: 16px; margin-bottom: 8px; }
.skeleton-title { height: 24px; width: 60%; margin-bottom: 12px; }
.skeleton-img { height: 200px; }

/* ========== 辅助类 ========== */
.scrollbar-hide::-webkit-scrollbar { display: none; }
.scrollbar-hide { -ms-overflow-style: none; scrollbar-width: none; }

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.highlight-box {
    border-left: 3px solid var(--color-accent);
    background: rgba(255, 107, 0, 0.05);
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #666;
    transition: color 0.3s ease;
}
.back-link:hover { color: var(--color-accent); }

/* ========== 搜索/筛选 ========== */
.search-input {
    background: var(--color-gray);
    border: 1px solid #333;
    padding: 12px 16px;
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    width: 280px;
    transition: border-color 0.3s ease;
}
.search-input:focus { outline: none; border-color: var(--color-accent); }
.search-input::placeholder { color: #666; }

.filter-select {
    background: var(--color-gray);
    border: 1px solid #333;
    padding: 12px 16px;
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    transition: border-color 0.3s ease;
}
.filter-select:focus { outline: none; border-color: var(--color-accent); }

/* ========== 数据来源提示 ========== */
.data-source-note {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px 20px;
    background: var(--color-dark);
    border: 1px solid #222;
    border-radius: 8px;
    margin-top: 24px;
}

/* ========== 加载状态 ========== */
.loading-state {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px;
    color: #666;
}
.loading-spinner {
    width: 24px;
    height: 24px;
    border: 2px solid #333;
    border-top-color: var(--color-accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-right: 12px;
}

.empty-state {
    text-align: center;
    padding: 60px;
    color: #666;
}

/* ========== 响应式断点参考 ========== */
/* Mobile: < 768px */
/* Tablet: 768px - 1024px */
/* Desktop: > 1024px */
