/* ============================================
   新功能页面通用样式 (9个新功能页共用)
   - 文库 / 源码 / 音乐 / 相册 / 导航
   - 投稿 / 证书 / 简历 / 赞助
============================================ */
:root {
    --primary: #6366f1;
    --primary-light: #818cf8;
    --secondary: #ec4899;
    --gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --bg-soft: #f8fafc;
    --card-shadow: 0 4px 6px -1px rgba(0,0,0,.05), 0 2px 4px -2px rgba(0,0,0,.05);
    --card-shadow-hover: 0 10px 25px -3px rgba(0,0,0,.1), 0 4px 10px -2px rgba(0,0,0,.04);
}

.page-banner {
    padding: 70px 0 50px;
    text-align: center;
    background: var(--gradient);
    color: white;
    margin-bottom: 50px;
    position: relative;
    overflow: hidden;
}
.page-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 50%, rgba(255,255,255,.15) 0%, transparent 50%);
}
.page-banner h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 12px;
    position: relative;
}
.page-banner p {
    font-size: 1.1rem;
    opacity: .9;
    position: relative;
}

.feat-container {
    max-width: 1200px;
    margin: 0 auto 80px;
    padding: 0 20px;
}

.feat-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 30px;
    align-items: center;
    background: white;
    padding: 16px 20px;
    border-radius: 14px;
    box-shadow: var(--card-shadow);
}
.feat-toolbar .search-box {
    flex: 1;
    min-width: 220px;
    display: flex;
    align-items: center;
    background: var(--bg-soft);
    border-radius: 10px;
    padding: 8px 14px;
}
.feat-toolbar input,
.feat-toolbar select {
    border: none;
    background: transparent;
    outline: none;
    flex: 1;
    font-size: 14px;
    color: #334155;
}
.feat-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}
.feat-tab {
    padding: 8px 18px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    color: #475569;
    text-decoration: none;
    font-size: 14px;
    transition: all .2s;
    cursor: pointer;
}
.feat-tab:hover { color: var(--primary); border-color: var(--primary); }
.feat-tab.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.feat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 22px;
}
.feat-grid.cols-2 { grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); }
.feat-grid.cols-4 { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }

.feat-card {
    background: white;
    border-radius: 14px;
    box-shadow: var(--card-shadow);
    overflow: hidden;
    transition: all .25s;
    display: flex;
    flex-direction: column;
}
.feat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--card-shadow-hover);
}
.feat-card .cover {
    width: 100%;
    height: 180px;
    object-fit: cover;
    background: var(--bg-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #cbd5e1;
    font-size: 40px;
    position: relative;
    overflow: hidden;
}
.feat-card .cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.feat-card .badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0,0,0,.55);
    color: white;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12px;
    backdrop-filter: blur(8px);
}
.feat-card .body {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.feat-card h3 {
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 8px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.feat-card .meta {
    color: #94a3b8;
    font-size: 13px;
    margin-bottom: 10px;
}
.feat-card .desc {
    color: #64748b;
    font-size: 13px;
    line-height: 1.6;
    margin-bottom: 14px;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.feat-card .actions {
    display: flex;
    gap: 8px;
    margin-top: auto;
}
.feat-card .btn-sm {
    flex: 1;
    text-align: center;
    padding: 7px 12px;
    background: var(--bg-soft);
    color: #475569;
    border-radius: 8px;
    text-decoration: none;
    font-size: 13px;
    transition: all .2s;
}
.feat-card .btn-sm:hover {
    background: var(--primary);
    color: white;
}
.feat-card .btn-sm.primary {
    background: var(--primary);
    color: white;
}
.feat-card .btn-sm.primary:hover {
    background: var(--primary-light);
}

.feat-empty {
    text-align: center;
    padding: 80px 20px;
    color: #94a3b8;
    background: white;
    border-radius: 14px;
    box-shadow: var(--card-shadow);
}
.feat-empty i {
    font-size: 60px;
    margin-bottom: 16px;
    opacity: .5;
}

.feat-pagination {
    margin-top: 40px;
    display: flex;
    justify-content: center;
    gap: 6px;
}
.feat-pagination a, .feat-pagination span {
    padding: 8px 14px;
    background: white;
    border-radius: 8px;
    color: #475569;
    text-decoration: none;
    box-shadow: var(--card-shadow);
    font-size: 14px;
}
.feat-pagination a:hover { background: var(--primary); color: white; }
.feat-pagination .active { background: var(--primary); color: white; }

.section-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.section-title i { color: var(--primary); }
.section-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, #e2e8f0, transparent);
    margin-left: 10px;
}

/* 详情页 */
.feat-detail {
    max-width: 1000px;
    margin: 40px auto;
    background: white;
    border-radius: 14px;
    box-shadow: var(--card-shadow);
    overflow: hidden;
}
.feat-detail .hero {
    padding: 40px;
    background: var(--gradient);
    color: white;
}
.feat-detail .hero h1 {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 12px;
}
.feat-detail .meta {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
    color: rgba(255,255,255,.85);
    font-size: 14px;
}
.feat-detail .body {
    padding: 40px;
    line-height: 1.8;
    color: #334155;
}
.feat-detail .body img { max-width: 100%; border-radius: 8px; }

/* 投稿表单 */
.feat-form {
    max-width: 800px;
    margin: 40px auto;
    background: white;
    border-radius: 14px;
    box-shadow: var(--card-shadow);
    padding: 40px;
}
.feat-form .form-row {
    margin-bottom: 22px;
}
.feat-form label {
    display: block;
    margin-bottom: 8px;
    color: #334155;
    font-weight: 600;
    font-size: 14px;
}
.feat-form input,
.feat-form textarea,
.feat-form select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: var(--bg-soft);
    outline: none;
    font-size: 14px;
    transition: all .2s;
}
.feat-form input:focus,
.feat-form textarea:focus,
.feat-form select:focus {
    border-color: var(--primary);
    background: white;
}
.feat-form textarea {
    min-height: 200px;
    resize: vertical;
    font-family: inherit;
}
.feat-form .btn-submit {
    width: 100%;
    padding: 12px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all .2s;
}
.feat-form .btn-submit:hover { background: var(--primary-light); }

.alert {
    padding: 14px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}
.alert.success { background: #d1fae5; color: #065f46; }
.alert.error { background: #fee2e2; color: #991b1b; }
.alert.info { background: #dbeafe; color: #1e40af; }

@media (max-width: 768px) {
    .page-banner h1 { font-size: 1.8rem; }
    .feat-grid { grid-template-columns: 1fr; }
    .feat-detail .hero { padding: 24px; }
    .feat-detail .body { padding: 24px; }
    .feat-form { padding: 24px; }
}
