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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', sans-serif;
    background: #f0f2f5;
    min-height: 100vh;
    color: #333;
}

/* ===== 顶部搜索区域 ===== */
.search-hero {
    background: linear-gradient(135deg, #1a73e7 0%, #4285f6 50%, #6ea0ff 100%);
    padding: 60px 20px 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.search-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 60%);
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 700px;
    margin: 0 auto;
}

.hero-title {
    font-size: 36px;
    color: #fff;
    margin-bottom: 12px;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.hero-subtitle {
    font-size: 15px;
    color: rgba(255,255,255,0.9);
    margin-bottom: 30px;
}

.search-box {
    display: flex;
    background: #fff;
    border-radius: 50px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.search-box:focus-within {
    box-shadow: 0 12px 40px rgba(0,0,0,0.2);
}

.search-input {
    flex: 1;
    padding: 18px 30px;
    font-size: 17px;
    border: none;
    outline: none;
    color: #333;
    background: transparent;
}

.search-input::placeholder {
    color: #aaa;
}

.search-btn {
    padding: 18px 40px;
    background: linear-gradient(135deg, #1a73e7, #4285f6);
    color: #fff;
    font-size: 17px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-btn:hover {
    background: linear-gradient(135deg, #1557b0, #1a73e7);
}

.search-btn svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* ===== 结果区域 ===== */
.results-area {
    max-width: 1400px;
    margin: -40px auto 40px;
    padding: 0 20px;
    position: relative;
    z-index: 2;
    min-height: 500px;
}

.results-container {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    overflow: hidden;
    min-height: 500px;
    display: flex;
    flex-direction: column;
}

.results-header {
    background: #f8f9fa;
    padding: 16px 24px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.results-title {
    font-size: 16px;
    color: #666;
    font-weight: 500;
}

.results-title span {
    color: #1a73e7;
    font-weight: 700;
}

.placeholder {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 40px;
    color: #999;
}

.placeholder-icon {
    font-size: 80px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.placeholder-text {
    font-size: 18px;
    margin-bottom: 10px;
}

.placeholder-hint {
    font-size: 14px;
    color: #bbb;
}

/* ===== 加载状态 ===== */
.loading {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px;
}

.loading.active {
    display: flex;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #e0e0e0;
    border-top-color: #1a73e7;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 16px;
}

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

.loading-text {
    color: #999;
    font-size: 15px;
}

/* ===== 搜索结果列表（每行 3 个） ===== */
.results-list {
    padding: 20px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    align-items: stretch;
}

.results-count {
    grid-column: 1 / -1;
    padding: 0 4px 12px;
    font-size: 14px;
    color: #888;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.results-count b {
    color: #1a73e7;
}

/* ===== 结果内筛选 ===== */
.filter-box {
    position: relative;
    display: flex;
    align-items: center;
}

.filter-input {
    width: 250px;
    padding: 8px 32px 8px 14px;
    font-size: 13px;
    font-family: inherit;
    color: #333;
    border: 1px solid #dcdcdc;
    border-radius: 20px;
    outline: none;
    transition: all 0.2s ease;
}

.filter-input:focus {
    border-color: #1a73e7;
    box-shadow: 0 0 0 3px rgba(26,115,231,0.12);
}

.filter-clear {
    position: absolute;
    right: 7px;
    width: 18px;
    height: 18px;
    line-height: 17px;
    text-align: center;
    border: none;
    background: #e0e0e0;
    color: #666;
    border-radius: 50%;
    cursor: pointer;
    font-size: 12px;
    padding: 0;
    display: none;
    font-family: inherit;
}

.filter-clear:hover {
    background: #cfcfcf;
    color: #333;
}

.filter-empty {
    grid-column: 1 / -1;
    padding: 36px 4px;
    text-align: center;
    color: #999;
    font-size: 14px;
}

.result-item {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    padding: 18px 20px;
    transition: all 0.3s ease;
    min-width: 0;
}

.result-item:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    border-color: #1a73e7;
}

.result-head {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.result-title {
    font-size: 17px;
    color: #1a1a1a;
    font-weight: 600;
    line-height: 1.5;
    flex: 1;
    min-width: 200px;
}

.result-badge {
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.result-badge.driver {
    background: #e8f0fe;
    color: #1a73e7;
}

.result-badge.article {
    background: #fef3e2;
    color: #e8710a;
}

.result-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    margin-bottom: 14px;
    font-size: 13px;
    color: #888;
}

.result-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* ===== 下载地址列表 ===== */
.dl-section {
    margin-top: 4px;
    padding-top: 12px;
    border-top: 1px dashed #e0e0e0;
}

.dl-loading {
    font-size: 13px;
    color: #888;
    padding: 8px 0;
}

.dl-group {
    margin-bottom: 14px;
}

.dl-group:last-child {
    margin-bottom: 0;
}

/* ===== 区块标签（官方驱动下载 / 基础驱动 / 国产MAC） ===== */
.dl-block {
    margin-bottom: 18px;
}

.dl-block:last-child {
    margin-bottom: 0;
}

.dl-section-label {
    border-left: 4px solid #444;
    padding-left: 10px;
    font-size: 15px;
    font-weight: 700;
    color: #222;
    margin: 0 0 12px;
    line-height: 1.4;
}

.dl-block.official .dl-section-label {
    border-left-color: #0f9d58;
}

.dl-group-title {
    font-size: 13px;
    font-weight: 600;
    color: #444;
    margin-bottom: 8px;
    line-height: 1.5;
}

.dl-link-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.dl-tag {
    padding: 3px 9px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.dl-tag.official { background: #e6f4ea; color: #137333; }
.dl-tag.primary  { background: #e8f0fe; color: #1a73e7; }
.dl-tag.backup   { background: #f1f3f4; color: #5f6368; }
.dl-tag.pan      { background: #fce8e6; color: #c5221f; }
.dl-tag.download { background: #f1f3f4; color: #5f6368; }

.dl-btns {
    display: flex;
    gap: 6px;
}

.dl-btn-sm {
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    font-family: inherit;
    transition: all 0.2s ease;
}

.dl-btn-sm.go {
    background: linear-gradient(135deg, #1a73e7, #4285f6);
    color: #fff;
    text-decoration: none;
    display: inline-block;
}

.dl-btn-sm.go:hover { background: linear-gradient(135deg, #1557b0, #1a73e7); }

.dl-btn-sm.copy {
    background: #f1f3f4;
    color: #333;
}

.dl-btn-sm.copy:hover { background: #e0e0e0; }

.dl-empty {
    font-size: 13px;
    color: #999;
    padding: 8px 0;
}

.no-results {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.no-results-icon {
    font-size: 60px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.no-results-text {
    font-size: 16px;
    color: #666;
}

/* ===== 响应式 ===== */
@media (max-width: 1100px) {
    .results-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .search-hero {
        padding: 40px 16px 60px;
    }

    .hero-title {
        font-size: 26px;
    }

    .search-box {
        flex-direction: column;
        border-radius: 20px;
    }

    .search-input {
        padding: 16px 20px;
        text-align: center;
    }

    .search-btn {
        padding: 16px;
        border-radius: 0 0 20px 20px;
        justify-content: center;
    }

    .results-area {
        margin-top: -30px;
    }

    .results-list {
        grid-template-columns: 1fr;
    }

    .result-meta {
        flex-direction: column;
        gap: 8px;
    }
}
