/* 基础重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
body {
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
}
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 0;
}
/* 亮色系主题 */
:root {
    --primary: #4299e1;
    --secondary: #38b2ac;
    --light: #ffffff;
    --gray: #f3f4f6;
    --dark: #2d3748;
}
/* 头部样式 */
header {
    background-color: var(--light);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 999;
}
.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
}
.nav-buttons {
    display: flex;
    gap: flex;
    gap: 15px;
}
.btn {
    padding: 8px 16px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}
.btn-primary {
    background-color: var(--primary);
    color: white;
}
.btn-primary:hover {
    background-color: #3182ce;
}
.btn-secondary {
    background-color: var(--secondary);
    color: white;
}
.btn-secondary:hover {
    background-color: #319795;
}
.btn-danger {
    background-color: #e53e3e;
    color: white;
}
.btn-danger:hover {
    background-color: #c53030;
}
/* 广告轮播样式 */
.ad-container {
    background-color: var(--light);
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    text-align: center;
}
.ad-slider {
    display: flex;
    overflow-x: auto;
    gap: 15px;
    padding: 10px 0;
    scrollbar-width: thin;
}
.ad-slider img {
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.3s ease;
}
.ad-slider img:hover {
    transform: scale(1.03);
}
.ad-placeholder {
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--gray);
    border-radius: 8px;
    flex: 1;
    color: #666;
}
/* 项目列表样式 */
.project-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 20px;
    margin: 30px 0;
}
@media (min-width: 768px) {
    .project-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (min-width: 1024px) {
    .project-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
.project-card {
    background-color: var(--light);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
    cursor: pointer;
}
.project-card:hover {
    transform: translateY(-5px);
}
.project-cover {
    height: 180px;
    width: 100%;
    object-fit: cover;
}
.project-info {
    padding: 15px;
}
.project-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--dark);
}
.project-publisher {
    color: #666;
    font-size: 14px;
}
/* 详情页样式 */
.detail-container {
    background-color: var(--light);
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    margin: 20px 0;
}
.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary);
    text-decoration: none;
    margin-bottom: 20px;
}
.project-detail-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--dark);
}
.project-desc {
    margin-bottom: 30px;
    line-height: 1.8;
    color: #4a5568;
}
.project-images {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 15px;
    margin-bottom: 30px;
}
@media (min-width: 768px) {
    .project-images {
        grid-template-columns: repeat(2, 1fr);
    }
}
.project-images img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
}
.views-count {
    color: #666;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}
/* 表单样式 */
.form-container {
    background-color: var(--light);
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    max-width: 600px;
    margin: 30px auto;
}
.form-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 25px;
    color: var(--dark);
    text-align: center;
}
.form-group {
    margin-bottom: 20px;
}
.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--dark);
}
.form-input {
    width.form-input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    transition: border 0.3s ease;
}
.form-input:focus {
    outline: none;
    border-color: var(--primary);
}
.form-upload {
    border: 2px dashed #ddd;
    padding: 20px;
    border-radius: 6px;
    text-align: center;
    cursor: pointer;
    transition: border 0.3s ease;
}
.form-upload:hover {
    border-color: var(--primary);
}
.form-upload p {
    color: #666;
    margin-bottom: 10px;
}
.form-btn {
    width: 100%;
    padding: 14px;
    font-size: 16px;
}
.form-hint {
    text-align: center;
    margin-top: 15px;
    color: #666;
}
.form-hint a {
    color: var(--primary);
    text-decoration: none;
}
/* 后台管理样式 */
.admin-container {
    background-color: var(--light);
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    margin: 20px 0;
}
.admin-tab {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    border-bottom: 1px solid #ddd;
    padding-bottom: 10px;
}
.admin-tab-item {
    padding: 8px 16px;
    cursor: pointer;
    color: var(--dark);
    font-weight: 500;
    border-bottom: 2px solid transparent;
}
.admin-tab-item.active {
    color: var(--primary);
    border-bottom: 2px solid var(--primary);
}
.admin-section {
    margin-bottom: 40px;
}
.admin-section-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--dark);
}
.table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}
.table th, .table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}
.table th {
    background-color: var(--gray);
    font-weight: 600;
}
.table-actions {
    display: flex;
    gap: 10px;
}
/* 响应式适配 */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 15px;
    }
    .nav-buttons {
        width: 100%;
        justify-content: center;
    }
    .form-container {
        padding: 20px;
        margin: 20px 10px;
    }
    .detail-container {
        padding: 20px;
    }
    .project-detail-title {
        font-size: 24px;
    }
}
