/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans SC', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

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

.contest-container {
    margin-left: 340px;
}

@media (max-width: 1200px) {
    .timeline-background {
        width: 280px;
    }
    
    .timeline-bg-content {
        width: 140px;
        padding: 120px 15px 40px 25px;
    }
    
    .timeline-story {
        width: 140px;
        padding: 120px 20px 40px 20px;
    }
    
    .contest-container {
        margin-left: 300px;
    }
}

@media (max-width: 768px) {
    .timeline-background {
        display: none;
    }
    
    .contest-container {
        margin-left: 0;
    }
}

/* 导航栏样式 */
.navbar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo h1 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.2rem;
}

.nav-logo span {
    font-size: 0.9rem;
    opacity: 0.9;
}

.nav-menu {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: #ffd700;
    transform: translateY(-2px);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background: #ffd700;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: white;
    margin: 3px 0;
    transition: 0.3s;
}

/* 主要内容区域 */
.main-content {
    min-height: calc(100vh - 200px);
}

/* 英雄区域 */
.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4rem 0;
    display: flex;
    align-items: center;
    min-height: 50vh; /* 适中高度 */
    position: relative;
    overflow: hidden;
    opacity: 0.3; /* 初始半透明，等图片加载完成后变为完全不透明 */
    transition: opacity 0.5s ease;
}

.hero-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.hero-bg-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.35), rgba(0,0,0,0.25));
}

.hero-row {
    position: absolute;
    display: flex;
    gap: 12px;
    width: max-content;
    opacity: 0.35;
}

.hero-row img {
    border-radius: 12px;
    object-fit: cover;
    box-shadow: 0 10px 25px rgba(0,0,0,0.25);
    filter: saturate(1.05) contrast(1.05);
    width: 300px;
    will-change: transform;
    backface-visibility: hidden;
    transform: translateZ(0); /* 启用硬件加速 */
    image-rendering: -webkit-optimize-contrast; /* 优化图片渲染 */
    height: 180px;
}

.hero-row-top {
    top: 5%; /* 更靠上 */
    animation: slideLeft 120s linear infinite;
}

.hero-row-bottom {
    bottom: 5%; /* 更靠下 */
    animation: slideRight 130s linear infinite;
}

