/**
 * FilmDad Archive Styles
 * 电影归档页样式
 */

.filmdad-archive-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.archive-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    color: white;
}

.archive-title {
    font-size: 2.5em;
    margin: 0 0 10px 0;
    font-weight: 700;
}

.archive-description {
    font-size: 1.1em;
    opacity: 0.9;
    margin-bottom: 30px;
}

/* 搜索区域样式 */
.search-section {
    margin-bottom: 30px;
}

.movie-search-form {
    max-width: 500px;
    margin: 0 auto 15px;
}

.search-input-group {
    display: flex;
    border-radius: 25px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.search-input-group input {
    flex: 1;
    padding: 12px 20px;
    border: none;
    font-size: 16px;
}

.search-input-group button {
    padding: 12px 25px;
    background: #e74c3c;
    color: white;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s;
}

.search-input-group button:hover {
    background: #c0392b;
}

.search-results-info {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    background: rgba(255,255,255,0.1);
    padding: 15px;
    border-radius: 10px;
}

.clear-search {
    color: #ffd700;
    text-decoration: none;
    font-weight: 600;
}

.clear-search:hover {
    text-decoration: underline;
}

.archive-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    align-items: center;
    background: rgba(255,255,255,0.1);
    padding: 20px;
    border-radius: 10px;
}

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

.control-group label {
    font-weight: 600;
    white-space: nowrap;
}

.sort-select, .genre-select, .year-select {
    padding: 8px 12px;
    border: none;
    border-radius: 6px;
    background: white;
    color: #333;
    font-size: 14px;
    min-width: 150px;
}

.reset-filters {
    padding: 8px 16px;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
}

.reset-filters:hover {
    background: #c0392b;
}

/* 布局样式 */
.archive-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 30px;
    align-items: start;
}

.archive-content {
    flex: 1;
}

/* 电影网格 - 更小的卡片，自适应布局 */
.movies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.movie-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
    transition: transform 0.3s, box-shadow 0.3s;
}

.movie-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.movie-poster {
    position: relative;
    height: 260px;
    overflow: hidden;
}

.movie-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

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

.no-poster {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    color: #6c757d;
    font-size: 0.9em;
}

.no-poster .icon {
    font-size: 2em;
    margin-bottom: 5px;
}

.movie-rating {
    position: absolute;
    top: 8px;
    right: 8px;
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-weight: bold;
    font-size: 0.8em;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

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

.movie-card:hover .movie-overlay {
    opacity: 1;
}

.view-details {
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    border: 2px solid white;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9em;
    transition: background 0.3s, color 0.3s;
}

.view-details:hover {
    background: white;
    color: #333;
}

.movie-info {
    padding: 15px;
}

.movie-title {
    margin: 0 0 8px 0;
    font-size: 1.1em;
    line-height: 1.3;
}

.movie-title a {
    color: #2c3e50;
    text-decoration: none;
    transition: color 0.3s;
}

.movie-title a:hover {
    color: #3498db;
}

.movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 0.8em;
    color: #6c757d;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 3px;
}

.movie-genres {
    font-size: 0.8em;
    color: #3498db;
    margin-bottom: 8px;
    font-weight: 500;
}

.movie-excerpt {
    font-size: 0.85em;
    line-height: 1.4;
    color: #495057;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.loading-indicator {
    text-align: center;
    padding: 40px;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 2s linear infinite;
    margin: 0 auto 15px;
}

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

.archive-pagination {
    text-align: center;
    margin-top: 40px;
}

.page-numbers {
    display: inline-flex;
    gap: 5px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.page-numbers li {
    display: inline;
}

.page-numbers a,
.page-numbers span {
    display: inline-block;
    padding: 8px 15px;
    border: 1px solid #e9ecef;
    border-radius: 5px;
    text-decoration: none;
    color: #3498db;
    transition: all 0.3s;
}

.page-numbers a:hover {
    background: #3498db;
    color: white;
    border-color: #3498db;
}

.page-numbers .current {
    background: #3498db;
    color: white;
    border-color: #3498db;
}

.page-numbers .dots {
    padding: 8px 10px;
    color: #6c757d;
}

.no-movies {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    grid-column: 1 / -1;
}

.no-movies-icon {
    font-size: 4em;
    margin-bottom: 20px;
}

.no-movies h3 {
    font-size: 1.5em;
    margin: 0 0 10px 0;
    color: #2c3e50;
}

.no-movies p {
    color: #6c757d;
    margin-bottom: 20px;
}

.back-to-all {
    display: inline-block;
    padding: 10px 20px;
    background: #3498db;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: background 0.3s;
}

.back-to-all:hover {
    background: #2980b9;
}

/* 侧边栏样式 */
.archive-sidebar {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.sidebar-widget {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.widget-title {
    font-size: 1.2em;
    margin: 0 0 15px 0;
    color: #2c3e50;
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 10px;
}

/* 最新电影样式 */
.latest-movies {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.latest-movie-item {
    display: flex;
    gap: 12px;
    padding-bottom: 15px;
    border-bottom: 1px dashed #e9ecef;
}

.latest-movie-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.latest-movie-poster {
    flex: 0 0 60px;
    height: 80px;
    border-radius: 5px;
    overflow: hidden;
}

.latest-movie-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.no-thumbnail {
    width: 100%;
    height: 100%;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5em;
}

.latest-movie-info {
    flex: 1;
}

.latest-movie-info h4 {
    margin: 0 0 5px 0;
    font-size: 0.95em;
}

.latest-movie-info h4 a {
    color: #2c3e50;
    text-decoration: none;
}

.latest-movie-info h4 a:hover {
    color: #3498db;
}

.latest-movie-meta {
    display: flex;
    gap: 10px;
    font-size: 0.8em;
    color: #6c757d;
}

/* 评分最高电影样式 */
.top-rated-movies {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.top-rated-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
}

.top-rated-rank {
    flex: 0 0 25px;
    height: 25px;
    background: #3498db;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8em;
    font-weight: bold;
}

.top-rated-info {
    flex: 1;
}

.top-rated-info h4 {
    margin: 0 0 3px 0;
    font-size: 0.9em;
}

.top-rated-info h4 a {
    color: #2c3e50;
    text-decoration: none;
}

.top-rated-info h4 a:hover {
    color: #3498db;
}

.top-rated-meta {
    display: flex;
    gap: 8px;
    font-size: 0.75em;
    color: #6c757d;
}

/* 创建者链接样式 */
.creator-link {
    color: #e74c3c;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.75em;
    transition: color 0.3s;
}

.creator-link:hover {
    text-decoration: underline;
    color: #c0392b;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .movies-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}

@media (max-width: 992px) {
    .archive-layout {
        grid-template-columns: 1fr;
    }
    
    .movies-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 15px;
    }
}

@media (max-width: 768px) {
    .archive-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .control-group {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .movies-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    .movie-poster {
        height: 200px;
    }
    
    .search-results-info {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .creator-link {
        font-size: 0.7em;
    }
}

@media (max-width: 480px) {
    .movies-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .archive-title {
        font-size: 2em;
    }
    
    .movie-info {
        padding: 10px;
    }
    
    .movie-title {
        font-size: 1em;
    }
}