:root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #1a1a1a;
    --bg-card: rgba(255, 255, 255, 0.05);
    --accent: #ff6b6b;
    --accent-secondary: #4ecdc4;
    --accent-tertiary: #ffe66d;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --text-muted: #666666;
    --border: rgba(255, 255, 255, 0.1);
    --shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8);
    --shadow-colored: 0 25px 50px -12px rgba(255, 107, 107, 0.3);
    --gradient-main: linear-gradient(135deg, #ff6b6b 0%, #4ecdc4 50%, #ffe66d 100%);
    --gradient-card: linear-gradient(145deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    --blur: blur(20px);
}

[data-theme="light"] {
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-card: rgba(255, 255, 255, 0.8);
    --text-primary: #1a202c;
    --text-secondary: #4a5568;
    --text-muted: #718096;
    --border: rgba(0, 0, 0, 0.1);
    --shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.1);
    --shadow-colored: 0 25px 50px -12px rgba(255, 107, 107, 0.2);
    --gradient-card: linear-gradient(145deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.6) 100%);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    transition: all 0.3s ease;
}

/* 动态背景 */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-main);
    opacity: 0.03;
    z-index: -2;
    /* animation: gradientShift 10s ease-in-out infinite; */
}
/* 
@keyframes gradientShift {
    0%, 100% { transform: translateX(0) translateY(0) scale(1); }
    33% { transform: translateX(-20px) translateY(20px) scale(1.05); }
    66% { transform: translateX(20px) translateY(-20px) scale(0.95); }
} */

/* 粒子背景 */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--accent);
    border-radius: 50%;
    opacity: 0.3;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); opacity: 0.3; }
    50% { transform: translateY(-20px) rotate(180deg); opacity: 0.8; }
}

/* 顶部导航 */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: var(--bg-card);
    backdrop-filter: var(--blur);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    transition: all 0.3s ease;
}