@keyframes slideLeft {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

@keyframes slideRight {
    from { transform: translateX(-50%); }
    to { transform: translateX(0); }
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-content h2 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
}

.hero-image {
    display: none;
}

.hero-placeholder {
    display: none;
}

/* 优化移动端的背景图大小与间距 */
@media (max-width: 768px) {
    .hero-section { min-height: 42vh; }
    .hero-row img { width: 260px; height: 170px; }
    .hero-row-top { top: 3%; }
    .hero-row-bottom { bottom: 3%; }
}
@media (max-width: 480px) {
    .hero-section { min-height: 38vh; }
    .hero-row img { width: 200px; height: 140px; }
    .hero-row-top { top: 2%; }
    .hero-row-bottom { bottom: 2%; }
}

/* 减少动态效果（无障碍） */
@media (prefers-reduced-motion: reduce) {
    .hero-row-top,
    .hero-row-bottom {
        animation: none !important;
        opacity: 0.22;
    }
}

/* 搜索区域 */
.search-section {
    background: white;
    padding: 2rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.search-bar {
    display: flex;
    max-width: 600px;
    margin: 0 auto 2rem;
    background: #f8f9fa;
    border-radius: 50px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.search-bar input {
    flex: 1;
    padding: 1rem 1.5rem;
    border: none;
    background: transparent;
    font-size: 1rem;
    outline: none;
}

.search-bar button {
    padding: 1rem 1.5rem;
    border: none;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-bar button:hover {
    transform: scale(1.05);
}

.filter-tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-tab {
    padding: 0.8rem 1.5rem;
    border: 2px solid #e9ecef;
    background: white;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.filter-tab:hover,
.filter-tab.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: transparent;
    transform: translateY(-2px);
}

/* 精选作品区域 */
.featured-section {
    padding: 4rem 0;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
    color: #333;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
}

/* 作品墙页面样式 */
.gallery-header {
    text-align: center;
    margin-bottom: 40px;
}

.section-subtitle {
    color: #7f8c8d;
    font-size: 1.1em;
    margin-top: 10px;
}

.filter-bar {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-group label {
    font-weight: 600;
    color: #2c3e50;
    white-space: nowrap;
}

.filter-group select {
    padding: 8px 12px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 14px;
    background: white;
    transition: border-color 0.3s ease;
}

.filter-group select:focus {
    outline: none;
    border-color: #667eea;
}

.btn-filter {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-filter:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(102, 126, 234, 0.3);
}

.loading-message {
    text-align: center;
    padding: 60px 20px;
    color: #7f8c8d;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.load-more-container {
    text-align: center;
    margin-top: 40px;
}

.btn-load-more {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-load-more:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.photo-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

.photo-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.photo-image {
    width: 100%;
    height: 160px;
    object-fit: cover;
    transition: transform 0.3s ease;
    background: linear-gradient(45deg, #f0f0f0, #e0e0e0);
}

/* 占位图加载动画 */
.photo-image[src*="data:image/svg"] {
    animation: placeholderPulse 2s ease-in-out infinite;
}

@keyframes placeholderPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

/* 简化的按钮样式 - 覆盖复杂样式 */
.photo-card .btn-like, 
.photo-card .btn-comment {
    background: #e74c3c !important;
    color: white !important;
    border: none !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    gap: 0.4rem !important;
    padding: 0.6rem 1rem !important;
    border-radius: 20px !important;
    transition: all 0.3s ease !important;
    font-size: 0.9rem !important;
    font-weight: 500 !important;
    min-width: 70px !important;
    justify-content: center !important;
    box-shadow: 0 2px 8px rgba(231, 76, 60, 0.3) !important;
    transform: none !important;
    animation: none !important;
}

.photo-card .btn-comment {
    background: #3498db !important;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.3) !important;
}

.photo-card .btn-like:hover {
    background: #c0392b !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.4) !important;
}

.photo-card .btn-comment:hover {
    background: #2980b9 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.4) !important;
}

.photo-card .btn-like.liked {
    background: #c0392b !important;
    color: white !important;
    font-weight: bold !important;
    transform: none !important;
    animation: none !important;
}

.photo-card .btn-like.liked:hover {
    background: #a93226 !important;
}

.photo-card:hover .photo-image {
    transform: scale(1.05);
}

.photo-info {
    padding: 0.8rem;
}

.photo-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
    color: #2c3e50;
}

.photo-author {
    color: #7f8c8d;
    font-size: 0.85rem;
    margin-bottom: 0.2rem;
}

.photo-date {
    color: #95a5a6;
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
}

.photo-description {
    color: #34495e;
    font-size: 0.85rem;
    line-height: 1.4;
    margin-bottom: 0.8rem;
    max-height: 40px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.photo-actions {
    display: flex !important;
    justify-content: center !important;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.photo-buttons {
    display: flex !important;
    gap: 2rem !important;
    justify-content: flex-start !important;
    align-items: center !important;
}

.photo-buttons .like-btn {
    margin-right: 0 !important;
}

.photo-buttons .comment-btn {
    margin-left: 1rem !important;
}

.photo-stats {
    display: flex;
    gap: 1rem;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    color: #666;
    font-size: 0.9rem;
}

.load-more {
    text-align: center;
}

/* 统计信息区域 */
.stats-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 3rem 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    text-align: center;
}

.stat-item {
    padding: 1.5rem;
    background: rgba(255,255,255,0.1);
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #ffd700;
}

.stat-label {
    font-size: 1rem;
    opacity: 0.9;
}

/* 页脚 */
.footer {
    background: #2c3e50;
    color: white;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    margin-bottom: 1rem;
    color: #ffd700;
}

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

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: #ffd700;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #34495e;
    color: #bdc3c7;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 2% auto;
    padding: 0;
    border-radius: 15px;
    width: 90%;
    max-width: 1000px;
    max-height: 90vh;
    overflow: hidden;
    position: relative;
    animation: modalSlideIn 0.3s ease;
}

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

.close {
    position: absolute;
    top: 15px;
    right: 20px;
    color: white;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    z-index: 2001;
    background: rgba(0,0,0,0.5);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.close:hover {
    background: rgba(0,0,0,0.8);
    transform: scale(1.1);
}

.modal-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 500px;
}

.modal-image {
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.modal-info {
    padding: 2rem;
    overflow-y: auto;
}

.modal-info h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: #333;
}

.modal-author {
    color: #666;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.modal-date {
    color: #999;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.modal-description {
    color: #555;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.modal-actions {
    display: flex !important;
    gap: 1.2rem !important;
    justify-content: center !important;
    margin-top: 1rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

.comments-section h4 {
    margin-bottom: 1rem;
    color: #333;
}

.comment-form {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.comment-form input {
    flex: 1;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 25px;
    outline: none;
    font-size: 0.9rem;
}

.comment-form input:focus {
    border-color: #667eea;
}

.comments-list {
    max-height: 200px;
    overflow-y: auto;
}

.comment-item {
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 10px;
    margin-bottom: 0.5rem;
}

.comment-author {
    font-weight: 600;
    color: #333;
    margin-bottom: 0.3rem;
}

.comment-text {
    color: #555;
    font-size: 0.9rem;
}

.comment-date {
    color: #999;
    font-size: 0.8rem;
    margin-top: 0.3rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-content h2 {
        font-size: 2rem;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .photo-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-body {
        grid-template-columns: 1fr;
    }
    
    .modal-image {
        height: 300px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .filter-tabs {
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 0.5rem;
    }
    
    .filter-tab {
        white-space: nowrap;
        flex-shrink: 0;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .hero-section {
        padding: 2rem 0;
    }
    
    .hero-content h2 {
        font-size: 1.5rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        width: 95%;
        margin: 5% auto;
    }
}

/* ====== 时间轴 Timeline ====== */
.timeline-section {
    background: #ffffff;
    padding: 3rem 0 4rem;
}

.timeline-wrapper {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
}

.timeline-line {
    position: absolute;
    left: 20px;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, #667eea, #764ba2);
    border-radius: 2px;
}

.timeline-item {
    position: relative;
    padding-left: 70px;
    margin-bottom: 1.8rem;
}

.timeline-dot {
    position: absolute;
    left: 12px;
    width: 20px;
    height: 20px;
    background: #ffd700;
    border: 4px solid #ffffff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border-radius: 50%;
}

.timeline-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    padding: 1rem 1.25rem;
    border: 1px solid #f1f3f5;
}

.timeline-year {
    font-weight: 700;
    color: #764ba2;
    margin-bottom: 0.25rem;
}

.timeline-desc {
    color: #495057;
}

@media (max-width: 600px) {
    .timeline-item { padding-left: 58px; }
    .timeline-line { left: 16px; }
    .timeline-dot { left: 8px; }
}

/* 统一卡片与模态中的操作按钮大小 */
.photo-actions .btn,
.modal-actions .btn {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: all 0.3s ease;
}

/* 点赞按钮动画效果 */
.btn-like {
    position: relative;
    overflow: visible;
    transition: all 0.3s ease;
}

.btn-like.liked {
    background: linear-gradient(135deg, #ff4757, #ff3838) !important;
    color: white !important;
    transform: scale(1.3) !important;
    box-shadow: 0 8px 25px rgba(255, 71, 87, 0.6), 0 0 0 10px rgba(255, 71, 87, 0.1) !important;
    border: 2px solid #ff4757 !important;
    animation: likeExplosion 0.8s ease-out;
}

.btn-like.liked::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.8) 0%, rgba(255, 255, 255, 0.4) 50%, transparent 100%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: likePulse 0.8s ease-out;
    z-index: 1;
}

.btn-like.liked::after {
    content: '❤️';
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 20px;
    animation: heartFloat 1.2s ease-out forwards;
    z-index: 2;
}

@keyframes likePulse {
    0% {
        width: 0;
        height: 0;
        opacity: 1;
    }
    50% {
        width: 150px;
        height: 150px;
        opacity: 0.8;
    }
    100% {
        width: 200px;
        height: 200px;
        opacity: 0;
    }
}

@keyframes heartFloat {
    0% {
        opacity: 1;
        transform: translateX(-50%) translateY(0) scale(1);
    }
    50% {
        opacity: 0.8;
        transform: translateX(-50%) translateY(-30px) scale(1.2);
    }
    100% {
        opacity: 0;
        transform: translateX(-50%) translateY(-60px) scale(0.8);
    }
}

@keyframes likeExplosion {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 71, 87, 0.7);
    }
    25% {
        transform: scale(1.4);
        box-shadow: 0 0 0 15px rgba(255, 71, 87, 0.3);
    }
    50% {
        transform: scale(1.2);
        box-shadow: 0 0 0 25px rgba(255, 71, 87, 0.1);
    }
    75% {
        transform: scale(1.3);
        box-shadow: 0 0 0 35px rgba(255, 71, 87, 0.05);
    }
    100% {
        transform: scale(1.3);
        box-shadow: 0 8px 25px rgba(255, 71, 87, 0.6), 0 0 0 10px rgba(255, 71, 87, 0.1);
    }
}

.btn-like.liked i {
    animation: heartBeat 0.8s ease-in-out;
    color: white !important;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}

@keyframes heartBeat {
    0% { 
        transform: scale(1) rotate(0deg);
        color: white;
    }
    15% { 
        transform: scale(1.5) rotate(-5deg);
        color: #ffebee;
    }
    30% { 
        transform: scale(1.2) rotate(5deg);
        color: white;
    }
    45% { 
        transform: scale(1.6) rotate(-3deg);
        color: #ffebee;
    }
    60% { 
        transform: scale(1.3) rotate(3deg);
        color: white;
    }
    75% { 
        transform: scale(1.4) rotate(-2deg);
        color: #ffebee;
    }
    100% { 
        transform: scale(1.2) rotate(0deg);
        color: white;
    }
}

/* 添加粒子效果 */
.btn-like.liked .particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: #ff4757;
    border-radius: 50%;
    animation: particleFloat 1s ease-out forwards;
}

@keyframes particleFloat {
    0% {
        opacity: 1;
        transform: scale(1) translate(0, 0);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.2) translate(var(--end-x, 0), var(--end-y, 0));
    }
    100% {
        opacity: 0;
        transform: scale(0) translate(var(--end-x, 0), var(--end-y, 0));
    }
}

/* 添加屏幕震动效果 */
@keyframes screenShake {
    0%, 100% { transform: translateX(0); }
    10% { transform: translateX(-2px); }
    20% { transform: translateX(2px); }
    30% { transform: translateX(-2px); }
    40% { transform: translateX(2px); }
    50% { transform: translateX(-1px); }
    60% { transform: translateX(1px); }
    70% { transform: translateX(-1px); }
    80% { transform: translateX(1px); }
    90% { transform: translateX(-1px); }
}

/* 点赞时的屏幕震动 */
.like-screen-shake {
    animation: screenShake 0.5s ease-in-out;
}




/* 左侧时间轴背景 */
.timeline-background {
    position: fixed;
    left: 0;
    top: 0;
    width: 320px;
    height: 100vh;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    backdrop-filter: blur(2px);
    z-index: 1;
    pointer-events: auto;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
}

.timeline-bg-content {
    width: 150px;
    padding: 120px 15px 40px 30px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.timeline-story {
    width: 230px;
    padding: 120px 30px 40px 15px;
    height: 100%;
    overflow-y: auto;
    pointer-events: auto;
}

.story-content {
    opacity: 0.4;
    transition: opacity 0.3s ease;
}

.story-content:hover {
    opacity: 0.8;
}

.story-content p {
    margin-bottom: 1.2rem;
    line-height: 1.6;
    font-size: 0.85rem;
    color: #555;
    text-align: justify;
}

.story-images {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin: 1rem 0;
    overflow: hidden;
    border-radius: 8px;
}

.story-img {
    width: 100%;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
    opacity: 0.5;
    transition: all 0.3s ease;
    animation: imageScroll 8s ease-in-out infinite;
}

.story-img:nth-child(1) { animation-delay: 0s; }
.story-img:nth-child(2) { animation-delay: 2s; }
.story-img:nth-child(3) { animation-delay: 4s; }
.story-img:nth-child(4) { animation-delay: 6s; }

.story-img:hover {
    opacity: 0.8;
    transform: scale(1.05);
}

@keyframes imageScroll {
    0%, 20% {
        opacity: 0.5;
        transform: scale(1);
    }
    25%, 75% {
        opacity: 0.8;
        transform: scale(1.02);
    }
    80%, 100% {
        opacity: 0.5;
        transform: scale(1);
    }
}

.timeline-bg-item {
    opacity: 0.3;
    margin-bottom: 30px;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    border-left: 3px solid rgba(102, 126, 234, 0.3);
    transition: opacity 0.3s ease;
}

.timeline-bg-item:hover {
    opacity: 0.6;
}

.timeline-bg-year {
    font-size: 1rem;
    font-weight: 600;
    color: #667eea;
    margin-bottom: 4px;
}

.timeline-bg-desc {
    font-size: 0.8rem;
    color: #666;
    line-height: 1.3;
}

@media (max-width: 1200px) {
    .timeline-background {
        width: 220px;
    }
    
    .timeline-bg-content {
        padding: 120px 25px 40px 25px;
    }
    
    /* 冬至游园会在中等屏幕上保持特殊样式 */
    .winter-festival-image.book-flip {
        height: 250px; /* 保持较大高度 */
    }
}

@media (max-width: 768px) {
    .timeline-background {
        display: none;
    }
}

.plane-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #ffd700, #ff9f1a);
    color: #333;
    box-shadow: 0 10px 24px rgba(0,0,0,0.18);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform .2s ease, box-shadow .2s ease;
}

.plane-btn:hover { transform: translateY(-2px) rotate(-6deg); box-shadow: 0 14px 28px rgba(0,0,0,0.22); }

.plane-icon {
    width: 26px;
    height: 26px;
    display: inline-block;
    background: currentColor;
    -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23000"><path d="M2.01 21L23 12 2.01 3 2 10l15 2-15 2z"/></svg>') center / contain no-repeat;
            mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23000"><path d="M2.01 21L23 12 2.01 3 2 10l15 2-15 2z"/></svg>') center / contain no-repeat;
}

@keyframes planeIn {
    0% { transform: translate(120%, 80%) rotate(25deg); opacity: 0; }
    70% { transform: translate(0,0) rotate(-8deg); opacity: 1; }
    100% { transform: translate(0,0) rotate(0); opacity: 1; }
}

.plane-entry.intro { animation: planeIn 1s ease-out; }

/* 信件模态 */
.letter-modal .modal-content { max-width: 860px; }
.letter-body { padding: 1.5rem 2rem; background: #fffef8; }
.letter-heading { font-size: 1.4rem; font-weight: 700; color: #764ba2; margin-bottom: .5rem; }
.letter-subtitle { color: #555; margin-bottom: 1rem; }
.letter-content { color: #333; line-height: 1.9; white-space: pre-wrap; }
.letter-actions { display:flex; gap:.75rem; justify-content:flex-end; padding: 1rem 2rem 1.5rem; background:#fff; border-top:1px solid #eee; }

@media (prefers-reduced-motion: reduce) {
    .plane-entry.intro { animation: none; }
}

/* 活动通知区域 */
.activities-section {
    background: #f8f9fa;
    padding: 3rem 0;
}

.activities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.activity-card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border: 2px solid transparent;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.activity-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.activity-card:hover::before {
    transform: scaleX(1);
}

.activity-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    border-color: #667eea;
}

.activity-card.featured {
    border-color: #ff6b6b;
    background: linear-gradient(135deg, #fff 0%, #fff5f5 100%);
}

.activity-card.featured::before {
    background: linear-gradient(90deg, #ff6b6b, #ee5a6f, #f093fb);
    transform: scaleX(1);
}

.activity-badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #ff6b6b, #f093fb);
    color: white;
}

.activity-badge.upcoming {
    background: linear-gradient(135deg, #667eea, #764ba2);
}

.activity-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.activity-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 1rem;
}

.activity-desc {
    color: #666;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.activity-meta {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.activity-meta span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #888;
    font-size: 0.9rem;
}

.activity-meta i {
    color: #667eea;
}

.activity-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.activity-actions .btn {
    flex: 1;
    min-width: 120px;
    justify-content: center;
}

@media (max-width: 768px) {
    .activities-section {
        padding: 2rem 0;
    }
    
    .activities-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .activity-card {
        padding: 1.5rem;
    }
    
    .activity-actions {
        flex-direction: column;
    }
    
    .activity-actions .btn {
        width: 100%;
    }
}

/* 特殊文字效果 */
.unique-highlight {
    background: linear-gradient(45deg, #ff1744, #ff9800, #2196f3, #e91e63);
    background-size: 400% 400%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 900;
    font-size: 1.8em;
    animation: gradientShift 2s ease-in-out infinite;
    position: relative;
    display: inline-block;
    padding: 0 4px;
    border-radius: 6px;
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.3));
}

.school-name-highlight {
    background: linear-gradient(45deg, #ff1744, #ff9800, #2196f3, #e91e63);
    background-size: 400% 400%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 900;
    font-size: 1.8em;
    animation: gradientShift 2s ease-in-out infinite;
    position: relative;
    display: inline-block;
    padding: 0 4px;
    border-radius: 6px;
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.3));
}

.school-name-highlight::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, #764ba2, #667eea);
    animation: underlineGlow 2s ease-in-out infinite alternate;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes underlineGlow {
    0% { 
        box-shadow: 0 0 5px rgba(118, 75, 162, 0.5);
        transform: scaleX(1);
    }
    100% { 
        box-shadow: 0 0 15px rgba(118, 75, 162, 0.8);
        transform: scaleX(1.05);
    }
}


/* 比赛详情页样式 */
.contest-page {
    padding: 2rem 0;
}

.contest-header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem;
}

.header-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.contest-header h1 {
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 1rem;
}

.header-subtitle {
    font-size: 1.2rem;
    color: #667eea;
    font-weight: 500;
}

.contest-time {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #ff6b6b, #f093fb);
    color: white;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
}

.contest-time i {
    font-size: 1.1rem;
}

/* 比赛通知文字排版 - 卡片式设计 */
.contest-intro-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem;
    border-radius: 16px;
    text-align: center;
    margin-bottom: 2rem;
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.3);
}

.contest-intro { 
    font-size: 1.3rem; 
    font-weight: 500; 
    margin: 0;
    font-style: italic;
}

.contest-cards-grid {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
    overflow-x: auto;
    padding: 1rem 0;
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: #ccc transparent;
}

.contest-cards-grid::-webkit-scrollbar {
    height: 6px;
}

.contest-cards-grid::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.contest-cards-grid::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.contest-cards-grid::-webkit-scrollbar-thumb:hover {
    background: #999;
}

.contest-scene-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border: 1px solid #f0f0f0;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    flex: 0 0 300px;
    min-width: 300px;
    opacity: 0;
    transform: translateY(30px);
    animation: slideInUp 0.6s ease forwards;
}

.contest-scene-card:nth-child(1) { animation-delay: 0.1s; }
.contest-scene-card:nth-child(2) { animation-delay: 0.2s; }
.contest-scene-card:nth-child(3) { animation-delay: 0.3s; }
.contest-scene-card:nth-child(4) { animation-delay: 0.4s; }
.contest-scene-card:nth-child(5) { animation-delay: 0.5s; }
.contest-scene-card:nth-child(6) { animation-delay: 0.6s; }

@keyframes slideInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.contest-scene-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #ff6b6b, #4ecdc4, #45b7d1, #f093fb);
}

.contest-scene-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.card-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
    text-align: center;
}

.card-image {
    width: 100%;
    margin-bottom: 1rem;
    border-radius: 8px;
    overflow: hidden; /* 避免内容溢出 */
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    position: relative;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 16/9; /* 设置16:9比例 */
    padding: 0; /* 移除内边距减少留白 */
}

/* 冬至游园会卡片特殊样式 - 保持当前样式 */
.winter-festival-image {
    height: 350px; /* 保持较大高度 */
    padding: 5px; /* 保持较小内边距 */
    aspect-ratio: auto; /* 移除比例约束 */
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* 填满容器，保持比例 */
    transition: transform 0.3s ease;
    will-change: transform;
    backface-visibility: hidden;
    transform: translateZ(0); /* 启用硬件加速 */
}

.card-image .scene-img {
    position: absolute;
    top: 50%;
    left: 0;
    height: auto;
    width: auto;
    max-height: 100%;
    max-width: none;
    object-fit: contain;
    transform: translateY(-50%);
    animation: continuousSlide 80s linear infinite;
    animation-fill-mode: both;
    animation-play-state: running;
}

/* 第一张图片一开始就在容器中 */
.card-image .scene-img:nth-child(1) {
    transform: translateX(0%) translateY(-50%);
}

/* 大厅图片 (1-8) */
.card-image .scene-img:nth-child(1) { animation-delay: 0s; }
.card-image .scene-img:nth-child(2) { animation-delay: 2.5s; }
.card-image .scene-img:nth-child(3) { animation-delay: 5s; }
.card-image .scene-img:nth-child(4) { animation-delay: 7.5s; }
.card-image .scene-img:nth-child(5) { animation-delay: 10s; }
.card-image .scene-img:nth-child(6) { animation-delay: 12.5s; }
.card-image .scene-img:nth-child(7) { animation-delay: 15s; }
.card-image .scene-img:nth-child(8) { animation-delay: 17.5s; }

/* 106教室图片 (9-15) - 7张图片 */
.contest-scene-card:nth-of-type(2) .scene-img:nth-child(1) { animation-delay: 0s; }
.contest-scene-card:nth-of-type(2) .scene-img:nth-child(2) { animation-delay: 2.85s; }
.contest-scene-card:nth-of-type(2) .scene-img:nth-child(3) { animation-delay: 5.7s; }
.contest-scene-card:nth-of-type(2) .scene-img:nth-child(4) { animation-delay: 8.55s; }
.contest-scene-card:nth-of-type(2) .scene-img:nth-child(5) { animation-delay: 11.4s; }
.contest-scene-card:nth-of-type(2) .scene-img:nth-child(6) { animation-delay: 14.25s; }
.contest-scene-card:nth-of-type(2) .scene-img:nth-child(7) { animation-delay: 17.1s; }

/* 茶室图片 - 1张图片 */
.contest-scene-card:nth-of-type(3) .scene-img:nth-child(1) { animation-delay: 0s; }

/* 407教室图片 - 1张图片 */
.contest-scene-card:nth-of-type(4) .scene-img:nth-child(1) { animation-delay: 0s; }

/* 304和306教室图片 - 1张图片 */
.contest-scene-card:nth-of-type(5) .scene-img:nth-child(1) { animation-delay: 0s; }

/* 冬至游园会图片 - 5张图片 */
.contest-scene-card:nth-of-type(6) .scene-img:nth-child(1) { animation-delay: 0s; }
.contest-scene-card:nth-of-type(6) .scene-img:nth-child(2) { animation-delay: 4s; }
.contest-scene-card:nth-of-type(6) .scene-img:nth-child(3) { animation-delay: 8s; }
.contest-scene-card:nth-of-type(6) .scene-img:nth-child(4) { animation-delay: 12s; }
.contest-scene-card:nth-of-type(6) .scene-img:nth-child(5) { animation-delay: 16s; }

/* 其他空间图片 - 9张图片 */
.contest-scene-card:nth-of-type(7) .scene-img:nth-child(1) { animation-delay: 0s; }
.contest-scene-card:nth-of-type(7) .scene-img:nth-child(2) { animation-delay: 2.22s; }
.contest-scene-card:nth-of-type(7) .scene-img:nth-child(3) { animation-delay: 4.44s; }
.contest-scene-card:nth-of-type(7) .scene-img:nth-child(4) { animation-delay: 6.66s; }
.contest-scene-card:nth-of-type(7) .scene-img:nth-child(5) { animation-delay: 8.88s; }
.contest-scene-card:nth-of-type(7) .scene-img:nth-child(6) { animation-delay: 11.1s; }
.contest-scene-card:nth-of-type(7) .scene-img:nth-child(7) { animation-delay: 13.32s; }
.contest-scene-card:nth-of-type(7) .scene-img:nth-child(8) { animation-delay: 15.54s; }
.contest-scene-card:nth-of-type(7) .scene-img:nth-child(9) { animation-delay: 17.76s; }

/* 淡入淡出效果样式 */
.book-flip {
    position: relative;
    width: 100%;
    overflow: hidden; /* 避免内容溢出 */
    border-radius: 8px;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0; /* 移除内边距减少留白 */
    aspect-ratio: 16/9; /* 设置16:9的宽高比 */
}

/* 冬至游园会卡片的book-flip特殊样式 */
.winter-festival-image.book-flip {
    height: 350px; /* 保持较大高度 */
    padding: 5px; /* 保持较小内边距 */
    aspect-ratio: auto; /* 移除比例约束 */
    overflow: visible; /* 允许内容溢出 */
}

/* 冬至游园会卡片的book-page特殊样式 */
.winter-festival-image .book-page {
    top: 50%;
    left: 50%;
    width: auto;
    height: auto;
    max-width: 98%;
    max-height: 98%;
    object-fit: contain; /* 保持完整显示 */
    transform: translate(-50%, -50%) scale(0.8);
}

.winter-festival-image .book-page.active {
    transform: translate(-50%, -50%) scale(1);
    z-index: 2;
}

.book-page {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* 填满容器，保持比例 */
    opacity: 0;
    transform: scale(0.8) translateZ(0); /* 淡入淡出效果 + 硬件加速 */
    transition: all 1.2s ease-in-out;
    will-change: opacity, transform;
    backface-visibility: hidden;
    z-index: 1;
}

.book-page.active {
    opacity: 1;
    transform: scale(1) translateZ(0);
    z-index: 2;
}

.book-page.prev {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.1);
}

/* 翻书动画 */
@keyframes bookFlip {
    0% {
        transform: rotateY(0deg);
        opacity: 1;
    }
    50% {
        transform: rotateY(-90deg);
        opacity: 0;
    }
    100% {
        transform: rotateY(-180deg);
        opacity: 0;
    }
}

/* 确保动画立即开始 */
.card-image .scene-img {
    animation-play-state: running;
}

@keyframes continuousSlide {
    0% {
        transform: translateX(0%) translateY(-50%);
    }
    100% {
        transform: translateX(-100%) translateY(-50%);
    }
}

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

.contest-scene-card h4 { 
    color: #2c3e50; 
    margin-bottom: 1rem; 
    font-size: 1.1rem;
    font-weight: 600;
    text-align: center;
}

.contest-scene-card p { 
    margin: 0; 
    line-height: 1.7; 
    color: #555;
    font-size: 0.95rem;
}

.contest-conclusion-card {
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    padding: 2rem;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 8px 24px rgba(252, 182, 159, 0.3);
    position: relative;
    overflow: hidden;
}

.contest-conclusion-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { transform: translateX(-100%) translateY(-100%) rotate(0deg); }
    50% { transform: translateX(0%) translateY(0%) rotate(180deg); }
}

