/* 固定主内容区域大小 */
.main-content {
    width: 100%;
    max-width: 1400px;
    margin: 1rem auto;
    padding: 1rem;
    margin-bottom: 0;
}

.main-content h2 {
    margin: 1rem 0 2.5rem 0;
    padding: 0 1rem;
    font-size: 1.875rem;
    font-weight: bold;
    color: var(--text-color);
    text-align: center;
}

.anime-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    padding: 0.5rem;
    margin: 0 auto;
    margin-bottom: 1rem;
}

/* 响应式布局 */
@media screen and (max-width: 1200px) {
    .anime-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.25rem;
    }
}

@media screen and (max-width: 900px) {
    .anime-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

@media screen and (max-width: 600px) {
    .anime-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .main-content {
        padding: 0.75rem;
    }
    
    .main-content h2 {
        font-size: 1.25rem;
        margin-bottom: 0.75rem;
    }
}

.anime-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

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

.anime-image-container {
    position: relative;
    width: 100%;
}

.anime-image {
    width: 100%;
    aspect-ratio: 2/3;
    object-fit: cover;
    display: block;
}

.anime-score {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.85);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 0.9rem;
    backdrop-filter: blur(4px);
}

.anime-info {
    padding: 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.anime-title {
    font-weight: 600;
    color: var(--text-color);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.8em;
    font-size: 0.95rem;
}

.anime-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.anime-type {
    color: var(--primary-color);
    font-weight: 500;
    font-size: 0.85rem;
}

.anime-episodes {
    color: #666;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
}

.anime-episodes::before {
    content: "•";
    color: #ccc;
}

.anime-year {
    color: var(--primary-color);
    font-weight: 500;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
}

.anime-year::after {
    content: "•";
    color: #ccc;
    margin-left: 0.5rem;
}

.anime-details {
    margin-top: 0.25rem;
    margin-bottom: 0.25rem;
}

.anime-details .skeleton-text {
    width: 70px;
    height: 18px;
}

.anime-status {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
    display: inline-block;
    width: fit-content;
}

.status-airing {
    background: rgba(76, 175, 80, 0.1);
    color: #2E7D32;
}

.status-upcoming {
    background: rgba(33, 150, 243, 0.1);
    color: #1565C0;
}

.status-unknown {
    background: rgba(117, 117, 117, 0.1);
    color: #424242;
}

.anime-genres {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.5rem;
}

.anime-genre {
    background: #f8f9fa;
    color: #666;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    transition: all 0.2s ease;
}

.anime-genre:hover {
    background: #e9ecef;
    color: #495057;
}

/* Skeleton Loading Styles */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
}

.skeleton-image {
    width: 100%;
    height: 0;
    padding-bottom: 140%;
    border-radius: 8px;
}

.skeleton-text {
    height: 14px;
    margin-bottom: 8px;
}

.skeleton-text.medium {
    width: 80%;
    height: 18px;
    margin-bottom: 12px;
}

.skeleton-text.short {
    width: 40%;
}

.anime-genres .skeleton-text {
    display: inline-block;
    width: 50px;
    height: 20px;
    margin-right: 6px;
    margin-bottom: 0;
}

.anime-genres .skeleton-text:last-child {
    margin-right: 0;
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Loading State */
.loading .anime-grid {
    opacity: 0.6;
    pointer-events: none;
}

.loading .skeleton {
    display: block;
}

/* Error State */
.error-message {
    text-align: center;
    padding: 2rem;
    color: #666;
    font-size: 1.1rem;
}

.error-message button {
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    background-color: #4a90e2;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.error-message button:hover {
    background-color: #357abd;
} 