/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Helvetica Neue', Arial, sans-serif;
}

body {
    background-color: #f8f8f8;
    color: #333;
    line-height: 1.6;
}

a {
    color: #555;
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: #000;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 顶部导航 */
header {
    background-color: rgba(255, 255, 255, 0.95);
    padding: 20px 0;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    letter-spacing: 1px;
}

.logo a {
    color: #333;
    text-decoration: none;
}

.logo a:hover {
    color: #000;
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 30px;
}

.nav-links a {
    font-size: 16px;
    font-weight: 500;
    position: relative;
    padding-bottom: 5px;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #000;
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

/* 欢迎面板/封面 */
.hero {
    height: 100vh;
    background-position: center;
    background-size: cover;
    background-attachment: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin-bottom: 60px;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.3);
}

.hero-content {
    text-align: center;
    color: #fff;
    position: relative;
    z-index: 1;
    animation: fadeIn 2s ease;
}

.hero-title {
    font-size: 3.5rem;
    margin-bottom: 20px;
    letter-spacing: 2px;
}

.hero-text {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 30px;
}

/* 作品展示 */
.works-section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 50px;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 70px;
    height: 3px;
    background-color: #555;
}

.works-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.work-card {
    background-color: #fff;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.work-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.work-image {
    height: 250px;
    overflow: hidden;
}

.work-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.work-card:hover .work-image img {
    transform: scale(1.1);
}

.work-details {
    padding: 20px;
}

