* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ==================== 本地字体定义 ==================== */
@font-face {
    font-family: 'M PLUS 1p';
    src: url('fonts/MPLUS1p-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'M PLUS 1p';
    src: url('fonts/MPLUS1p-Medium.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

:root {
    /* 简约色彩方案 */
    --primary-color: #374151;      /* 主要文字色 - 深灰色 */
    --secondary-color: #6b7280;    /* 次要文字色 - 中灰色 */
    --accent-color: #742581;       /* 强调色 - 深紫色 */
    --border-color: #e5e7eb;       /* 边框色 - 浅灰色 */
    --bg-primary: #ffffff;         /* 主背景色 - 白色 */
    --bg-secondary: #f9fafb;       /* 次背景色 - 极浅灰色 */
    --bg-tertiary: #f3f4f6;        /* 第三背景色 - 浅灰色 */

    /* 渐变色 - 简化版本 */
    --gradient-primary: linear-gradient(135deg, #742581 0%, #8b5a8c 100%);
    
    /* 阴影 */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
}

body {
    font-family: "M PLUS 1p", -apple-system, BlinkMacSystemFont, "Noto Sans SC", "Noto Sans JP", "Microsoft YaHei UI", "Yu Gothic UI", "Microsoft YaHei", "Yu Gothic", sans-serif;
    font-weight: 400;
    background: var(--bg-secondary);
    color: var(--primary-color);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}

/* 顶部导航 */
.header {
    background: var(--bg-primary);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: all 0.3s ease;
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo {
    font-size: 20px;
    font-weight: 300;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 0.5px;
}

.logo-badge {
    display: flex;
    gap: 8px;
}

.group-badge {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    transition: transform 0.2s ease;
}

.group-badge:hover {
    transform: scale(1.2);
}

.badge-nogi { background: var(--accent-color); }
.badge-sakura { background: var(--accent-color); }
.badge-hinata { background: var(--accent-color); }

.search-section {
    flex: 1;
    max-width: 500px;
    margin: 0 40px;
}

.search-box {
    position: relative;
}

.search-box input {
    width: 100%;
    padding: 12px 20px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 400;
    transition: all 0.3s ease;
    background: var(--bg-primary);
    color: var(--primary-color);
}

.search-box input:focus {
    outline: none;
    border-color: var(--accent-color);
    background: var(--bg-primary);
    box-shadow: 0 0 0 3px rgba(116, 37, 129, 0.1);
}

  
.stats-section {
    display: flex;
    gap: 25px;
    font-size: 14px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 16px;
    background: var(--bg-tertiary);
    border-radius: 8px;
    transition: all 0.2s ease;
    font-weight: 400;
}

.stat-item:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.stat-value {
    font-weight: 500;
    color: var(--accent-color);
}

/* 团体选择标签 */
.group-tabs {
    background: var(--bg-secondary);
    padding: 0 30px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scrollbar-width: none;
}

.group-tabs::-webkit-scrollbar {
    display: none;
}

.group-tab {
    padding: 15px 25px;
    background: none;
    border: none;
    border-radius: 25px 25px 0 0;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 10px;
}

.group-tab.active {
    color: white;
    font-weight: 600;
}

.group-tab.active.nogi { background: var(--gradient-purple); }
.group-tab.active.sakura { background: var(--gradient-pink); }
.group-tab.active.hinata { background: var(--gradient-blue); }

.group-tab:not(.active):hover {
    background: var(--bg-primary);
}

.group-icon {
    font-size: 20px;
}

.group-count {
    background: rgba(255,255,255,0.3);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
}

/* 主内容区 */
.main-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px;
}

/* 账号展示区域 */
.accounts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.account-card {
    background: var(--bg-secondary);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.account-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.account-card.selected {
    box-shadow: 0 0 0 3px var(--accent-color);
}

.account-header {
    height: 120px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    font-weight: 600;
}

.account-header.nogi { background: var(--gradient-purple); }
.account-header.sakura { background: var(--gradient-pink); }
.account-header.hinata { background: var(--gradient-blue); }

.account-info {
    padding: 20px;
}

.account-name {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.account-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 15px;
}

/* 用户模式：隐藏技术统计信息 */
.user-mode .account-item-stats {
    display: none !important;
}

.user-mode .account-item-info {
    padding-bottom: 15px;
}

.account-stat {
    text-align: center;
    padding: 10px;
    background: var(--bg-primary);
    border-radius: 10px;
}

.stat-number {
    font-size: 20px;
    font-weight: 700;
    color: var(--accent-color);
}

.stat-label {
    font-size: 12px;
    color: var(--secondary-color);
    margin-top: 2px;
}

.account-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255,255,255,0.9);
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
}

.badge-stories { background: rgba(116, 37, 129, 0.1); color: var(--accent-color); }
.badge-posts { background: rgba(116, 37, 129, 0.1); color: var(--accent-color); }

/* 内容展示区域 */
.content-section {
    display: none;
}

.content-section.active {
    display: block;
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.content-title {
    font-size: 24px;
    font-weight: 400;
    display: flex;
    align-items: center;
    gap: 15px;
    color: var(--primary-color);
    letter-spacing: 0.025em;
}

.content-controls {
    display: flex;
    gap: 15px;
    align-items: center;
}

/* 快速筛选标签 */
.filter-tabs {
    display: flex;
    background: var(--bg-primary);
    border-radius: 8px;
    padding: 4px;
    margin-bottom: 25px;
    border: 1px solid var(--border-color);
}

.filter-tab {
    padding: 10px 20px;
    border: none;
    background: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 400;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--secondary-color);
}

.filter-tab:hover {
    background: var(--bg-tertiary);
    color: var(--primary-color);
}

.filter-tab.active {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-sm);
    font-weight: 500;
}

.filter-count {
    background: rgba(255,255,255,0.3);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
    backdrop-filter: blur(10px);
}

.filter-tab.active .filter-count {
    background: rgba(255,255,255,0.3);
}

.view-toggle {
    display: flex;
    background: var(--bg-primary);
    border-radius: 10px;
    padding: 4px;
}

.view-btn {
    padding: 8px 16px;
    border: none;
    background: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.view-btn.active {
    background: var(--bg-secondary);
    box-shadow: var(--shadow-sm);
}

.sort-select {
    padding: 10px 15px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 14px;
    cursor: pointer;
    background: var(--bg-secondary);
    transition: all 0.2s ease;
}

.sort-select:focus {
    outline: none;
    border-color: var(--accent-color);
}

/* 内容网格 - 优化预览效果 */
.content-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 默认2列 */
    gap: 12px;
    width: 100%;
    background: transparent;
    border: none;
    border-radius: 0;
    overflow: visible;
    transition: all 0.3s ease;
}

/* 卡片大小控制样式 - 按钮版本 */
.card-size-buttons {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-right: 20px;
}

.card-size-buttons label {
    font-size: 14px;
    color: var(--secondary-color);
    font-weight: 500;
    margin-right: 5px;
}

.size-btn {
    padding: 6px 12px;
    border: 1px solid var(--border-color);
    background: var(--bg-primary);
    color: var(--secondary-color);
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 32px;
}

.size-btn:hover {
    background: var(--bg-secondary);
    border-color: var(--accent-color);
    color: var(--primary-color);
}

.size-btn.active {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: white;
}

/* 不同尺寸的网格布局 - 小(8列)、中(4列)、大(2列) */
.content-grid.grid-size-small {
    grid-template-columns: repeat(8, 1fr); /* 小 - 8列 */
    gap: 6px;
}

.content-grid.grid-size-medium {
    grid-template-columns: repeat(4, 1fr); /* 中 - 4列 */
    gap: 10px;
}

.content-grid.grid-size-large {
    grid-template-columns: repeat(2, 1fr); /* 大 - 2列 */
    gap: 16px;
}

/* 不同尺寸下的卡片样式调整 */
.content-grid.grid-size-small .media-card {
    padding-bottom: 100%; /* 1:1 比例 */
    border-radius: 4px;
}

.content-grid.grid-size-medium .media-card {
    padding-bottom: 100%; /* 1:1 比例 */
    border-radius: 6px;
}

.content-grid.grid-size-large .media-card {
    padding-bottom: 75%; /* 4:3 比例 */
    border-radius: 8px;
}

/* Stories 卡片样式 - 优化预览 */
.story-card {
    background: var(--bg-primary);
    border-radius: 8px; /* 添加圆角 */
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    border: 1px solid var(--border-color); /* 添加边框 */
    width: 100%;
    padding-bottom: 100%; /* 1:1 比例 */
    box-shadow: var(--shadow-sm); /* 添加阴影 */
}

.story-card:hover {
    transform: translateY(-2px); /* 改为上移效果 */
    box-shadow: var(--shadow-lg);
    z-index: 10;
}

.story-card .media-preview {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-secondary);
    overflow: hidden;
}

.story-card .media-preview img,
.story-card .media-preview video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.story-card .media-info {
    display: none;
}

/* Posts 卡片样式 - 优化预览 */
.post-card {
    background: var(--bg-primary);
    border-radius: 8px; /* 添加圆角 */
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    border: 1px solid var(--border-color); /* 添加边框 */
    width: 100%;
    padding-bottom: 100%; /* 1:1 比例 */
    box-shadow: var(--shadow-sm); /* 添加阴影 */
}

.post-card:hover {
    transform: translateY(-2px); /* 改为上移效果 */
    box-shadow: var(--shadow-lg);
    z-index: 10;
}

.post-card .media-preview {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-secondary);
    overflow: hidden;
}