.conclusion-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.contest-conclusion-card p { 
    margin-bottom: 1rem; 
    line-height: 1.7;
    color: #2c3e50;
    font-size: 1rem;
}

.contest-call { 
    font-weight: 600; 
    color: #2c3e50; 
    font-size: 1.1rem;
    margin-top: 1.5rem !important;
    padding: 1rem 2rem;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 25px;
    display: inline-block;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.contest-call:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.15);
    background: white;
}

/* 比赛具体说明 */
.contest-details {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px dashed #e0e0e0;
}

.contest-details-intro {
    margin-bottom: 2rem;
}

.contest-details-intro h3 {
    color: #2c3e50;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
    position: relative;
}

.contest-details-intro h3::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    margin: 0.5rem auto 0;
    border-radius: 2px;
}

.contest-details-intro p {
    line-height: 1.8;
    color: #555;
    margin-bottom: 1rem;
    text-align: justify;
}

.details-highlight {
    font-size: 1.1rem;
    font-weight: 500;
    color: #667eea !important;
    text-align: center !important;
    margin-top: 1.5rem !important;
}

.contest-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.category-card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    border: 2px solid #f0f0f0;
    transition: all 0.3s ease;
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    border-color: #667eea;
}

.category-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f0f0f0;
}

.category-icon {
    font-size: 2.5rem;
    flex-shrink: 0;
}

