/* 首页样式 - Metro UI */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: calc(var(--spacing-unit) * 8) calc(var(--spacing-unit) * 3);
    overflow-x: hidden;
}

.header {
    text-align: center;
    margin-bottom: calc(var(--spacing-unit) * 8);
}

.header h1 {
    font-size: 48px;
    font-weight: 300;
    margin-bottom: calc(var(--spacing-unit) * 2);
    color: var(--text-primary);
}

.subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: calc(var(--spacing-unit) * 5);
}

.search-bar {
    max-width: 600px;
    margin: 0 auto;
}

.search-form {
    display: flex;
    gap: calc(var(--spacing-unit) * 2);
}

.search-input {
    flex: 1;
    padding: calc(var(--spacing-unit) * 2) calc(var(--spacing-unit) * 3);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 15px;
    transition: border-color 0.15s;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.btn-search {
    padding: calc(var(--spacing-unit) * 2) calc(var(--spacing-unit) * 4);
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
    white-space: nowrap;
}

.btn-search:hover {
    background: var(--primary-hover);
}

/* 精品区域 */
.featured-section {
    margin-bottom: calc(var(--spacing-unit) * 8);
}

.featured-section h2 {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: calc(var(--spacing-unit) * 4);
    color: var(--text-primary);
}

.featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr));
    gap: calc(var(--spacing-unit) * 3);
}

.featured-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: calc(var(--spacing-unit) * 4);
    transition: border-color 0.15s;
    display: flex;
    flex-direction: column;
    min-height: 340px;
    overflow: hidden;
    box-sizing: border-box;
}

.featured-card:hover {
    border-color: var(--primary-color);
}

.featured-card h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: calc(var(--spacing-unit) * 2);
    color: var(--text-primary);
    line-height: 1.4;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    word-break: break-word;
    max-width: 100%;
}

.featured-desc {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-secondary);
    flex: 1;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.featured-meta {
    display: flex;
    gap: calc(var(--spacing-unit) * 3);
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: calc(var(--spacing-unit) * 3);
    padding-top: calc(var(--spacing-unit) * 2);
    border-top: 1px solid var(--border-color);
    margin-top: auto;
}

.btn-download {
    display: block;
    width: 100%;
    padding: calc(var(--spacing-unit) * 2) calc(var(--spacing-unit) * 3);
    background: var(--primary-color);
    color: white;
    text-align: center;
    text-decoration: none;
    border-radius: var(--border-radius);
    font-size: 14px;
    font-weight: 600;
    transition: background 0.15s;
    box-sizing: border-box;
}

.btn-download:hover {
    background: var(--primary-hover);
}

/* 普通分享区域 */
.regular-section {
    margin-bottom: calc(var(--spacing-unit) * 8);
}

.regular-section details {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
}

.regular-section summary {
    padding: calc(var(--spacing-unit) * 3) calc(var(--spacing-unit) * 4);
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    user-select: none;
}

.regular-section summary::-webkit-details-marker {
    display: none;
}

.regular-section summary h2 {
    font-size: 22px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.toggle-icon {
    transition: transform 0.2s;
    color: var(--text-secondary);
}

.regular-section details[open] .toggle-icon {
    transform: rotate(180deg);
}

.regular-list {
    border-top: 1px solid var(--border-color);
}

.regular-item {
    display: flex;
    align-items: center;
    gap: calc(var(--spacing-unit) * 2);
    padding: calc(var(--spacing-unit) * 2.5) calc(var(--spacing-unit) * 4);
    border-bottom: 1px solid var(--border-color);
    text-decoration: none;
    transition: background 0.15s;
}

.regular-item:last-child {
    border-bottom: none;
}

.regular-item:hover {
    background: var(--bg-color);
}

.regular-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: var(--bg-color);
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
}

.regular-content {
    flex: 1;
    min-width: 0;
}

.regular-preview {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: calc(var(--spacing-unit) * 0.5);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.regular-meta {
    display: flex;
    gap: calc(var(--spacing-unit) * 2);
    font-size: 13px;
    color: var(--text-secondary);
}

.regular-arrow {
    flex-shrink: 0;
    color: var(--text-secondary);
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: calc(var(--spacing-unit) * 10) calc(var(--spacing-unit) * 3);
    color: var(--text-secondary);
}

.empty-state svg {
    margin-bottom: calc(var(--spacing-unit) * 3);
    opacity: 0.5;
}

.empty-state p {
    font-size: 16px;
}

/* 响应式 */
@media (max-width: 768px) {
    .container {
        padding: calc(var(--spacing-unit) * 5) calc(var(--spacing-unit) * 2);
    }
    
    .header h1 {
        font-size: 36px;
    }
    
    .search-form {
        flex-direction: column;
    }
    
    .btn-search {
        width: 100%;
    }
    
    .featured-grid {
        grid-template-columns: 1fr;
        gap: calc(var(--spacing-unit) * 2);
    }
    
    .featured-card {
        padding: calc(var(--spacing-unit) * 3);
    }
    
    .featured-section h2,
    .regular-section summary h2 {
        font-size: 22px;
    }
    
    .regular-item {
        padding: calc(var(--spacing-unit) * 2) calc(var(--spacing-unit) * 2.5);
    }
    
    .regular-icon {
        width: 36px;
        height: 36px;
    }
}