.post-card .media-preview img,
.post-card .media-preview video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.post-card .media-info {
    background: var(--bg-primary);
    border-top: 1px solid var(--border-color);
    position: relative;
    display: none; /* 隐藏媒体信息区域 */
}

/* 通用媒体卡片样式 - 优化预览 */
.media-card {
    background: var(--bg-primary);
    border-radius: 8px; /* 添加圆角 */
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    border: 1px solid var(--border-color); /* 添加边框 */
    width: 100%;
    padding-bottom: 100%; /* 1:1 比例 */
    box-shadow: var(--shadow-sm); /* 添加阴影 */
}

.media-card:hover {
    transform: translateY(-2px); /* 改为上移效果 */
    box-shadow: var(--shadow-lg);
    z-index: 10;
}

.media-card .media-preview {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-secondary);
    overflow: hidden;
}

.media-card .media-preview img,
.media-card .media-preview video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

/* 隐藏媒体信息区域 - Instagram网格风格 */
.media-card .media-info {
    display: none;
}

/* 圆形下载按钮 */
.download-btn {
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.7);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 5;
}

.download-btn:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.1);
}

.media-card:hover .download-btn {
    opacity: 1;
}

/* Posts特有的标题预览样式 */
.post-card .post-title {
    color: var(--primary-color);
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
    margin-bottom: 8px;
    display: -webkit-box;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-card .media-preview {
    border-radius: 0;
    background: var(--bg-primary);
    overflow: hidden;
}

.post-card .media-preview img,
.post-card .media-preview video {
    border-radius: 0;
}


.media-preview {
    position: relative;
    width: 100%;
    padding-top: 100%;
    background: var(--bg-primary);
    overflow: hidden;
}

.media-preview img,
.media-preview video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.media-card:hover .media-preview img,
.media-card:hover .media-preview video {
    transform: scale(1.05);
}

.media-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 60%, rgba(0,0,0,0.7));
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: flex-end;
    padding: 15px;
}

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