.work-title {
    font-size: 1.4rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.work-title::before {
    content: '';
    display: inline-block;
    width: 18px;
    height: 18px;
    margin-right: 8px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23333'%3E%3Cpath d='M12,11.5A2.5,2.5 0 0,1 9.5,9A2.5,2.5 0 0,1 12,6.5A2.5,2.5 0 0,1 14.5,9A2.5,2.5 0 0,1 12,11.5M12,2A7,7 0 0,0 5,9C5,14.25 12,22 12,22C12,22 19,14.25 19,9A7,7 0 0,0 12,2Z'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
}

.work-description {
    color: #777;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.work-meta {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    color: #888;
    font-size: 0.9rem;
}

.work-time {
    display: flex;
    align-items: center;
}

.time-icon {
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-right: 5px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23888'%3E%3Cpath d='M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M12,4A8,8 0 0,1 20,12A8,8 0 0,1 12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4M12.5,7H11V13L16.2,16.2L17,14.9L12.5,12.2V7Z'/%3E%3C/svg%3E");
    background-size: contain;
}

.view-more {
    display: inline-block;
    padding: 8px 20px;
    background-color: #f5f5f5;
    border-radius: 4px;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.view-more:hover {
    background-color: #e0e0e0;
}

/* 作品详情页 */
.work-detail {
    padding: 120px 0 80px;
}

.work-detail-header {
    margin-bottom: 40px;
}

.work-detail-title {
    font-size: 2.5rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.work-detail-title::before {
    content: '';
    display: inline-block;
    width: 30px;
    height: 30px;
    margin-right: 10px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23333'%3E%3Cpath d='M12,11.5A2.5,2.5 0 0,1 9.5,9A2.5,2.5 0 0,1 12,6.5A2.5,2.5 0 0,1 14.5,9A2.5,2.5 0 0,1 12,11.5M12,2A7,7 0 0,0 5,9C5,14.25 12,22 12,22C12,22 19,14.25 19,9A7,7 0 0,0 12,2Z'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
}

.work-detail-header .work-meta {
    margin-bottom: 20px;
    font-size: 1rem;
}

.work-detail-description {
    font-size: 1.1rem;
    color: #555;
    margin-bottom: 30px;
    line-height: 1.8;
}

.gallery {
    margin-bottom: 50px;
}

.gallery-image {
    margin-bottom: 20px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.gallery-image img {
    width: 100%;
    display: block;
}

.back-to-works {
    display: inline-block;
    margin-top: 20px;
    padding: 10px 25px;
    background-color: #f5f5f5;
    border-radius: 4px;
    font-weight: 500;
}

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

.modal-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    position: relative;
    top: 50%;
    transform: translateY(-50%);
    animation: zoom 0.3s;
}

.modal-caption {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
    text-align: center;
    color: white;
    padding: 10px 0;
    height: 50px;
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
}

.close-modal:hover,
.close-modal:focus {
    color: #bbb;
    text-decoration: none;
}

.zoomable-image {
    cursor: pointer;
}

@keyframes zoom {
    from {transform: scale(0) translateY(-50%);}
    to {transform: scale(1) translateY(-50%);}
}

/* 页脚 */
footer {
    background-color: #333;
    color: #fff;
    padding: 50px 0 30px;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}

.footer-info {
    max-width: 400px;
    margin-bottom: 30px;
}

.footer-title {
    font-size: 1.5rem;
    margin-bottom: 20px;
}

.footer-text {
    color: #ddd;
    line-height: 1.8;
}

.footer-links {
    margin-bottom: 30px;
}

.footer-links h3 {
    margin-bottom: 20px;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: #ddd;
}

.footer-links a:hover {
    color: #fff;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid #444;
    margin-top: 30px;
    color: #aaa;
}

/* 管理后台样式 */
.admin-container {
    max-width: 1200px;
    margin: 80px auto 30px;
    padding: 20px;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    border-bottom: 1px solid #eee;
    padding-bottom: 20px;
}

.admin-title {
    font-size: 1.8rem;
}

.admin-logout {
    padding: 8px 20px;
    background-color: #f5f5f5;
    border-radius: 4px;
    font-weight: 500;
}

.admin-nav {
    display: flex;
    background-color: #f5f5f5;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.admin-nav a {
    margin-right: 20px;
    padding: 8px 15px;
    border-radius: 4px;
}

.admin-nav a.active {
    background-color: #333;
    color: #fff;
}

.admin-card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    padding: 30px;
    margin-bottom: 30px;
}

.admin-form-group {
    margin-bottom: 20px;
}

.admin-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.admin-form-group input,
.admin-form-group textarea,
.admin-form-group select {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.admin-form-group textarea {
    height: 150px;
    resize: vertical;
}

.admin-button {
    padding: 10px 25px;
    background-color: #333;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.admin-button:hover {
    background-color: #555;
}

.admin-button.secondary {
    background-color: #f5f5f5;
    color: #333;
}

.admin-button.secondary:hover {
    background-color: #e0e0e0;
}

.work-list {
    width: 100%;
    border-collapse: collapse;
}

.work-list th, 
.work-list td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.work-list th {
    background-color: #f8f8f8;
    font-weight: 500;
}

.work-list tr:hover {
    background-color: #fafafa;
}

.action-buttons {
    display: flex;
    gap: 10px;
}

.action-button {
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.9rem;
}

.edit-button {
    background-color: #f5f5f5;
}

.delete-button {
    background-color: #ffebee;
    color: #c62828;
}

.alert {
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.alert-success {
    background-color: #e8f5e9;
    color: #2e7d32;
}

.alert-error {
    background-color: #ffebee;
    color: #c62828;
}

.login-container {
    max-width: 400px;
    margin: 120px auto;
    padding: 30px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-title {
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.login-form {
    margin-bottom: 20px;
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.8s ease forwards;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-text {
        font-size: 1rem;
    }
    
    .works-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .work-detail-title {
        font-size: 2rem;
    }
    
    .admin-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .admin-logout {
        margin-top: 15px;
    }
    
    .admin-nav {
        flex-wrap: wrap;
    }
    
    .admin-nav a {
        margin-bottom: 10px;
    }
    
    .modal-content {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .work-list th:nth-child(3),
    .work-list td:nth-child(3) {
        display: none;
    }
    
    .close-modal {
        top: 10px;
        right: 20px;
        font-size: 30px;
    }
} 