.category-header h4 {
    color: #2c3e50;
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0;
}

.category-desc {
    color: #555;
}

.category-intro {
    line-height: 1.7;
    margin-bottom: 1.5rem;
    font-style: italic;
    color: #666;
}

.category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-list li {
    margin-bottom: 1.2rem;
    padding-left: 1.5rem;
    position: relative;
    line-height: 1.7;
}

.category-list li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: #667eea;
    font-size: 1.2rem;
}

.category-list strong {
    color: #2c3e50;
    display: block;
    margin-bottom: 0.3rem;
}

.category-list span {
    color: #666;
}

.category-encourage {
    line-height: 1.7;
    padding: 1rem;
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    border-radius: 8px;
    color: #2c3e50;
}

.category-encourage strong {
    color: #c0392b;
}

/* 表单样式增强 */
.required {
    color: #ff6b6b;
    font-weight: bold;
}

.form-hint {
    display: block;
    margin-top: 0.5rem;
    color: #888;
    font-size: 0.9rem;
    line-height: 1.5;
}

.form-hint strong {
    color: #667eea;
}

.char-counter {
    text-align: right;
    color: #999;
}

.char-counter.warning {
    color: #f39c12;
}

.char-counter.valid {
    color: #27ae60;
}

/* 投稿要求部分 */
.contest-requirements {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px dashed #e0e0e0;
}

