/* 风扇数据库页面样式 */

.page-nav {
    margin-top: 15px;
    text-align: center;
}

.nav-link {
    color: #4a90e2;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 4px;
    transition: all 0.3s ease;
    display: inline-block;
}

.nav-link:hover {
    background: rgba(74, 144, 226, 0.1);
    color: #357abd;
}

.fans-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* 控制面板 */
.controls-section {
    margin-bottom: 25px;
    padding: 20px;
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: space-between;
}

.filter-group {
    flex: 1;
    min-width: 300px;
}

.filter-group h3 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 18px;
}

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

.filter-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-label {
    font-weight: 600;
    color: #555;
    font-size: 14px;
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 14px;
    color: #666;
    transition: color 0.2s;
}

.checkbox-group label:hover {
    color: #4a90e2;
}

.checkbox-group input[type="checkbox"] {
    cursor: pointer;
    width: 16px;
    height: 16px;
}

/* 搜索和排序组 */
.search-sort-group {
    display: flex;
    flex-direction: column;
    gap: 15px;
    min-width: 250px;
}

.search-box,
.sort-box {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

#search-input,
#sort-select {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.3s;
}

#search-input:focus,
#sort-select:focus {
    outline: none;
    border-color: #4a90e2;
}

#search-input {
    width: 100%;
}

#sort-select {
    cursor: pointer;
}

.btn-reset {
    padding: 10px 20px;
    background: #f44336;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
    align-self: flex-start;
}

.btn-reset:hover {
    background: #d32f2f;
}

/* 结果统计 */
.results-info {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
    color: #666;
    font-size: 14px;
}

.results-info strong {
    color: #4a90e2;
    font-size: 16px;
}

/* 风扇卡片网格 */
.fans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.fan-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.fan-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
    border-color: #4a90e2;
}

.fan-card-header {
    margin-bottom: 15px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f0f0f0;
}

.fan-name {
    margin: 0 0 5px 0;
    color: #333;
    font-size: 18px;
    font-weight: 700;
}

.fan-brand {
    color: #888;
    font-size: 13px;
    font-weight: 500;
}

.fan-specs {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.spec-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
}

.spec-label {
    color: #666;
    font-weight: 500;
}

.spec-value {
    color: #333;
    font-weight: 600;
    text-align: right;
}

.fan-description {
    margin-top: 12px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 6px;
    font-size: 13px;
}

.description-label {
    font-weight: 600;
    color: #555;
    margin-bottom: 6px;
}

.description-text {
    color: #666;
    line-height: 1.5;
}

.fan-price {
    margin-top: 15px;
    padding-top: 12px;
    border-top: 2px solid #f0f0f0;
    text-align: right;
}

.price-label {
    color: #666;
    font-size: 12px;
}

.price-value {
    color: #4caf50;
    font-size: 18px;
    font-weight: 700;
}

/* 无结果提示 */
.no-results {
    text-align: center;
    padding: 60px 20px;
    color: #999;
    font-size: 18px;
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    position: relative;
    animation: slideDown 0.3s;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

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

.modal-close {
    color: #aaa;
    float: right;
    font-size: 32px;
    font-weight: bold;
    line-height: 1;
    cursor: pointer;
    transition: color 0.3s;
}

.modal-close:hover,
.modal-close:focus {
    color: #000;
}

#modal-title {
    margin: 0 40px 20px 0;
    color: #333;
    font-size: 24px;
    font-weight: 700;
}

.modal-body {
    margin-top: 20px;
}

.detail-table {
    width: 100%;
    border-collapse: collapse;
}

.detail-table tr {
    border-bottom: 1px solid #f0f0f0;
}

.detail-table tr:last-child {
    border-bottom: none;
}

.detail-table td {
    padding: 12px 0;
    font-size: 15px;
}

.detail-table .detail-label {
    color: #666;
    font-weight: 600;
    width: 120px;
}

.detail-table .detail-value {
    color: #333;
    font-weight: 500;
}

.detail-description {
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
    line-height: 1.6;
    color: #555;
}

.detail-description-title {
    font-weight: 700;
    color: #333;
    margin-bottom: 8px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .fans-container {
        padding: 10px;
    }

    .filter-row {
        flex-direction: column;
    }

    .filter-options {
        grid-template-columns: 1fr;
    }

    .fans-grid {
        grid-template-columns: 1fr;
    }

    .modal-content {
        width: 95%;
        margin: 10% auto;
        padding: 20px;
    }

    #modal-title {
        font-size: 20px;
    }

    .detail-table td {
        font-size: 14px;
    }
}
