/**
 * Intel处理器百科 - 优化版样式
 * 现代化设计，流畅动画，专业美观
 * 版本: 2.1
 */

:root {
    --primary-color: #0068e6;
    --primary-dark: #0050b3;
    --primary-light: #e6f0ff;
    --primary-gradient: linear-gradient(135deg, #0068e6 0%, #0050b3 100%);
    --secondary-color: #6c757d;
    --success-color: #00a854;
    --danger-color: #ff4d4f;
    --warning-color: #faad14;
    --info-color: #13c2c2;
    --light-color: #fafafa;
    --dark-color: #262626;
    --border-radius: 6px;
    --border-radius-lg: 10px;
    --border-radius-xl: 14px;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 3px 10px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 6px 20px rgba(0, 0, 0, 0.1);
    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInLeft {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes fadeInRight {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(-15px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes countUp {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    background: #f5f7fa;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
    animation: fadeIn 0.4s ease-out;
}

.navbar {
    background: var(--primary-gradient);
    border: none;
    box-shadow: var(--shadow-md);
    padding: 0.6rem 0;
    transition: all var(--transition-normal);
    position: sticky;
    top: 0;
    z-index: 1030;
}

.navbar.scrolled {
    padding: 0.4rem 0;
    box-shadow: var(--shadow-lg);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.2rem;
    color: #fff !important;
    transition: all var(--transition-fast);
}

.navbar-brand:hover {
    transform: scale(1.02);
}

.nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 500;
    padding: 0.4rem 0.8rem !important;
    border-radius: var(--border-radius);
    transition: all var(--transition-fast);
}

.nav-link:hover {
    color: #fff !important;
    background: rgba(255, 255, 255, 0.1);
}

.search-box input {
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 20px;
    padding: 0.5rem 1rem;
    width: 200px;
    transition: all var(--transition-normal);
    font-size: 0.85rem;
}

.search-box input:focus {
    width: 260px;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2);
}

.hero-section {
    background: linear-gradient(135deg, #fff 0%, #f8faff 100%);
    border: none;
    border-radius: var(--border-radius-xl);
    box-shadow: var(--shadow-md);
    padding: 2rem 1.5rem;
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.5s ease-out;
}

.hero-section h1 {
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 0.8rem;
}

.hero-section .lead {
    color: #666;
    font-size: 1rem;
    line-height: 1.6;
}

.main-search .form-control {
    border: 2px solid #e8e8e8;
    border-radius: 25px;
    padding: 0.7rem 1.2rem;
    font-size: 0.95rem;
    transition: all var(--transition-normal);
    background: #fff;
}

.main-search .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 104, 230, 0.1);
}

.main-search .btn {
    border-radius: 25px;
    padding: 0.7rem 1.8rem;
    font-weight: 600;
    background: var(--primary-gradient);
    border: none;
    transition: all var(--transition-normal);
}

.main-search .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 104, 230, 0.3);
}

.card {
    border: none;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
    margin-bottom: 1rem;
    transition: all var(--transition-normal);
    background: #fff;
    overflow: hidden;
    animation: fadeIn 0.4s ease-out;
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-header {
    background: linear-gradient(135deg, #fafafa 0%, #f5f5f5 100%);
    border-bottom: 1px solid #eee;
    font-weight: 600;
    padding: 0.8rem 1rem;
    color: var(--dark-color);
}

.card-header.bg-success {
    background: linear-gradient(135deg, #28a745 0%, #218838 100%) !important;
}

.card-header.bg-success h5 {
    color: #fff !important;
}

.card-header.bg-primary {
    background: var(--primary-gradient) !important;
}

.card-header.bg-primary h5 {
    color: #fff !important;
}

.card-header.bg-info {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%) !important;
}

.card-header.bg-info h5 {
    color: #fff !important;
}

.card-header.bg-danger {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%) !important;
}

.card-header.bg-danger h5 {
    color: #fff !important;
}

.card-header.bg-warning {
    background: linear-gradient(135deg, #ffc107 0%, #e0a800 100%) !important;
}

.card-header.bg-warning h5 {
    color: #212529 !important;
}

.card-body {
    padding: 1rem;
}

.stat-card {
    text-align: center;
    padding: 1.2rem 1rem;
    border-radius: var(--border-radius-lg);
    background: #fff;
    transition: all var(--transition-normal);
    cursor: default;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.stat-card .stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.6rem;
    font-size: 1.3rem;
    transition: all var(--transition-normal);
}

.stat-card:hover .stat-icon {
    transform: scale(1.05);
}

.stat-card .stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--dark-color);
    line-height: 1.2;
    animation: countUp 0.5s ease-out;
}