.requirement-section {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    border-left: 4px solid #667eea;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.requirement-section h4 {
    color: #2c3e50;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.req-icon {
    font-size: 1.3rem;
}

.requirement-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.requirement-list li {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
    position: relative;
    line-height: 1.7;
    color: #555;
}

.requirement-list li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: #667eea;
    font-size: 1.5rem;
    line-height: 1.4;
}

.requirement-list strong {
    color: #2c3e50;
    font-weight: 600;
}

.award-section {
    border-left-color: #e74c3c;
    background: linear-gradient(135deg, #fff0f0 0%, #ffe8e8 100%);
}

.award-text {
    margin: 0;
    line-height: 1.8;
    color: #555;
    font-weight: 500;
}

.notice-section {
    border-left-color: #f39c12;
    background: linear-gradient(135deg, #fff9e6 0%, #fff5d6 100%);
}

.notice-text {
    margin: 0;
    line-height: 1.7;
    color: #555;
    font-weight: 500;
}

.submission-cta {
    text-align: center;
    margin-top: 2.5rem;
    padding: 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.3);
}

.btn-large {
    font-size: 1.2rem;
    padding: 1rem 3rem;
    border-radius: 50px;
    background: white;
    color: #667eea;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
    font-weight: 600;
}

.btn-large:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
    background: #f8f9ff;
}

