:root {
    --bg-color: #1a1a1d;
    --text-color: #e0e0e0;
    --accent-color: #c3a160; /* 金色 */
    --secondary-accent: #4a6fa5; /* 魔法蓝 */
    --card-bg: #2c2c32;
    --border-color: #3e3e46;
    --font-main: 'Georgia', 'Times New Roman', serif;
    --font-heading: 'Trajan Pro', 'Cinzel', 'Georgia', serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    background-image: radial-gradient(circle at top right, #25252b 0%, transparent 40%),
                      radial-gradient(circle at bottom left, #1f2228 0%, transparent 40%);
    background-attachment: fixed;
}

header {
    background-color: rgba(26, 26, 29, 0.95);
    border-bottom: 2px solid var(--accent-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    color: var(--accent-color);
    text-decoration: none;
    font-weight: bold;
    text-shadow: 0 0 10px rgba(195, 161, 96, 0.3);
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 1.1rem;
    transition: color 0.3s ease;
    position: relative;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--accent-color);
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--accent-color);
    transition: width 0.3s ease;
}

.nav-links a:hover::after, .nav-links a.active::after {
    width: 100%;
}

/* 下拉菜单样式 */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-toggle {
    color: var(--text-color);
    text-decoration: none;
    font-size: 1.1rem;
    transition: color 0.3s ease;
    position: relative;
    cursor: pointer;
    padding: 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.dropdown-toggle::after {
    content: '▼';
    font-size: 0.7rem;
    transition: transform 0.3s ease;
}

.dropdown:hover .dropdown-toggle::after {
    transform: rotate(180deg);
}

.dropdown-toggle:hover {
    color: var(--accent-color);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: rgba(26, 26, 29, 0.98);
    border: 1px solid var(--accent-color);
    border-radius: 4px;
    min-width: 200px;
    padding: 0.5rem 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    box-shadow: 0 8px 16px rgba(0,0,0,0.5);
    z-index: 1000;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu a {
    display: block;
    padding: 0.8rem 1.5rem;
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.dropdown-menu a:hover {
    background-color: rgba(195, 161, 96, 0.1);
    color: var(--accent-color);
    padding-left: 2rem;
}

.dropdown-menu a::after {
    display: none;
}

main {
    max-width: 1000px;
    margin: 2rem auto;
    padding: 0 2rem;
    min-height: 80vh;
}

.hero {
    text-align: center;
    padding: 4rem 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 3rem;
}

h1, h2, h3 {
    font-family: var(--font-heading);
    color: var(--accent-color);
    margin-bottom: 1rem;
}

h1 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

h2 {
    font-size: 2rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
    margin-top: 2rem;
}

h3 {
    font-size: 1.5rem;
    color: var(--secondary-accent);
    margin-top: 1.5rem;
}

p {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
    border-color: var(--accent-color);
}

.card h3 {
    margin-top: 0;
}

.btn {
    display: inline-block;
    background-color: transparent;
    border: 2px solid var(--accent-color);
    color: var(--accent-color);
    padding: 0.8rem 1.5rem;
    text-decoration: none;
    font-weight: bold;
    margin-top: 1rem;
    transition: all 0.3s ease;
    border-radius: 4px;
}

.btn:hover {
    background-color: var(--accent-color);
    color: var(--bg-color);
}

/* 表格样式 */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    background-color: var(--card-bg);
    border-radius: 8px;
    overflow: hidden;
}

th, td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

th {
    background-color: rgba(0,0,0,0.2);
    color: var(--accent-color);
    font-family: var(--font-heading);
}

tr:hover {
    background-color: rgba(255,255,255,0.05);
}

/* 列表样式 */
ul {
    list-style-position: inside;
    margin-bottom: 1rem;
}

li {
    margin-bottom: 0.5rem;
}

.tag {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    background-color: rgba(74, 111, 165, 0.2);
    color: var(--secondary-accent);
    border-radius: 4px;
    font-size: 0.9rem;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
}

footer {
    text-align: center;
    padding: 2rem;
    margin-top: 4rem;
    border-top: 1px solid var(--border-color);
    color: #888;
    font-size: 0.9rem;
}

/* 引用块 */
blockquote {
    border-left: 4px solid var(--accent-color);
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: #bbb;
    background-color: rgba(255,255,255,0.03);
    padding: 1.5rem;
    border-radius: 0 8px 8px 0;
}


/* ==================== 音乐播放器样式 ==================== */
.music-player {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
}

.player-toggle {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    transition: all 0.3s ease;
    animation: pulse 2s infinite;
}

.player-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.player-toggle.playing {
    animation: pulse 1s infinite, rotate 3s linear infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    }
    50% {
        box-shadow: 0 4px 25px rgba(102, 126, 234, 0.8);
    }
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.player-icon {
    font-size: 1.8rem;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

.player-panel {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 350px;
    background: rgba(26, 26, 29, 0.98);
    border: 2px solid var(--accent-color);
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.player-panel.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.player-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid var(--border-color);
}

.player-header h4 {
    margin: 0;
    color: var(--accent-color);
    font-size: 1.2rem;
}

.player-close {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.player-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--accent-color);
}

.player-info {
    text-align: center;
    margin-bottom: 1rem;
}

.track-title {
    font-size: 1.1rem;
    color: var(--text-color);
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.track-time {
    font-size: 0.9rem;
    color: #888;
}

.player-progress {
    margin-bottom: 1rem;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    cursor: pointer;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-color), var(--secondary-accent));
    border-radius: 3px;
    width: 0%;
    transition: width 0.1s linear;
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.player-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.control-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.control-btn:hover {
    background: var(--accent-color);
    border-color: var(--accent-color);
    transform: scale(1.1);
}

.play-btn {
    width: 55px;
    height: 55px;
    font-size: 1.5rem;
    background: linear-gradient(135deg, var(--accent-color), var(--secondary-accent));
    border: none;
}

.play-btn:hover {
    transform: scale(1.15);
    box-shadow: 0 4px 15px rgba(195, 161, 96, 0.5);
}

.player-volume {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1rem;
    padding: 0.8rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

.volume-icon {
    font-size: 1.2rem;
}

.volume-slider {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.1);
    outline: none;
    -webkit-appearance: none;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--accent-color);
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.volume-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    background: var(--secondary-accent);
}

.volume-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--accent-color);
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.volume-value {
    font-size: 0.9rem;
    color: var(--accent-color);
    min-width: 40px;
    text-align: right;
}

.player-playlist {
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
}

.playlist-header {
    font-size: 0.95rem;
    color: var(--accent-color);
    margin-bottom: 0.8rem;
    font-weight: bold;
}

.playlist-items {
    max-height: 150px;
    overflow-y: auto;
}

.playlist-items::-webkit-scrollbar {
    width: 6px;
}

.playlist-items::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.playlist-items::-webkit-scrollbar-thumb {
    background: var(--accent-color);
    border-radius: 3px;
}

.playlist-item {
    padding: 0.8rem;
    margin-bottom: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.playlist-item:hover {
    background: rgba(255, 255, 255, 0.1);
    border-left-color: var(--accent-color);
    padding-left: 1rem;
}

.playlist-item.active {
    background: rgba(195, 161, 96, 0.2);
    border-left-color: var(--accent-color);
    color: var(--accent-color);
    font-weight: bold;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .player-panel {
        width: 300px;
        right: -10px;
    }
    
    .player-toggle {
        width: 50px;
        height: 50px;
    }
    
    .player-icon {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .player-panel {
        width: calc(100vw - 40px);
        right: 10px;
        left: 10px;
    }
}