.play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    background: rgba(255,255,255,0.95);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--accent-color);
    opacity: 0;
    transition: all 0.3s ease;
}

.media-card:hover .play-icon {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.1);
}

/* Stories 特殊样式 */
.story-time {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    backdrop-filter: blur(10px);
    display: none !important;
    transition: all 0.3s ease;
}

/* Story时间显示 - 悬停显示 */
.media-preview .story-time,
.media-card .media-preview .story-time,
.story-card .story-time {
    display: none !important;
    position: absolute;
    top: 6px;
    left: 6px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 500;
    backdrop-filter: blur(10px);
    z-index: 2;
    white-space: nowrap;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.media-card:hover .story-time,
.list-item:hover .story-time {
    display: block !important;
}

/* 隐藏post-stats和media-type-badge */
.post-stats,
.media-type-badge {
    display: none !important;
}

.media-card:hover .post-stats,
.media-card:hover .media-type-badge {
    display: block !important;
}

.story-type-badge {
    position: absolute;
    bottom: 6px;
    right: 6px;
    background: rgba(255, 107, 157, 0.9);
    color: white;
    padding: 2px 6px;
    border-radius: 8px;
    font-size: 9px;
    font-weight: 600;
    backdrop-filter: blur(10px);
    line-height: 1;
}

/* Posts 特殊样式 */
.post-title {
    position: absolute;
    bottom: 15px;
    left: 15px;
    right: 15px;
    color: white;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
    text-shadow: 0 2px 4px rgba(0,0,0,0.8);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.post-card:hover .post-title {
    opacity: 1;
}

.post-stats {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 6px 10px;
    border-radius: 15px;
    font-size: 11px;
    font-weight: 600;
    backdrop-filter: blur(10px);
}

.post-type-badge {
    position: absolute;
    bottom: 6px;
    right: 6px;
    background: rgba(75, 192, 192, 0.9);
    color: white;
    padding: 2px 6px;
    border-radius: 8px;
    font-size: 9px;
    font-weight: 600;
    backdrop-filter: blur(10px);
    line-height: 1;
}

.badge-video { background: rgba(74, 144, 226, 0.9); }
.badge-image { background: rgba(139, 71, 137, 0.9); }

.media-info {
    padding: 15px;
}

.story-card .media-info {
    padding: 18px;
}

.post-card .media-info {
    padding: 15px;
    border-top: 1px solid var(--border-color);
}

.media-account {
    font-weight: 500;
    color: var(--primary-color);
    margin-bottom: 8px;
    font-size: 14px;
    letter-spacing: 0.02em;
}

.story-card .media-account {
    font-size: 15px;
}

.media-meta {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--secondary-color);
    margin-bottom: 10px;
}

.story-card .media-meta {
    font-size: 13px;
    margin-bottom: 12px;
}

.media-actions {
    display: flex;
    gap: 8px;
}

.action-btn {
    flex: 1;
    padding: 8px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.story-card .action-btn {
    padding: 10px;
    font-size: 13px;
    border-radius: 10px;
}

.btn-view {
    background: var(--gradient-primary);
    color: white;
    font-weight: 400;
}

.btn-view:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.btn-download {
    background: var(--bg-tertiary);
    color: var(--primary-color);
    border: 1px solid var(--border-color);
    font-weight: 400;
}

.btn-download:hover {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}

/* 媒体信息样式 */
.media-account {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 5px;
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.95);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.modal.show {
    display: flex;
}

.modal-content {
    position: relative;
    width: 100% !important;
    height: 100% !important;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent !important;
}

.modal-close {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    color: white;
    border: none;
    font-size: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1002;
}

.modal-close:hover {
    background: rgba(255,255,255,0.2);
    transform: scale(1.1);
}

/* 模态框下载按钮 */
.modal-download {
    position: fixed;
    top: 20px;
    right: 90px;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1002;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-download:hover {
    background: rgba(255,255,255,0.2);
    transform: scale(1.1);
}

.modal-download:active {
    transform: scale(0.95);
}

/* 模态框导航按钮 */
.modal-nav {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1002;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
}

.modal.show .modal-nav {
    opacity: 1;
    pointer-events: auto;
}

.modal-nav:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-50%) scale(1.1);
}

.modal-nav:active {
    transform: translateY(-50%) scale(0.95);
}

.modal-nav-prev {
    left: 20px;
}

.modal-nav-next {
    right: 20px;
}

.modal-nav.disabled {
    opacity: 0.3 !important;
    cursor: not-allowed;
    pointer-events: none;
}

/* 移动端：按钮稍小 */
@media (max-width: 768px) {
    .modal-nav {
        width: 40px;
        height: 40px;
    }
    
    .modal-nav-prev {
        left: 10px;
    }
    
    .modal-nav-next {
        right: 10px;
    }
}

.modal-player {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: 100vw !important;
    height: 100vh !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    background: transparent !important;
    z-index: 1000 !important;
    pointer-events: none !important;
}

.modal-player img,
.modal-player video {
    max-width: 95vw !important;
    max-height: 95vh !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    display: block !important;
    margin: auto !important;
    pointer-events: auto !important;
}

/* Plyr 视频播放器居中 */
.modal-player .plyr {
    width: auto !important;
    max-width: 95vw !important;
    max-height: 95vh !important;
    margin: auto !important;
    pointer-events: auto !important;
}

.modal-player .plyr video {
    max-width: 95vw !important;
    max-height: 95vh !important;
    width: auto !important;
    height: auto !important;
}

/* 全屏状态优化 */
.plyr--fullscreen-active,
.plyr--fullscreen-active .plyr__video-wrapper {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
}

.modal.plyr-fullscreen-active .modal-info,
.modal.plyr-fullscreen-active .modal-nav,
.modal.plyr-fullscreen-active .modal-close,
.modal.plyr-fullscreen-active .modal-download {
    opacity: 0 !important;
    pointer-events: none !important;
}

.modal-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    padding: 30px 20px 20px;
    color: white;
    z-index: 1001;
    pointer-events: none;
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 5px;
}