.btn-large i {
    font-size: 1.3rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .contest-cards-grid {
        gap: 1rem;
        padding: 0.5rem 0;
    }
    
    .contest-intro-card,
    .contest-conclusion-card {
        padding: 1.5rem;
    }
    
    .contest-scene-card {
        padding: 1.2rem;
        flex: 0 0 280px;
        min-width: 280px;
    }

    .contest-categories {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .category-card {
        padding: 1.5rem;
    }

    .requirement-section {
        padding: 1.2rem;
    }

    .submission-cta {
        padding: 1.5rem;
    }

    .btn-large {
        font-size: 1.1rem;
        padding: 0.9rem 2rem;
    }
}

/* 留言墙样式 */
.guestbook-header {
    text-align: center;
    margin-bottom: 2rem;
}

.guestbook-subtitle {
    color: #666;
    font-size: 1.1rem;
    margin-top: 0.5rem;
}

.guestbook-wall {
    position: relative;
    min-height: 600px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 16px;
    padding: 2rem;
    margin-top: 2rem;
    overflow: hidden;
}

.message-card {
    position: absolute;
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    max-width: 280px;
    cursor: move;
    transition: all 0.3s ease;
    animation: fadeInFloat 0.6s ease;
}

@keyframes fadeInFloat {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.message-card:hover {
    transform: scale(1.05) rotate(2deg);
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    z-index: 10;
}

.message-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2, #f093fb);
    border-radius: 12px 12px 0 0;
}

.message-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px dashed #e0e0e0;
}

