/* 重置页面样式，确保可以滚动 */
html, body {
    height: auto !important;
    min-height: 100vh;
    overflow-y: auto !important;
    position: relative !important;
    background-color: #ffffff !important;
    color: #333333 !important;
}

body.page-template-片单广场, body {
    background-color: #ffffff !important;
    /* 为固定的顶部状态栏留出空间 */
    padding-top: 80px !important;
}

/* 移除星空背景 */
.stars {
    display: none !important;
}

/* 用户状态栏样式 - 修改为黑白调风格 */
.user-status-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: #ffffff; /* 添加背景色，防止内容透过 */
    z-index: 1000;
    padding: 15px 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    backdrop-filter: none; /* 移除模糊效果 */
}

.user-status-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
}

.logo a {
    color: #222; /* 改为深灰色文字 */
    text-decoration: none;
    font-size: 24px;
    font-weight: 700;
    position: relative;
    padding-bottom: 8px;
}

.logo a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: #333;
    border-radius: 3px;
}

.user-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* 登录按钮样式修改 */
.login-button {
    background-color: #333; /* 改为深灰色 */
    color: white;
    border: none;
    border-radius: 20px;
    padding: 8px 18px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.login-button:hover {
    background-color: #555; /* 悬停时变为中灰色 */
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* 用户头像和下拉菜单 */
.user-profile-dropdown {
    position: relative;
}

.user-avatar-button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #fff; /* 白色边框 */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.user-avatar:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    transform: scale(1.05);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 150px;
    z-index: 1001;
    margin-top: 8px;
    padding: 8px 0;
    display: none;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.user-profile-dropdown:hover .dropdown-menu,
.user-avatar-button:focus + .dropdown-menu,
.dropdown-menu.show {
    display: block;
}

.dropdown-item {
    display: block;
    padding: 10px 15px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    transition: background 0.2s;
}

.dropdown-item:hover {
    background: #f5f5f5;
    color: #000;
}

/* 页面标题 */
.page-header {
    text-align: center;
    padding: 2rem 0;
    margin-bottom: 2rem;
    background: linear-gradient(to right, #f5f5f5, #e8e8e8);
    border-radius: 0 0 30px 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.page-header h1 {
    font-size: 2.5rem;
    margin: 0 0 1rem;
    background: linear-gradient(to right, #333333, #666666);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.back-link {
    display: inline-block;
    padding: 8px 20px;
    background: linear-gradient(to right, #333333, #666666);
    color: white;
    text-decoration: none;
    border-radius: 20px;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

.back-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    background: linear-gradient(to right, #444444, #777777);
}

/* 筛选器容器 - 确保不被遮挡 */
.filters-container {
    max-width: 1200px;
    margin: 0 auto 2rem;
    padding: 0 1rem;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    position: relative;
    z-index: 10;
    margin-top: 20px; /* 添加顶部间距 */
}

.search-box {
    display: flex;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    border-radius: 25px;
    overflow: hidden;
    border: 1px solid #e0e0e0;
    flex: 1;
    min-width: 200px;
}

.search-box input {
    flex: 1;
    padding: 12px 20px;
    border: none;
    background: #f8f8f8;
    color: #333;
    font-size: 1rem;
}

.search-box input::placeholder {
    color: rgba(0, 0, 0, 0.4);
}

.search-box button {
    background: linear-gradient(to right, #333333, #666666);
    border: none;
    color: white;
    padding: 0 20px;
    cursor: pointer;
    transition: opacity 0.3s;
}

.search-box button:hover {
    opacity: 0.9;
}

.search-icon::before {
    content: "🔍";
    font-size: 1.2rem;
}

/* 确保选择器可见 */
.filter-options {
    display: flex;
    gap: 1rem;
    flex-wrap: nowrap;
    align-items: center;
    visibility: visible !important;
    opacity: 1 !important;
}

.filter-options select {
    padding: 10px 15px;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    background: #f8f8f8;
    color: #333;
    font-size: 0.9rem;
    appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg fill='black' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/><path d='M0 0h24v24H0z' fill='none'/></svg>");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 30px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    display: block !important;
}

.clear-filters-btn {
    padding: 10px 15px;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    background: #f0f0f0;
    color: #333;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.3s;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.clear-filters-btn:hover {
    background: #e5e5e5;
}

/* 片单网格 */
.playlists-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    position: relative;
    z-index: 5;
}

/* 片单卡片 */
.playlist-card {
    position: relative;
    background: #ffffff;
    border-radius: 12px;
    padding: 265px 20px 20px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    overflow: hidden;
    border: 1px solid #e0e0e0;
}

.playlist-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

/* 添加海报叠加效果 */
.poster-stack {
    position: absolute;
    top: 20px;
    left: 0;
    right: 0;
    height: 225px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 15px;
}

.poster {
    position: absolute;
    width: 150px;
    height: 225px;
    background-size: cover;
    background-position: center;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    transition: transform 0.3s ease;
}

.poster-1 {
    z-index: 4;
    transform: rotate(-5deg) translateX(-15px);
}

.poster-2 {
    z-index: 3;
    transform: rotate(-2deg) translateX(-5px);
}

.poster-3 {
    z-index: 2;
    transform: rotate(2deg) translateX(5px);
}

.poster-4 {
    z-index: 1;
    transform: rotate(5deg) translateX(15px);
}

/* 悬停效果，让海报展开 */
.playlist-card:hover .poster-1 {
    transform: rotate(-12deg) translateX(-30px);
}

.playlist-card:hover .poster-2 {
    transform: rotate(-4deg) translateX(-10px);
}

.playlist-card:hover .poster-3 {
    transform: rotate(4deg) translateX(10px);
}

.playlist-card:hover .poster-4 {
    transform: rotate(12deg) translateX(30px);
}

/* 片单标题 */
.playlist-title {
    margin: 15px 0 15px;
    font-size: 18px;
    text-align: center;
    line-height: 1.4;
}

.playlist-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s;
}

.playlist-title a:hover {
    color: #e91e63;
}

/* 片单元数据 */
.playlist-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 15px;
    font-size: 14px;
    color: #666;
}

/* 类别标签 */
.playlist-categories {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-bottom: 15px;
}

.category-tag {
    display: inline-block;
    padding: 3px 8px;
    background: #f0f0f0;
    border-radius: 12px;
    color: #555;
    font-size: 12px;
    text-decoration: none;
    transition: background 0.3s;
    border: 1px solid #e0e0e0;
}

.category-tag:hover {
    background: #e5e5e5;
}

/* 查看按钮 */
.view-playlist-btn {
    display: block;
    text-align: center;
    padding: 6px 0;
    background: linear-gradient(to right, #333333, #999999);
    color: white;
    text-decoration: none;
    border-radius: 16px;
    font-weight: normal;
    font-size: 14px;
    transition: all 0.3s;
    opacity: 0.75;
    max-width: 60%;
    margin: 0 auto;
}

.view-playlist-btn:hover {
    opacity: 1;
    background: linear-gradient(to right, #444444, #666666);
}

/* 无结果提示 */
.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem;
    background: #f8f8f8;
    border-radius: 12px;
    font-size: 1.2rem;
    color: #666;
    border: 1px solid #e0e0e0;
}

/* 分页控制 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 3rem 0;
    flex-wrap: wrap;
}

.pagination a, .pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    background: #f5f5f5;
    color: #333;
    text-decoration: none;
    border-radius: 18px;
    font-size: 0.9rem;
    transition: background 0.3s;
    border: 1px solid #e0e0e0;
}

.pagination a:hover {
    background: #e5e5e5;
}

.pagination .current-page {
    background: linear-gradient(to right, #333333, #666666);
    color: white;
    border: none;
}

.pagination .disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination .ellipsis {
    background: transparent;
    border: none;
}

.prev-page, .next-page {
    padding: 0 15px;
}

/* 页脚 */
.page-footer {
    text-align: center;
    padding: 2rem 0 3rem;
    margin-top: 2rem;
}

.home-btn {
    display: inline-block;
    padding: 12px 30px;
    background: linear-gradient(to right, #333333, #666666);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: bold;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.home-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    background: linear-gradient(to right, #444444, #777777);
}

/* 图标样式 */
.icon-film::before {
    content: "🎬";
}

.icon-eye::before {
    content: "👁️";
}

.icon-calendar::before {
    content: "📅";
}

/* 响应式调整 */
@media (max-width: 768px) {
    body.page-template-片单广场, body {
        padding-top: 70px !important;
    }
    
    .playlists-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .poster {
        width: 120px;
        height: 180px;
    }
    
    .playlist-card {
        padding-top: 210px;
    }
    
    .poster-stack {
        height: 180px;
        top: 20px;
    }
    
    .poster-1 {
        transform: rotate(-5deg) translateX(-15px);
    }
    
    .poster-2 {
        transform: rotate(-2deg) translateX(-5px);
    }
    
    .poster-3 {
        transform: rotate(2deg) translateX(5px);
    }
    
    .poster-4 {
        transform: rotate(5deg) translateX(15px);
    }
    
    .playlist-card:hover .poster-1 {
        transform: rotate(-10deg) translateX(-20px);
    }
    
    .playlist-card:hover .poster-4 {
        transform: rotate(10deg) translateX(20px);
    }
    
    .user-status-bar {
        padding: 12px 15px;
    }
    
    .logo a {
        font-size: 22px;
    }
    
    .login-button {
        padding: 6px 14px;
        font-size: 13px;
    }
    
    .user-avatar {
        width: 34px;
        height: 34px;
    }
}

@media (max-width: 600px) {
    body.page-template-片单广场, body {
        padding-top: 60px !important;
    }
    
    .playlists-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .poster {
        width: 130px;
        height: 195px;
    }
    
    .playlist-card {
        padding-top: 230px;
        max-width: 400px;
        margin: 0 auto;
    }
    
    .poster-stack {
        height: 195px;
        top: 20px;
    }
    
    .poster-4 {
        display: none;
    }
    
    .poster-1 {
        transform: rotate(-6deg) translateX(-12px);
    }
    
    .poster-2 {
        transform: rotate(0deg);
    }
    
    .poster-3 {
        transform: rotate(6deg) translateX(12px);
    }
    
    .playlist-card:hover .poster-1 {
        transform: rotate(-10deg) translateX(-18px);
    }
    
    .playlist-card:hover .poster-3 {
        transform: rotate(10deg) translateX(18px);
    }
    
    .filters-container {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-box {
        width: 100%;
        box-sizing: border-box;
        margin-bottom: 10px;
    }
    
    .filter-options {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        width: 100%;
        gap: 10px;
    }
    
    .filter-options select, 
    .clear-filters-btn {
        width: calc(50% - 5px);
        box-sizing: border-box;
        margin: 0;
    }
    
    .user-status-bar {
        padding: 10px;
    }
    
    .logo a {
        font-size: 18px;
    }
    
    .login-button {
        padding: 5px 12px;
        font-size: 12px;
    }
    
    .user-avatar {
        width: 32px;
        height: 32px;
    }
}

/* 修复标题样式 */
.movie-title-container {
    margin-left: 15px;
}

.movie-playlist-title {
    font-size: 20px;
    margin: 0;
    color: #333;
}

/* 修复状态栏中的标题显示 */
@media (max-width: 768px) {
    .movie-playlist-title {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .movie-playlist-title {
        font-size: 16px;
    }
    
    .movie-title-container {
        margin-left: 10px;
    }
}