.modal-meta {
    font-size: 14px;
    opacity: 0.8;
}

/* 加载和空状态 */
.loading {
    text-align: center;
    padding: 80px 20px;
    color: var(--secondary-color);
}

.spinner {
    border: 3px solid var(--border-color);
    border-top: 3px solid var(--accent-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

.empty-state {
    text-align: center;
    padding: 100px 20px;
    color: var(--secondary-color);
}

.empty-icon {
    font-size: 16px;
    margin-bottom: 20px;
    opacity: 0.3;
}

.empty-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.empty-desc {
    font-size: 14px;
    max-width: 400px;
    margin: 0 auto;
}

/* 主布局容器 */
.main-layout {
    display: flex;
    height: calc(100vh - 80px); /* 减去header高度 */
    max-height: calc(100vh - 80px);
    overflow: hidden;
}

/* 左侧账号侧边栏 */
.sidebar {
    width: 280px;
    background: var(--bg-primary);
    border-right: 1px solid var(--border-color);
    overflow: hidden;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
    background: var(--gradient-primary);
    color: white;
}

.sidebar-header h3 {
    font-size: 16px;
    font-weight: 400;
    margin: 0;
    letter-spacing: 0.5px;
}

/* 隐藏侧边栏统计信息 */
.sidebar-stats {
    display: none;
}

/* 账号列表 - 全新设计 */
.accounts-list {
    padding: 12px 12px 80px 12px; /* 底部增加额外padding，确保最后一个账号完整显示 */
    overflow-y: scroll;
    overflow-x: hidden;
    flex: 1;
    min-height: 0;
    max-height: 100%;
    -webkit-overflow-scrolling: touch;
}

.account-item {
    background: var(--bg-primary);
    border-radius: 10px;
    padding: 6px 8px;
    margin-bottom: 4px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
    position: relative;
    overflow: hidden;
}

.account-item:hover {
    background: var(--bg-secondary);
    border-color: var(--border-color);
    transform: translateX(2px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.account-item.active {
    background: linear-gradient(135deg, rgba(116, 37, 129, 0.08) 0%, rgba(139, 90, 140, 0.05) 100%);
    border-color: var(--accent-color);
    box-shadow: 0 0 0 1px rgba(116, 37, 129, 0.2), 0 2px 8px rgba(116, 37, 129, 0.1);
}

.account-item-content {
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
}

.account-avatar {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--bg-tertiary);
    border: 1px solid var(--bg-primary);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.account-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

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

.account-item-name {
    font-weight: 500;
    color: var(--primary-color);
    font-size: 13px;
    line-height: 1.2;
    margin-bottom: 1px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.account-item-meta {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

.account-group-badge {
    background: var(--bg-tertiary);
    color: var(--secondary-color);
    padding: 2px 6px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* 乃木坂46 - 紫色 */
.account-group-badge[style*="#742581"],
.account-group-badge[style*="rgb(116, 37, 129)"] {
    background: rgba(116, 37, 129, 0.15) !important;
    color: #742581 !important;
    border: 1px solid rgba(116, 37, 129, 0.3) !important;
}

/* 櫻坂46 - 粉色 */
.account-group-badge[style*="#F19DB5"],
.account-group-badge[style*="rgb(241, 157, 181)"] {
    background: rgba(241, 157, 181, 0.15) !important;
    color: #d63384 !important;
    border: 1px solid rgba(241, 157, 181, 0.3) !important;
}

/* 日向坂46 - 蓝色 */
.account-group-badge[style*="#7BC7E8"],
.account-group-badge[style*="rgb(123, 199, 232)"] {
    background: rgba(123, 199, 232, 0.15) !important;
    color: #0ea5e9 !important;
    border: 1px solid rgba(123, 199, 232, 0.3) !important;
}

.account-count {
    display: none; /* 隐藏项目数 */
}

/* 简化徽章系统 */
.account-item-badges {
    display: none; /* 隐藏复杂徽章 */
}

/* 隐藏账号项中的技术统计信息 */
.account-item-stats {
    display: none !important;
}

.account-item-stat {
    text-align: center;
    padding: 6px;
    background: var(--bg-secondary);
    border-radius: 6px;
}

.account-item-stat-number {
    font-weight: 600;
    color: var(--accent-color);
    font-size: 13px;
}

.account-item-stat-label {
    font-size: 10px;
    margin-top: 2px;
}

/* 主内容区适配侧边栏 */
.main-container {
    flex: 1;
    padding: 30px;
    max-width: none;
    margin: 0;
    min-width: 0; /* 允许收缩 */
    overflow-y: auto;
    overflow-x: hidden;
}

.content-section {
    display: block; /* 默认显示内容区域 */
    width: 100%;
}

/* 响应式设计 - 优化预览效果 */
@media (max-width: 1200px) {
    .content-grid.grid-size-small {
        grid-template-columns: repeat(6, 1fr); /* 小 - 6列 */
    }
    
    .content-grid.grid-size-medium {
        grid-template-columns: repeat(3, 1fr); /* 中 - 3列 */
    }
    
    .content-grid.grid-size-large {
        grid-template-columns: repeat(2, 1fr); /* 大 - 2列 */
    }
}

@media (max-width: 768px) {
    .content-grid.grid-size-small {
        grid-template-columns: repeat(4, 1fr); /* 小 - 4列 */
    }
    
    .content-grid.grid-size-medium {
        grid-template-columns: repeat(2, 1fr); /* 中 - 2列 */
    }
    
    .content-grid.grid-size-large {
        grid-template-columns: repeat(1, 1fr); /* 大 - 1列 */
    }
    
    .main-layout {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        height: auto;
        max-height: 200px;
        overflow: hidden;
    }
    
    .card-size-buttons {
        margin-right: 10px;
    }
    
    .size-btn {
        padding: 5px 10px;
        font-size: 12px;
        min-width: 28px;
    }
    
    .sidebar-header h3 {
        font-size: 14px;
    }

    .accounts-list {
        display: flex;
        gap: 10px;
        overflow-x: auto;
        padding: 10px;
    }

    .account-item {
        flex-shrink: 0;
        min-width: 120px;
        margin-bottom: 4px;
        padding: 6px 8px;
    }

    .account-avatar {
        width: 32px;
        height: 32px;
    }

    .account-item-name {
        font-size: 13px;
    }
    
    .pin-btn {
        width: 24px;
        height: 24px;
        right: 6px;
    }

    .account-item-stats {
        grid-template-columns: 1fr;
        gap: 5px;
    }

    .header-content {
        flex-direction: column;
        gap: 15px;
        padding: 15px 20px;
    }

    .search-section {
        margin: 0;
        max-width: 100%;
    }

    .stats-section {
        justify-content: center;
    }

    .main-container {
        padding: 20px;
    }

    .content-header {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
}

@media (max-width: 480px) {
    .content-grid {
        grid-template-columns: repeat(1, 1fr); /* 小屏幕改为1列，最大化卡片 */
        gap: 10px;
    }
}

/* 平滑滚动 */
html {
    scroll-behavior: smooth;
}

/* 自定义滚动条 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

/* 置顶按钮样式 - 优化版 */
.pin-btn {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    background: transparent;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--secondary-color);
    transition: all 0.2s ease;
    opacity: 0;
    z-index: 10;
}

.account-item:hover .pin-btn {
    opacity: 0.7;
}

.pin-btn:hover {
    background: rgba(116, 37, 129, 0.1);
    color: var(--accent-color);
    transform: translateY(-50%) scale(1.05);
    opacity: 1;
}

.pin-btn.pinned {
    opacity: 1;
    color: #f59e0b;
}

.pin-btn.pinned:hover {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
}

/* 置顶账号样式 - 优化版 */
.account-item.pinned {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.06) 0%, rgba(251, 191, 36, 0.03) 100%);
    border-color: rgba(245, 158, 11, 0.2);
}

.account-item.pinned:hover {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.08) 0%, rgba(251, 191, 36, 0.05) 100%);
    border-color: rgba(245, 158, 11, 0.3);
}

.account-item.pinned .account-item-name {
    font-weight: 600;
    color: var(--primary-color);
}

.account-item.pinned .pin-btn {
    color: #f59e0b;
}

/* 确保 account-item-content 支持绝对定位 */
.account-item-content {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    width: 100%;
}

/* ==================== 批量下载功能样式 ==================== */

/* 批量下载按钮容器 */
.batch-download-wrapper {
    position: relative;
}

/* 批量下载按钮 */
.batch-download-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.batch-download-btn:hover:not(:disabled) {
    background: #5a1d66;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(116, 37, 129, 0.3);
}

.batch-download-btn:disabled {
    background: var(--secondary-color);
    cursor: not-allowed;
    opacity: 0.5;
}

.batch-download-btn .arrow-icon {
    transition: transform 0.2s ease;
}

.batch-download-btn:hover:not(:disabled) .arrow-icon {
    transform: translateY(2px);
}

/* 下拉菜单 */
.download-menu {
    position: absolute;
    top: calc(100% + 2px);
    right: -8px;
    background: var(--bg-primary);
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    min-width: 220px;
    z-index: 1000;
    overflow: hidden;
}

.menu-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.2s ease;
    font-size: 14px;
    color: var(--primary-color);
}

.menu-item:hover {
    background: var(--bg-secondary);
}

.menu-item:first-child {
    border-radius: 8px 8px 0 0;
}

.menu-item:last-child {
    border-radius: 0 0 8px 8px;
}

.menu-item .count {
    color: var(--secondary-color);
    font-size: 12px;
    font-weight: 500;
    background: var(--bg-tertiary);
    padding: 2px 8px;
    border-radius: 10px;
    min-width: 30px;
    text-align: center;
}

.menu-divider {
    height: 1px;
    background: var(--border-color);
    margin: 4px 0;
}

/* 下载进度提示 - 右下角 */
.download-progress-overlay {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 10000;
    pointer-events: none;
}

.download-progress-modal {
    background: var(--bg-primary);
    border-radius: 12px;
    padding: 20px;
    min-width: 320px;
    max-width: 400px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    animation: slideInRight 0.3s ease;
    pointer-events: auto;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.progress-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 500;
    color: var(--primary-color);
    text-align: left;
    flex: 1;
}

.progress-cancel-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: rgba(116, 37, 129, 0.08);
    color: #742581;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-left: 12px;
}

.progress-cancel-btn:hover {
    background: rgba(116, 37, 129, 0.15);
    transform: rotate(90deg);
}

.progress-cancel-btn:active {
    transform: scale(0.9);
}

.progress-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.progress-bar-container {
    width: 100%;
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-color) 0%, #8b5a8c 100%);
    border-radius: 4px;
    transition: width 0.3s ease;
    position: relative;
    overflow: hidden;
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.3) 50%,
        transparent 100%
    );
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

.progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: var(--secondary-color);
}

#progressText {
    font-weight: 600;
    color: var(--accent-color);
}

/* 移动端适配 */
@media (max-width: 768px) {
    .batch-download-btn {
        padding: 6px 12px;
        font-size: 13px;
    }
    
    .batch-download-btn span {
        display: none;
    }
    
    .batch-download-btn svg:first-child {
        margin: 0;
    }
    
    .download-menu {
        right: 0;
        left: auto;
        min-width: 200px;
    }
    
    .download-progress-modal {
        min-width: 300px;
        padding: 20px;
    }
    
    .progress-header h3 {
        font-size: 16px;
    }
}

/* ==================== 虚拟滚动样式 ==================== */

/* 虚拟页面容器 */
.virtual-page {
    display: contents; /* 让子元素直接参与网格布局 */
}

/* 滚动哨兵（不可见） */
.scroll-sentinel {
    height: 1px;
    width: 100%;
    visibility: hidden;
    grid-column: 1 / -1; /* 占据整行 */
}

/* ==================== 懒加载样式 ==================== */

/* 懒加载图片占位效果 */
.lazy-image,
.lazy-video {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading-shimmer 1.5s infinite;
    min-height: 200px; /* 防止布局抖动 */
}

/* 加载动画 */
@keyframes loading-shimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* 已加载的图片/视频 */
.lazy-loaded {
    animation: fade-in 0.3s ease-in;
}

@keyframes fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* 加载更多指示器 */
.loading-more {
    grid-column: 1 / -1;
    text-align: center;
    padding: 20px;
    color: var(--secondary-color);
    font-size: 14px;
}

/* 优化网格布局以支持虚拟滚动 */
.content-grid {
    position: relative;
    min-height: 100px; /* 确保有最小高度 */
}