.message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.message-info {
    flex: 1;
    min-width: 0;
}

.message-nickname {
    font-weight: 600;
    color: #2c3e50;
    font-size: 1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.message-time {
    font-size: 0.85rem;
    color: #999;
}

.message-content {
    color: #555;
    line-height: 1.6;
    word-wrap: break-word;
    font-size: 0.95rem;
}

.message-card[data-color="1"]::before { background: linear-gradient(90deg, #ff6b6b, #ee5a6f); }
.message-card[data-color="2"]::before { background: linear-gradient(90deg, #4ecdc4, #44a08d); }
.message-card[data-color="3"]::before { background: linear-gradient(90deg, #f093fb, #f5576c); }
.message-card[data-color="4"]::before { background: linear-gradient(90deg, #43e97b, #38f9d7); }
.message-card[data-color="5"]::before { background: linear-gradient(90deg, #fa709a, #fee140); }

@media (max-width: 768px) {
    .guestbook-wall {
        min-height: 400px;
        padding: 1rem;
    }

    .message-card {
        max-width: 240px;
        padding: 1.2rem;
    }
}

/* 上传功能样式优化 */
.upload-features {
    display: flex;
    justify-content: space-around;
    margin-top: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.feature-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: #6c757d;
    font-size: 0.85rem;
}

.feature-item i {
    font-size: 1.2rem;
    color: #007bff;
}

/* 响应式上传功能 */
@media (max-width: 768px) {
    .upload-features {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .feature-item {
        flex-direction: row;
        justify-content: center;
    }
}

/* 优化后的文件上传区域 */
.file-input-wrapper {
    min-height: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.upload-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.upload-text {
    font-weight: 500;
    color: #495057;
}

.upload-hint {
    font-size: 0.85rem;
    color: #6c757d;
}

/* 图片质量对比显示 */
.quality-comparison {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.quality-item {
    flex: 1;
    text-align: center;
}

.quality-label {
    font-size: 0.85rem;
    color: #6c757d;
    margin-bottom: 0.25rem;
}

.quality-value {
    font-size: 1.1rem;
    font-weight: 600;
}

.quality-value.original {
    color: #dc3545;
}

.quality-value.optimized {
    color: #28a745;
}

.quality-value.saved {
    color: #007bff;
}

/* 稿件上传样式 */
.upload-area {
    position: relative;
    border: 2px dashed #ddd;
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fafafa;
}

.upload-area:hover {
    border-color: #667eea;
    background: #f0f2ff;
}

.upload-area.drag-over {
    border-color: #667eea;
    background: #e8f0fe;
    transform: scale(1.02);
}

.upload-area.has-image {
    padding: 0;
    border: none;
    background: transparent;
}

.upload-area.has-image:hover {
    background: transparent;
}

.image-preview {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.image-preview img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    display: block;
}

.preview-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.image-preview:hover .preview-overlay {
    opacity: 1;
}

.preview-info {
    color: white;
    text-align: center;
    margin-right: 1rem;
}

.preview-size {
    display: block;
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.preview-file-size {
    display: block;
    font-size: 0.9rem;
    opacity: 0.8;
}

.btn-remove-image {
    background: rgba(255, 71, 87, 0.9);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.btn-remove-image:hover {
    background: #ff4757;
    transform: scale(1.1);
}

.compression-info {
    margin-top: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.compression-stats {
    display: flex;
    justify-content: space-around;
    gap: 1rem;
}

.stat-item {
    text-align: center;
    flex: 1;
}

.stat-label {
    display: block;
    font-size: 0.85rem;
    color: #6c757d;
    margin-bottom: 0.25rem;
}

.stat-value {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    color: #495057;
}

.stat-value.success {
    color: #28a745;
}

.upload-progress {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
    z-index: 10000;
    min-width: 300px;
    display: none;
}

.progress-content {
    text-align: center;
}

.progress-message {
    font-size: 1.1rem;
    font-weight: 500;
    color: #333;
    margin-bottom: 1rem;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.progress-percent {
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
}

/* 表单增强样式 */
.form-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

.char-counter {
    text-align: right;
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

/* 标签输入样式 */
.tags-input {
    position: relative;
}

.tag-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 4px 4px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.tag-suggestion {
    padding: 0.5rem;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
}

.tag-suggestion:hover {
    background: #f8f9fa;
}

.tag-suggestion:last-child {
    border-bottom: none;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .upload-area {
        padding: 1.5rem 1rem;
    }
    
    .compression-stats {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .stat-item {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    .stat-label {
        margin-bottom: 0;
    }
    
    .upload-progress {
        left: 1rem;
        right: 1rem;
        transform: translateY(-50%);
        min-width: auto;
    }
}

/* 留言板样式 */
.guestbook-header {
    text-align: center;
    margin-bottom: 2rem;
}

.guestbook-subtitle {
    color: #666;
    font-size: 1.1rem;
    margin-top: 0.5rem;
}


/* 留言墙 */
.guestbook-wall {
    position: relative;
    min-height: 500px;
    margin-top: 3rem;
    padding: 2rem 0;
}

.message-card {
    position: absolute;
    background: white;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-left: 4px solid #667eea;
    max-width: 280px;
    min-width: 200px;
    opacity: 0;
    transform: translateY(20px) scale(0.9);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    z-index: 1;
}

.message-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    z-index: 10;
}

.message-card.float-in {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.floating-message {
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    25% { transform: translateY(-10px) rotate(1deg); }
    50% { transform: translateY(-5px) rotate(-1deg); }
    75% { transform: translateY(-8px) rotate(0.5deg); }
}

.message-content {
    position: relative;
}

.message-text {
    font-size: 0.95rem;
    line-height: 1.5;
    color: #333;
    margin-bottom: 0.75rem;
    word-wrap: break-word;
}

.message-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.message-author {
    font-weight: 500;
    color: #667eea;
}

.message-time {
    opacity: 0.8;
}

.message-actions {
    display: flex;
    justify-content: flex-end;
}

.message-like-btn {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.message-like-btn:hover {
    background: #ffe6e6;
    color: #ff6b6b;
    transform: scale(1.1);
}

.message-like-btn.liked {
    color: #ff6b6b;
    background: #ffe6e6;
}

.message-like-btn.liking {
    animation: pulse 0.6s ease-in-out;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

.like-count {
    font-weight: 500;
}

/* 浮动心形动画 */
.floating-heart {
    position: fixed;
    color: #ff6b6b;
    font-size: 1.2rem;
    pointer-events: none;
    z-index: 9999;
    animation: heartFloat 1s ease-out forwards;
}

@keyframes heartFloat {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(-50px) scale(1.5);
    }
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #999;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state p {
    font-size: 1.1rem;
}

/* 消息提示 */
.message-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    z-index: 10000;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    max-width: 300px;
    word-wrap: break-word;
}

.message-toast.show {
    transform: translateX(0);
}

.message-toast.message-success {
    background: #27ae60;
}

.message-toast.message-error {
    background: #e74c3c;
}

.message-toast.message-info {
    background: #3498db;
}

/* 留言板响应式设计 */
@media (max-width: 768px) {
    
    .message-card {
        position: relative !important;
        left: auto !important;
        top: auto !important;
        transform: none !important;
        margin-bottom: 1rem;
        max-width: none;
        animation: none;
    }
    
    .message-card:hover {
        transform: translateY(-2px) scale(1.01);
    }
    
    .guestbook-wall {
        display: flex;
        flex-direction: column;
        gap: 1rem;
        min-height: auto;
    }
    
    .message-toast {
        right: 10px;
        left: 10px;
        max-width: none;
    }
}