.stat-card .stat-label {
    color: #888;
    font-size: 0.8rem;
    margin-top: 0.3rem;
    font-weight: 500;
}

.stat-card.primary .stat-icon { background: var(--primary-light); color: var(--primary-color); }
.stat-card.success .stat-icon { background: #e6f7ef; color: var(--success-color); }
.stat-card.info .stat-icon { background: #e6fffb; color: var(--info-color); }
.stat-card.warning .stat-icon { background: #fffbe6; color: var(--warning-color); }

.cpu-card {
    border-left: 3px solid transparent;
    transition: all var(--transition-normal);
}

.cpu-card:hover {
    border-left-color: var(--primary-color);
    box-shadow: var(--shadow-md);
}

.cpu-card .card-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.cpu-card .card-title a {
    color: var(--dark-color);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.cpu-card .card-title a:hover {
    color: var(--primary-color);
}

.cpu-specs {
    font-size: 0.85rem;
    color: #666;
}

.cpu-specs .spec-item {
    display: flex;
    align-items: center;
    padding: 0.2rem 0;
}

.cpu-specs .spec-label {
    color: #999;
    width: 70px;
    flex-shrink: 0;
}

.cpu-specs .spec-value {
    color: var(--dark-color);
    font-weight: 500;
}

.hot-cpu-card {
    background: linear-gradient(135deg, #fff 0%, #fafafa 100%);
    border: 1px solid #eee;
    border-radius: var(--border-radius);
    transition: all var(--transition-normal);
    cursor: pointer;
}

.hot-cpu-card:hover {
    border-color: var(--primary-color);
    background: #fff;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.hot-cpu-card .rank {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8rem;
    margin-right: 0.6rem;
}

.hot-cpu-card .rank-1 { background: linear-gradient(135deg, #ffd700 0%, #ffb300 100%); color: #fff; }
.hot-cpu-card .rank-2 { background: linear-gradient(135deg, #c0c0c0 0%, #a0a0a0 100%); color: #fff; }
.hot-cpu-card .rank-3 { background: linear-gradient(135deg, #cd7f32 0%, #a0522d 100%); color: #fff; }

.btn {
    border-radius: var(--border-radius);
    font-weight: 500;
    transition: all var(--transition-fast);
    padding: 0.4rem 0.9rem;
}

.btn-primary {
    background: var(--primary-gradient);
    border: none;
    color: #fff;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 104, 230, 0.3);
}

.btn-outline-primary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-1px);
}

.btn-lg {
    padding: 0.6rem 1.3rem;
    font-size: 0.95rem;
}

.badge {
    border-radius: 15px;
    font-weight: 500;
    font-size: 0.7rem;
    padding: 0.3em 0.7em;
}

.badge-primary { background: var(--primary-gradient); }
.badge-success { background: var(--success-color); }
.badge-info { background: var(--info-color); }
.badge-warning { background: var(--warning-color); color: #fff; }
.badge-secondary { background: #bfbfbf; }
.badge-danger { background: var(--danger-color); }

.table {
    margin-bottom: 0;
}

.table th {
    font-weight: 600;
    background: linear-gradient(135deg, #fafafa 0%, #f5f5f5 100%);
    color: var(--dark-color);
    border-bottom: 2px solid #e8e8e8;
    padding: 0.6rem;
}

.table td {
    vertical-align: middle;
    padding: 0.6rem;
    border-bottom: 1px solid #f0f0f0;
}

.table tbody tr:hover td {
    background: #fafafa;
}

.pagination {
    gap: 0.2rem;
}

.pagination .page-link {
    border: none;
    border-radius: var(--border-radius);
    padding: 0.4rem 0.7rem;
    color: #666;
    background: #fff;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-fast);
}

.pagination .page-link:hover {
    background: var(--primary-light);
    color: var(--primary-color);
}

.pagination .page-item.active .page-link {
    background: var(--primary-gradient);
    color: #fff;
}

.timeline {
    position: relative;
    padding-left: 35px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 12px;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, var(--primary-color) 0%, var(--info-color) 100%);
    border-radius: 3px;
}

.timeline-item {
    position: relative;
    margin-bottom: 1.5rem;
    animation: fadeInLeft 0.4s ease-out;
}

.timeline-marker {
    position: absolute;
    left: -35px;
    top: 0;
    z-index: 1;
}

.timeline-marker .badge {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 600;
    box-shadow: var(--shadow-sm);
}

.timeline-content {
    margin-left: 0.8rem;
}

.form-control {
    border: 2px solid #e8e8e8;
    border-radius: var(--border-radius);
    padding: 0.5rem 0.9rem;
    transition: all var(--transition-fast);
    background: #fff;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 104, 230, 0.1);
}

.breadcrumb {
    background: transparent;
    padding: 0;
    margin-bottom: 0.8rem;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    color: #ccc;
}

.breadcrumb-item a {
    color: #666;
    text-decoration: none;
    transition: color var(--transition-fast);
}

.breadcrumb-item a:hover {
    color: var(--primary-color);
}

footer {
    background: linear-gradient(135deg, #1a1a1a 0%, #0d0d0d 100%);
    color: rgba(255, 255, 255, 0.85);
    padding: 2.5rem 0 1.2rem;
    margin-top: auto;
}

footer h5 {
    color: #fff;
    font-weight: 600;
    margin-bottom: 1rem;
    font-size: 1rem;
}

footer a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: all var(--transition-fast);
}

footer a:hover {
    color: #fff;
    padding-left: 4px;
}

footer ul li {
    margin-bottom: 0.5rem;
}

.alert {
    border: none;
    border-radius: var(--border-radius);
    padding: 0.9rem 1.1rem;
    box-shadow: var(--shadow-sm);
}

.alert-info {
    background: var(--primary-light);
    color: var(--primary-dark);
    border-left: 3px solid var(--primary-color);
}

.alert-success {
    background: #e6f7ef;
    color: #006d4b;
    border-left: 3px solid var(--success-color);
}

.alert-warning {
    background: #fffbe6;
    color: #ad6800;
    border-left: 3px solid var(--warning-color);
}

code {
    background: #f5f5f5;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-size: 0.85rem;
    color: #d63384;
}

pre {
    background: #282c34;
    border-radius: var(--border-radius);
    padding: 1rem;
    overflow-x: auto;
}

pre code {
    background: transparent;
    color: #abb2bf;
    padding: 0;
}

.loading {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(0, 104, 230, 0.2);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: rotate 0.8s linear infinite;
}

.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--border-radius);
}

.list-group-item {
    transition: all var(--transition-fast);
    border-left: 2px solid transparent;
}

.list-group-item:hover {
    background: rgba(0, 104, 230, 0.03);
    border-left-color: var(--primary-color);
}

.decade-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.6rem;
    background: linear-gradient(135deg, #f0f0f0 0%, #e8e8e8 100%);
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
    color: #666;
    transition: all var(--transition-fast);
    cursor: default;
}

.decade-badge:hover {
    background: var(--primary-gradient);
    color: #fff;
}

.feature-card {
    position: relative;
    transition: all var(--transition-normal);
}

.feature-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.milestone-item {
    position: relative;
    padding-left: 1rem;
    border-left: 2px solid transparent;
    transition: all var(--transition-fast);
}

.milestone-item:hover {
    border-left-color: var(--primary-color);
    background: rgba(0, 104, 230, 0.02);
}

.milestone-item strong {
    color: var(--primary-color);
    font-size: 1rem;
}

.nav-tabs {
    border-bottom: 2px solid #f0f0f0;
}

.nav-tabs .nav-link {
    border: none;
    color: #666;
    font-weight: 500;
    padding: 0.6rem 1rem;
    transition: all var(--transition-fast);
}

.nav-tabs .nav-link.active {
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
}

.progress {
    height: 6px;
    border-radius: 3px;
    background: #f0f0f0;
}

.progress-bar {
    background: var(--primary-gradient);
    border-radius: 3px;
}

.modal-content {
    border: none;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
}

.modal-header {
    background: linear-gradient(135deg, #fafafa 0%, #f5f5f5 100%);
    border-bottom: 1px solid #eee;
}

.modal-footer {
    border-top: 1px solid #eee;
    background: #fafafa;
}

.dropdown-menu {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    padding: 0.4rem;
}

.dropdown-item {
    border-radius: var(--border-radius);
    padding: 0.4rem 0.8rem;
    transition: all var(--transition-fast);
}

.dropdown-item:hover {
    background: var(--primary-light);
    color: var(--primary-color);
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #aaa;
}

::selection {
    background: var(--primary-color);
    color: #fff;
}

@media (max-width: 991.98px) {
    .navbar-collapse {
        background: rgba(0, 0, 0, 0.1);
        border-radius: var(--border-radius);
        padding: 0.8rem;
        margin-top: 0.4rem;
    }
    
    .navbar-collapse .d-flex {
        flex-direction: column;
        width: 100%;
    }
    
    .navbar-collapse .search-box input {
        width: 100%;
        border-radius: var(--border-radius);
    }
    
    .hero-section {
        padding: 1.5rem 1rem;
    }
    
    .hero-section h1 {
        font-size: 1.4rem;
    }
    
    .stat-card .stat-value {
        font-size: 1.5rem;
    }
}

@media (max-width: 767.98px) {
    body {
        font-size: 13px;
    }
    
    .hero-section {
        padding: 1.2rem 0.8rem;
        border-radius: var(--border-radius);
    }
    
    .hero-section h1 {
        font-size: 1.2rem;
    }
    
    .hero-section .lead {
        font-size: 0.9rem;
    }
    
    .card {
        border-radius: var(--border-radius);
        margin-bottom: 0.8rem;
    }
    
    .card-body {
        padding: 0.8rem;
    }
    
    .stat-card {
        padding: 0.8rem 0.6rem;
    }
    
    .stat-card .stat-icon {
        width: 36px;
        height: 36px;
        font-size: 1.1rem;
    }
    
    .stat-card .stat-value {
        font-size: 1.3rem;
    }
    
    .stat-card .stat-label {
        font-size: 0.7rem;
    }
    
    .btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
    }
    
    .btn-lg {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    
    .main-search .form-control,
    .main-search .btn {
        border-radius: var(--border-radius);
    }
    
    .main-search .input-group {
        flex-direction: column;
        gap: 0.4rem;
    }
    
    .main-search .form-control {
        width: 100%;
    }
    
    .main-search .btn {
        width: 100%;
    }
    
    .timeline {
        padding-left: 28px;
    }
    
    .timeline::before {
        left: 10px;
    }
    
    .timeline-marker {
        left: -28px;
    }
    
    .timeline-marker .badge {
        width: 24px;
        height: 24px;
        font-size: 0.65rem;
    }
    
    footer {
        padding: 1.5rem 0 1rem;
    }
    
    footer h5 {
        font-size: 0.9rem;
        margin-bottom: 0.6rem;
    }
    
    .decade-badge {
        font-size: 0.7rem;
        padding: 0.25rem 0.5rem;
    }
    
    .feature-card .card-body {
        padding: 0.8rem !important;
    }
    
    .feature-card .card-body > div:first-child {
        font-size: 1.8rem !important;
        margin-bottom: 0.5rem !important;
    }
    
    .feature-card .card-title {
        font-size: 0.95rem;
    }
    
    .feature-card .card-text {
        font-size: 0.8rem;
    }
}

@media (max-width: 575.98px) {
    .container {
        padding-left: 0.6rem;
        padding-right: 0.6rem;
    }
    
    .hero-section {
        padding: 1rem 0.6rem;
    }
    
    .hero-section h1 {
        font-size: 1.1rem;
    }
    
    .row > [class*="col-"] {
        padding-left: 0.4rem;
        padding-right: 0.4rem;
    }
    
    .stat-card {
        padding: 0.6rem 0.4rem;
    }
    
    .stat-card .stat-icon {
        width: 32px;
        height: 32px;
        font-size: 1rem;
        margin-bottom: 0.4rem;
    }
    
    .stat-card .stat-value {
        font-size: 1.1rem;
    }
    
    .badge {
        font-size: 0.65rem;
        padding: 0.25em 0.6em;
    }
}

@media print {
    .navbar, footer, .btn, .search-form, .pagination {
        display: none !important;
    }
    
    body {
        background: #fff;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #e8e8e8;
    }
}
