/* Profile Page Styles - Modern White Theme */
:root {
    --bg-color: #F5F5F7;
    --sidebar-bg: #FFFFFF;
    --card-bg: #FFFFFF;
    --text-primary: #1D1D1F;
    --text-secondary: #86868B;
    --accent-color: #000000;
    --border-color: #E5E5EA;
    --hover-bg: #F5F5F7;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: 'SF Pro Text', 'SF Pro Icons', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

/* --- Layout --- */
.profile-container {
    display: flex;
    min-height: calc(100vh - 73px); /* Subtract navbar height */
    padding-top: 73px; /* Ensure content starts below sticky navbar */
}

/* --- Sidebar --- */
.sidebar {
    width: 280px;
    background: var(--sidebar-bg);
    border-right: 1px solid var(--border-color);
    padding: 30px 20px;
    position: fixed;
    top: 73px;
    bottom: 0;
    overflow-y: auto;
    z-index: 100;
}

.sidebar-section {
    margin-bottom: 30px;
}

.sidebar-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 12px;
    padding-left: 12px;
}

.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    margin-bottom: 4px;
    border-radius: 8px;
    cursor: pointer;
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: all 0.2s;
}

.menu-item:hover {
    background-color: var(--hover-bg);
}

.menu-item.active {
    background-color: var(--accent-color);
    color: white;
}

.menu-item .icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.menu-item .icon svg {
    width: 16px;
    height: 16px;
}

.menu-item.active .icon svg {
    stroke: white;
}

.menu-badge {
    margin-left: auto;
    background: rgba(0,0,0,0.05);
    padding: 2px 8px;
    border-radius: 100px;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.menu-item.active .menu-badge {
    background: rgba(255,255,255,0.2);
    color: white;
}

/* --- Main Content --- */
.main-content {
    flex: 1;
    margin-left: 280px; /* Sidebar width */
    padding: 40px 60px;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 40px;
}

.header-left h1 {
    font-size: 2rem;
    font-weight: 600;
    margin: 0 0 8px 0;
}

.header-left p {
    color: var(--text-secondary);
    margin: 0;
}

.header-actions {
    display: flex;
    gap: 12px;
}

.btn-secondary, .btn-primary {
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.btn-secondary {
    background: white;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: var(--hover-bg);
    border-color: #ccc;
}

.btn-primary {
    background: var(--accent-color);
    color: white;
}

.btn-primary:hover {
    opacity: 0.9;
}

/* --- Stats Cards --- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: var(--card-bg);
    padding: 24px;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 12px rgba(0,0,0,0.02);
}

/* Overview Stats - Enhanced styling */
.overview-stats .stat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 28px 20px;
    transition: all 0.3s ease;
}

.overview-stats .stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

.overview-stats .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, #f5f5f7 0%, #e8e8ed 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.overview-stats .stat-value {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 6px;
    background: linear-gradient(135deg, #1D1D1F 0%, #424245 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.overview-stats .stat-label {
    font-size: 0.85rem;
    font-weight: 500;
    color: #86868B;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Load More Button */
.load-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 32px;
    background: #f5f5f7;
    border: 1px solid #e5e5ea;
    border-radius: 12px;
    color: #1d1d1f;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.load-more-btn:hover {
    background: #e8e8ed;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.load-more-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.stat-value {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* --- Gallery Grid --- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

/* 确保图片网格和视频网格使用相同的列宽 */
#videoGrid, #imageGrid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.video-card {
    background: var(--card-bg);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
    position: relative;
}

.video-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.08);
}

.card-thumbnail {
    aspect-ratio: 16/9;
    background: #eee;
    position: relative;
    overflow: hidden;
}

.card-thumbnail img, .card-thumbnail video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 确保图片卡片的缩略图也使用16:9比例 */
.image-card .card-thumbnail {
    aspect-ratio: 16/9;
}

/* 视频封面图片样式 */
.video-poster-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    background: #f0f0f0;
}

/* 视频预览层 */
.video-preview {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 2;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.status-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 10px;
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(4px);
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.status-badge.processing { color: #0071E3; }
.status-badge.failed { color: #FF3B30; }

.card-info {
    padding: 14px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-primary);
    flex: 1;
    min-width: 0;
}

/* 卡片操作按钮组 */
.card-actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
    margin-left: 12px;
}

.card-action-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #86868B;
    transition: all 0.2s ease;
}

.card-action-btn:hover {
    background: #F5F5F7;
    color: #1D1D1F;
}

.card-action-btn:active {
    transform: scale(0.95);
}

.card-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.select-checkbox {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255,255,255,0.8);
    background: rgba(0,0,0,0.2);
    border-radius: 6px;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s;
    z-index: 10;
}

.video-card:hover .select-checkbox,
.select-checkbox.checked {
    opacity: 1;
}

.select-checkbox.checked {
    background: #0071E3;
    border-color: #0071E3;
    display: flex;
    align-items: center;
    justify-content: center;
}

.selection-number {
    color: white;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
}

/* --- Empty State --- */
.empty-state {
    text-align: center;
    padding: 120px 40px;
    color: var(--text-secondary);
    grid-column: 1 / -1; /* 跨越所有列 */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state p {
    margin: 8px 0;
    font-size: 1rem;
}

/* 音乐库卡片 - 移除所有装饰性伪元素 */
.music-cover-container::before,
.music-cover-container::after,
#musicList > div::before,
#musicList > div::after,
#musicList > div > *::before,
#musicList > div > *::after {
    display: none !important;
    content: none !important;
}

/* Responsive */
@media (max-width: 1024px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .sidebar { display: none; } /* Mobile sidebar hidden or changed to drawer */
    .main-content { margin-left: 0; padding: 20px; }
    .stats-grid { grid-template-columns: 1fr; }
}

/* --- Modern Audio Controls --- */
.settings-group {
    background: #fff;
    border: 1px solid #e5e5ea;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 20px;
    transition: all 0.2s;
}

.settings-group:hover {
    border-color: #d1d1d6;
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}

.control-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.control-label {
    font-weight: 600;
    color: #1d1d1f;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Modern Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #e5e5ea;
    transition: .3s;
    border-radius: 24px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

input:checked + .toggle-slider {
    background-color: #1d1d1f;
}

input:checked + .toggle-slider:before {
    transform: translateX(20px);
}

/* Modern Range Slider */
.modern-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 4px;
    background: #e5e5ea;
    border-radius: 2px;
    outline: none;
    margin: 10px 0;
}

.modern-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: #1d1d1f;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    transition: transform 0.1s;
    border: 2px solid white;
}

.modern-slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

/* Modern Input */
.modern-input {
    width: 80px;
    padding: 8px 12px;
    border: 1px solid #e5e5ea;
    border-radius: 8px;
    font-size: 0.9rem;
    font-family: inherit;
    text-align: center;
    transition: all 0.2s;
    background: #f9f9fb;
    color: #1d1d1f;
    font-weight: 500;
}

.modern-input:focus {
    background: white;
    border-color: #1d1d1f;
    outline: none;
    box-shadow: 0 0 0 2px rgba(29,29,31,0.1);
}

.modern-input:disabled {
    opacity: 0.5;
    background: #f5f5f7;
    cursor: not-allowed;
    color: #86868b;
}

.settings-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #f5f5f7;
}

.settings-row:last-child {
    border-bottom: none;
}

