/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Microsoft YaHei', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    min-height: 100vh;
    overflow-x: hidden;
}

/* 音乐播放器样式 */
.music-player {
    position: fixed;
    top: 20px;
    right: 90px;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 15px;
}

.music-toggle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    padding: 5px;
    object-fit: cover;
}

.music-toggle.playing {
    animation: rotate 5s linear infinite;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.mute-toggle {
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    border-radius: 50%;
    cursor: pointer;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.mute-toggle:hover,
.music-toggle:hover {
    transform: scale(1.1);
    background: rgba(255, 255, 255, 0.2);
}

/* 页面布局 */
.class-page {
    display: grid;
    grid-template-columns: 300px 1fr;
    min-height: 100vh;
}

.sidebar {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 20px;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
    overflow-y: auto;
    height: 100vh;
    position: fixed;
    width: 300px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
}

.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

.content {
    margin-left: 300px;
    padding: 80px 40px 40px 40px;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: calc(100% - 300px);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 图片列表样式 */
.image-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.image-list li {
    padding: 12px 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 8px;
    margin-bottom: 5px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    white-space: nowrap;
    overflow: hidden;
    position: relative;
}

.image-list li.long-text {
    animation: scrollText 15s linear infinite;
}

@keyframes scrollText {
    0% { transform: translateX(0); }
    10% { transform: translateX(0); }
    90% { transform: translateX(calc(-100% + 260px)); }
    100% { transform: translateX(calc(-100% + 260px)); }
}

.image-list li:hover {
    animation-play-state: paused;
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(5px);
}

.image-list li.active {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.4);
}

/* 图片预览样式 */
.image-preview {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(5px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 40px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
}

.image-preview img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
    opacity: 0;
    transition: all 0.3s ease;
}

.image-preview img.loaded {
    opacity: 1;
}

.no-image {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.2em;
    text-align: center;
}

/* 返回按钮和Logo样式 */
.back-button {
    position: fixed;
    top: 20px;
    right: 200px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.4);
    padding: 12px 25px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 16px;
    text-decoration: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    z-index: 1000;
}

.back-button:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.corner-logo {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    padding: 5px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    z-index: 1000;
    transition: transform 0.3s ease;
    object-fit: cover;
}

.corner-logo:hover {
    transform: rotate(360deg);
}

/* 标题样式 */
h1 {
    margin-bottom: 30px;
    font-size: 1.8em;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
    position: relative;
    padding-bottom: 10px;
}

h1::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 2px;
    background: rgba(255, 255, 255, 0.5);
}

/* 响应式布局 */
@media (max-width: 768px) {
    .class-page {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        position: relative;
        width: 100%;
        height: auto;
        max-height: 300px;
    }
    
    .content {
        position: relative;
        margin-left: 0;
        width: 100%;
        padding: 20px;
    }
    
    .image-preview {
        min-height: 50vh;
    }
    
    .back-button {
        right: 150px;
    }
    
    .music-player {
        right: 70px;
    }
    
    .corner-logo {
        right: 10px;
    }
} 