.logo {
    font-size: 18px;
    font-weight: 700;
    background: var(--gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.kaiguan{
    display: flex;
    justify-content: space-between;
    align-items: center;
    /* margin-top: 10px; */
    margin-bottom: 16px;
    background: var(--bg-secondary);
    padding: 10px;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.kaiguan:hover {
    transform: translateY(-2px);
    background: var(--bg-card);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.theme-toggle-btn {
    width: 50px;
    height: 26px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 13px;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
}

.theme-toggle-btn::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background: var(--gradient-main);
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

[data-theme="light"] .theme-toggle-btn::after {
    transform: translateX(24px);
}

.auto-play-toggle {
    width: 50px;
    height: 26px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 13px;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
}

.auto-play-toggle::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background: var(--gradient-main);
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.auto-play-toggle.active::after {
    transform: translateX(24px);
}

/* 主容器 */
.container {
    /* padding: 120px 40px 40px; */
    max-width: 100%;
    margin: 0 auto;
    display: flex;
    gap: 0;
    height: calc(100vh - 0px);
    overflow: hidden;
}

/* 抽屉布局 */
.video-drawer {
    position: relative;
    width: 20vw;
    min-width: 0px;
    height: 100%;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10;
    display: flex;
}

.video-drawer.collapsed {
    width: 0px;
}

.video-drawer .drawer-content {
    flex: 1;
    height: 100%;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.video-drawer.collapsed .drawer-content {
    opacity: 0;
    pointer-events: none;
}

/* 抽屉遮罩 */
.drawer-curtain {
    display: none;
}

/* 抽屉切换按钮 */
.drawer-toggle {
    position: absolute;
    right: -20px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 40px;
    background: var(--gradient-main);
    border: none;
    border-radius: 0 10px 10px 0;
    cursor: pointer;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
    transition: all 0.3s ease;
    box-shadow: 4px 0 15px rgba(255, 107, 107, 0.3);
}

/* .drawer-toggle:hover {
    right: -5px;
    width: 45px;
} */

.drawer-toggle i {
    transition: transform 0.3s ease;
}

.video-drawer.collapsed .drawer-toggle i {
    transform: rotate(180deg);
}

/* 最小化时的预览按钮 */


.drawer-mini {
    position: absolute;
    right: -20px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 40px;
    background: var(--gradient-main);
    border: none;
    border-radius: 0 10px 10px 0;
    cursor: pointer;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
    transition: all 0.3s ease;
    box-shadow: 4px 0 15px rgba(255, 107, 107, 0.3);
}

.drawer-mini:hover {
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 6px 25px rgba(255, 107, 107, 0.5);
}

/* 右侧 iframe 容器 */
.iframe-container {
    flex: 1;
    height: 100%;
    border-radius: 24px;
    overflow: hidden;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.iframe-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* 标题区域 */
.hero-section {
    text-align: center;
    margin-bottom: 60px;
    position: relative;
}

.hero-title {
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 700;
    background: var(--gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 20px;
    line-height: 1.1;
    letter-spacing: -2px;
    animation: slideInUp 1s ease-out;
}

.hero-subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    font-weight: 400;
    animation: slideInUp 1s ease-out 0.2s both;
}

@keyframes slideInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 主内容区域 */
.main-content {
    display: grid;
    /* grid-template-columns: 1fr 380px; */
    gap: 40px;
    align-items: start;
}

/* 图片卡片 */
.image-card {
    /* background: var(--gradient-card); */
    /* border: 1px solid var(--border); */
    border-radius: 32px;
    padding: 10px;
    backdrop-filter: var(--blur);
    /* box-shadow: var(--shadow); */
    transition: all 0.4s ease;
    position: relative;
    overflow-y: auto;
    height: 100vh;
}


.image-container {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    background: var(--bg-secondary);
    height: 33.75vw;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    margin-top: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.image-container:hover {
    transform: scale(1.02);
}

#randomImage, #randomVideo {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #FFFFFF;
    border-radius: 24px;
    transition: all 0.5s ease;
    padding: 2px;
}

.image-overlay {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 12px;
    opacity: 0;
    transition: all 0.3s ease;
}

.image-container:hover .image-overlay {
    opacity: 1;
}

.overlay-btn {
    width: 32px;
    height: 32px;
    border-radius: 16px;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: var(--blur);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.3s ease;
}

.overlay-btn:hover {
    background: var(--accent);
    transform: scale(1.1);
}

/* 控制按钮 */
.controls {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.btn {
    background: var(--gradient-main);
    color: white;
    border: none;
    padding: 10px 8px;
    border-radius: 20px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    /* box-shadow: 0 8px 25px rgba(255, 107, 107, 0.3); */
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn:hover {
    transform: translateY(-3px);
    /* box-shadow: 0 15px 35px rgba(255, 107, 107, 0.4); */
}

.btn:active {
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    /* box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1); */
}

.btn-secondary:hover {
    /* box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2); */
}

/* 侧边栏 */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.sidebar-card {
    background: var(--gradient-card);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 24px;
    backdrop-filter: var(--blur);
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.sidebar-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-colored);
}

.sidebar-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-title i {
    background: var(--gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 统计数据 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.stat-item {
    text-align: center;
    padding: 10px 8px;
    background: var(--bg-secondary);
    border-radius: 16px;
    /* border: 1px solid var(--border); */
    transition: all 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-2px);
    background: var(--bg-card);
}

.stat-number {
    font-size: 28px;
    font-weight: 700;
    background: var(--gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
}

/* 收藏和历史 */
.content-list {
    max-height: 200px;
    overflow-y: auto;
}

/* 底部统计栏 */
.stats-bar {
    display: flex;
    justify-content: space-around;
    padding: 20px;
    margin-top: 20px;
    background: var(--bg-card);
    border-radius: 16px;
    border: 1px solid var(--border);
}

.stats-bar .stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--bg-secondary);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.stats-bar .stat-item:hover {
    background: var(--bg-card);
    transform: translateY(-2px);
}

.stats-bar .stat-item i {
    font-size: 20px;
    background: var(--gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stats-bar .stat-item span:first-of-type {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.stats-bar .stat-item .stat-label {
    font-size: 12px;
    color: var(--text-secondary);
}

.content-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    margin-bottom: 8px;
    background: var(--bg-secondary);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid var(--border);
}

.content-item:hover {
    background: var(--bg-card);
    transform: translateX(4px);
}

.content-thumb {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    object-fit: cover;
    background: var(--bg-secondary);
}

.content-info {
    flex: 1;
    font-size: 13px;
    color: var(--text-secondary);
}

.remove-btn {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    background: var(--accent);
    color: white;
    border: none;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
    transition: all 0.3s ease;
}

.remove-btn:hover {
    opacity: 1;
    transform: scale(1.1);
}

/* 质量选择器 */
.quality-selector {
    display: flex;
    gap: 8px;
}

.quality-btn {
    flex: 1;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 13px;
    font-weight: 500;
}

.quality-btn.active,
.quality-btn:hover {
    background: var(--gradient-main);
    color: white;
    border-color: transparent;
    transform: translateY(-2px);
}

/* 加载状态 */
.loading {
    display: none;
    position: absolute;
    right: calc(50% - 45px);
    top: calc(50% - 25px);
    transform: translateY(-50%);
    text-align: center;
    font-size: 18px;
    color: var(--text-secondary);
    animation: loadingPulse 2s infinite;
}

@keyframes loadingPulse {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.05); }
}

/* 播放/暂停图标 */
.play-pause-icon {
    display: none;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 50%;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

.play-pause-icon i {
    font-size: 18px;
    position: relative;
    right: -2px;
    color: white;
}

/* 错误信息 */
.error-msg {
    display: none;
    margin-top: 20px;
    padding: 16px 20px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
    color: white;
    border-radius: 16px;
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.3);
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* 全屏模式 */
.fullscreen-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: var(--blur);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fullscreen-image, .fullscreen-video {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 16px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

.fullscreen-close {
    position: absolute;
    top: 40px;
    right: 40px;
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: var(--blur);
    color: white;
    border: none;
    cursor: pointer;
    font-size: 24px;
    transition: all 0.3s ease;
}

.fullscreen-play-pause-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: var(--blur);
    color: white;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    pointer-events: none;
}

.fullscreen-close:hover {
    background: var(--accent);
    transform: scale(1.1);
}

/* 通知 */
.notification {
    position: fixed;
    top: 100px;
    right: 40px;
    background: var(--gradient-card);
    backdrop-filter: var(--blur);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 16px 24px;
    border-radius: 16px;
    box-shadow: var(--shadow);
    z-index: 1000;
    transform: translateX(400px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
}

.notification.show {
    transform: translateX(0);
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 4px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: 2px;
}

::-webkit-scrollbar-thumb {
    background: var(--gradient-main);
    border-radius: 2px;
}

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