/* 基础样式 */
body {
    margin: 0;
    padding: 0;
    background-color: #f5f5f7;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 头部导航 */
header {
    background-color: white;
    padding: 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--bg-secondary);
    min-width: 120px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    border-radius: 4px;
    padding: 8px 0;
}

.dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-menu li {
    padding: 8px 16px;
    margin-left: 0px;
}

.dropdown-menu li:hover {
    background-color: var(--bg-primary);
}

.dropdown-menu a {
    color: var(--text-primary);
    text-decoration: none;
    display: block;
}


.header-content {
    max-width: 1280px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* 主容器 */
.container {
    max-width: 1280px;
    margin: 80px auto 10px;
    padding: 0 2rem;
    width: 100%;
    box-sizing: border-box;
}

/* 三栏布局 */
.main-content {
    display: grid;
    grid-template-columns: 320px minmax(400px, 1fr) 280px;
    gap: 1.3rem;
    margin-top: 2rem;
}

/* 左侧面板 */
.left-panel {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    height: fit-content;
}

/* Tabs 样式 */
.tabs {
    display: flex;
    padding: 0.75rem;
    border-bottom: 1px solid #eee;
    background: var(--bg-secondary);
    border-radius: 8px 8px 0 0;
    gap: 0.5rem;
}

.tab {
    flex: 1;
    padding: 0.5rem 0.25rem;
    cursor: pointer;
    border-radius: 4px;
    font-size: 0.9rem;
    text-align: center;
    white-space: nowrap;
    transition: all 0.3s ease;
    color: var(--input-text);
}

.tab:hover {
    background-color: #f5f5f7;
}

.tab.active {
    background-color: #4a4af4;
    color: white;
}

/* 创作区域 */
.music-creator {
    padding: 1rem;
}

/* 中间面板 */
.center-panel {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    height: fit-content;
}

/* 右侧面板 */
.right-panel {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    height: fit-content;
}

/* 歌词区域 */
.lyrics-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #eee;
}

.lyrics-container {
    min-height: 615px;
    padding: 1.5rem;
    overflow-y: auto;
}

.lyrics-empty {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 0.9rem;
}

/* 音乐播放器 */


.music-player.active {
    transform: translateY(0);
}


.player-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;


    padding: 1rem 2rem;
    gap: 1rem;
}

/* 播放器左侧：当前播放歌曲信息 */
.now-playing {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 200px;
}

.now-playing-cover {
    width: 48px;
    height: 48px;
    border-radius: 4px;
    overflow: hidden;
}

.now-playing-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.now-playing-info {
    display: flex;
    flex-direction: column;
}

.now-playing-title {
    font-weight: 500;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
    color:var(--text-primary);
}

.now-playing-artist {
    font-size: 0.8rem;
    color: var(--text-secondary);
    word-break: break-all;
    max-width: 600px;
}

/* 响应式布局 */
@media (max-width: 1280px) {
    .container {
        padding: 0 1rem;
    }
    
    .main-content {
        grid-template-columns: 300px minmax(350px, 1fr) 280px;
        gap: 1rem;
    }

    .tab {
        font-size: 0.85rem;
        padding: 0.5rem 0.2rem;
    }
}

@media (max-width: 1024px) {
    .main-content {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .left-panel, .center-panel, .right-panel {
        max-width: 100%;
    }

    .lyrics-container {
        max-height: 400px;
    }
}

/* 美化滚动条样式 */
.music-creator::-webkit-scrollbar,
.song-list::-webkit-scrollbar,
.lyrics-container::-webkit-scrollbar {
    width: 4px; /* 减小滚动条宽度 */
}

/* 滚动条轨道 */
.music-creator::-webkit-scrollbar-track,
.song-list::-webkit-scrollbar-track,
.lyrics-container::-webkit-scrollbar-track {
    background: transparent; /* 透明背景 */
    margin: 4px 0; /* 添加上下边距 */
}

/* 滚动条滑块 */
.music-creator::-webkit-scrollbar-thumb,
.song-list::-webkit-scrollbar-thumb,
.lyrics-container::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1); /* 半透明背景 */
    border-radius: 4px;
    transition: background 0.3s ease;
}

/* 滚动条滑块悬停效果 */
.music-creator::-webkit-scrollbar-thumb:hover,
.song-list::-webkit-scrollbar-thumb:hover,
.lyrics-container::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.2); /* 悬停时加深颜色 */
}

/* 滚动条滑块激活效果 */
.music-creator::-webkit-scrollbar-thumb:active,
.song-list::-webkit-scrollbar-thumb:active,
.lyrics-container::-webkit-scrollbar-thumb:active {
    background: rgba(0, 0, 0, 0.3); /* 点击时更深的颜色 */
}

/* 优化面板内容区域的内边距，为滚动条留出空间 */
.song-list {
    padding: 1rem 1rem 1rem 1.5rem; /* 右侧留出滚动条空间 */
}

/* 当鼠标悬停在可滚动区域时才显示滚动条 */
.music-creator,
.song-list,
.lyrics-container,.left-form {
    scrollbar-width: thin; /* Firefox */
    scrollbar-color: rgba(0, 0, 0, 0.1) transparent; /* Firefox */
}

/* 可选：添加滚动时的平滑效果 */
.music-creator,
.song-list,
.lyrics-container,.left-form {
    scroll-behavior: smooth;
}

/* 优化歌曲列表项的间距和样式 */
.song-item {
    display: grid;
    grid-template-columns: 80px 1fr auto;
    align-items: center;
    padding: 0.75rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 0.5rem;
    background: transparent;
}

/* .song-item:hover {
    background-color: rgba(0, 0, 0, 0.02);
    transform: translateX(2px);
} */

.song-item.playing {
    background-color: rgba(74, 74, 244, 0.05);
    border-left: 3px solid #4a4af4;
    padding-left: calc(0.75rem - 3px);
}

/* 优化歌曲封面阴影效果 */
.song-cover {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.song-item:hover .song-cover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* 优化文字样式 */
.song-title {
    font-weight: 500;
    margin-bottom: 0.25rem;
    color: #333;
    transition: color 0.2s ease;
}

.song-artist {
    font-size: 0.85rem;
    color: #666;
    transition: color 0.2s ease;
}

.song-item:hover .song-title {
    color: #4a4af4;
}

/* 添加播放指示器动画 */
.song-item.playing .song-title {
    color: #4a4af4;
}

.song-duration {
    position: absolute;
    bottom: 4px;
    right: 4px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 2px 4px;
    border-radius: 2px;
    font-size: 0.7rem;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.song-item:hover .song-duration {
    opacity: 1;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f5f5f7;
    color: #333;
}

.logo {
    font-weight: bold;
    font-size: 1.5rem;
    color: #4a4af4;
    text-decoration: none;
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 2rem;
}

nav ul li a {
    text-decoration: none;
    color: #333;
}

.tabs {
    position: sticky;
    top: 0;
    background: white;
    z-index: 10;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #eee;
}

.tab {
    padding: 1rem;
    cursor: pointer;
    transition: all 0.3s;
}

.tab.active {
    background-color: #4a4af4;
    color: white;
}

.music-creator {
    padding: 1.5rem;
}

textarea, input {
    width: 100%;
    padding: 1rem;
    margin-bottom: 1rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    resize: vertical;
}

textarea {
    min-height: 150px;
}

.char-count {
    text-align: right;
    color: #777;
    margin-top: -0.5rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.random-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.random-button {
    background: #f0f0f0;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.random-button:hover {
    background: #e0e0e0;
}

.create-button {
    background: #4a4af4;
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s;
    display: block;
    margin: 1rem 0;
    width: 100%;
}

.create-button:hover {
    background: #3a3ade;
}

.examples {
    margin-top: 3rem;
}

.examples h2 {
    margin-bottom: 1.5rem;
    color: #333;
}

.example-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.example-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s;
}

.example-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.example-img {
    height: 150px;
    background-color: #eaeaea;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #777;
}

.example-info {
    padding: 1rem;
}

.example-title {
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.example-creator {
    font-size: 0.9rem;
    color: #777;
}

.features {
    margin-top: 3rem;
}

.feature {
    margin-bottom: 2rem;
}

.feature h3 {
    margin-bottom: 1rem;
    color: #333;
}

.faq {
    margin-top: 3rem;
}

.faq-item {
    margin-bottom: 1.5rem;
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.faq-question {
    font-weight: bold;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
}

.faq-question:before {
    content: "?";
    display: inline-block;
    width: 24px;
    height: 24px;
    background: #4a4af4;
    color: white;
    border-radius: 50%;
    text-align: center;
    line-height: 24px;
    margin-right: 0.5rem;
}

footer {
    background: var(--header-bg);
    padding: 2rem;
    text-align: center;
    margin-top: 3rem;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

/* 响应式导航栏 */
.menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 1001;
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    nav {
        display: none; /* 默认隐藏导航菜单 */
        position: fixed;
        top: 60px; /* header 高度 */
        left: 0;
        right: 0;
        background: var(--bg-primary);
        padding: 1rem;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        z-index: 1000;
    }

    nav.show {
        display: block; /* 显示导航菜单 */
    }

    nav ul {
        flex-direction: column;
        width: 100%;
    }

    nav ul li {
        margin: 0;
        width: 100%;
    }

    nav ul li a {
        display: block;
        padding: 1rem;
        text-align: center;
        border-radius: 4px;
    }

    nav ul li a:hover {
        background-color: #f5f5f7;
    }
}

/* 音乐播放器样式 */
.music-player {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    padding: 1rem;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.player-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    max-width: 500px;
    margin: 0 20px;
}

.play-button {
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.play-button:hover {
    background: var(--bg-secondary);
}

.progress-container {
    flex-grow: 1;
    background: var(--text-primary);
    height: 4px;
    border-radius: 2px;
    cursor: pointer;
    position: relative;
}

.progress-bar {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background: var(--accent-color);
    border-radius: 2px;
    width: 0;
}

.time-info {
    font-size: 0.8rem;
    color: var(--text-secondary);
    min-width: 100px;
    text-align: right;
}
.player-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.volume-button {
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.volume-button:hover {
    background: var(--bg-secondary);
}
/* 歌曲列表样式 */
.song-list {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    max-height: 992px;
}

.song-item {
    display: grid;
    grid-template-columns: 60px 1fr auto;
    align-items: center;
    padding: 0.75rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 0.75rem;
}

/* .song-item:hover {
    background-color: #f5f5f7;
} */

/* .song-item.playing {
    background-color: #e8e8ff;
} */

.song-cover {
    width: 60px;
    height: 60px;
    border-radius: 6px;
    overflow: hidden;
    position: relative;
}

.song-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.song-info {
    padding: 0 1rem;
}

.song-title {
    font-weight: 500;
    margin-bottom: 0.25rem;
    color: #333;
}

.song-artist {
    font-size: 0.85rem;
    color: #666;
}



.play-indicator {
    color: #4a4af4;
    display: none;
}

.song-item.playing .play-indicator {
    display: block;
}

/* 平板适配 */
@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        padding: 0 1rem;
    }

    .example-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 模式切换样式 */
.mode-content {
    display: none;
}

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

.lyrics-mode {
    padding: 1rem;
}

.lyrics-mode textarea {
    min-height: 160px;
    margin-bottom: 1rem;
}

.lyrics-mode .style-input {
    margin-bottom: 1rem;
}

.lyrics-mode .char-count {
    text-align: right;
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

/* index.html 特定样式 */
.song-item {
    background: var(--bg-secondary);
}

/* login.html 特定样式 */
.auth-container {
    background: var(--bg-secondary);
}

.form-group input {
    background: var(--input-bg);
    color: var(--input-text);
    border-color: var(--border-color);
}

/* member.html 特定样式 */
.pricing-card {
    background: var(--bg-secondary);
}

/* blog.html 特定样式 */
.blog-card {
    background: var(--bg-secondary);
}

/* 深色主题作为默认主题 */
:root {
    --bg-primary: #1a1a1a;
    --bg-secondary: #2d2d2d;
    --text-primary: #ffffff;
    --text-secondary: #cccccc;
    --accent-color: #6e6ef6;
    --border-color: #404040;
    --shadow-color: rgba(0, 0, 0, 0.3);
    --header-bg: #2d2d2d;
    --logo-color: #6e6ef6;
    --link-hover: #8484f8;
    --input-bg: #3d3d3d;
    --input-text: #ffffff;
    --card-bg: #2d2d2d;
    --primary-color:red;
    --primary-rgb:#4a4af4;
}

/* 浅色主题变量 */
[data-theme="light"] {
    --bg-primary: #f5f5f7;
    --bg-secondary: #ffffff;
    --text-primary: #333333;
    --text-secondary: #666666;
    --accent-color: #4a4af4;
    --border-color: #eeeeee;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --header-bg: #ffffff;
    --logo-color: #4a4af4;
    --link-hover: #3a3ade;
    --input-bg: #ffffff;
    --input-text: #333333;
    --card-bg: #ffffff;
    --primary-color:red;
    --primary-rgb:#4a4af4;
}

/* 应用主题颜色 */
body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
}

header {
    background-color: var(--header-bg);
}

.left-panel, .center-panel, .right-panel {
    background: var(--bg-secondary);
}

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

.song-title {
    color: var(--text-primary);
}

.song-artist {
    color: var(--text-secondary);
}

textarea, input {
    background-color: var(--input-bg);
    color: var(--text-primary);
    border-color: var(--border-color);
}

.music-player {
    background-color: var(--bg-secondary);
}

/* 主题切换按钮样式 */
.theme-toggle {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    margin-left: 1.5rem;
    background: transparent;
    border: none;
    color: var(--text-primary);
}

.theme-toggle i {
    font-size: 1.2rem;
}

.theme-toggle:hover {
    background-color: var(--bg-primary);
}
/* 其他元素的主题适配 */
nav ul li a {
    color: var(--text-primary);
}

nav ul li a:hover {
    color: var(--link-hover);
}
/* 语言切换按钮样式 */
.language-toggle {
    /*margin-left: 1rem;*/
}

.language-toggle select {
    padding: 0.5rem;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--text-primary);
    cursor: pointer;
    font-size: 0.9rem;
}

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

@media (max-width: 768px) {
    .language-toggle {
        margin: 1rem 0;
        width: 100%;
        text-align: center;
    }

    .language-toggle select {
        width: 100%;
        padding: 0.75rem;
    }
}

.nav_list {
    margin-top: 0.4rem;
}

.tabs {
    background-color: var(--bg-secondary);
}
.tab{
    color: var(--text-secondary);
}
.tab:hover{
    color: var(--input-bg);
}

.logo {
    color: var(--input-text);
}

/* 选择区域样式 */
.style-selections {
    margin-bottom: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}

.style-tabs {
    display: flex;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.style-tab {
    padding: 1rem 0.5rem;
    border: none;
    background: none;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.style-tab:hover {
    color: var(--text-primary);
}

.style-tab.active {
    color: var(--accent-color);
    border-bottom: 2px solid var(--accent-color);
}

.style-tab-contents {
    padding: 1rem 0.2rem;
    max-height: 158px;
    overflow-y: auto;
}

.tab-content {
    display: none;
    height: 100%;
}

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

.selection-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.option-btn {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

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

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

.selection-summary {
    padding: 0.5rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-align: right;
    position: sticky;
    bottom: 0;
    background: var(--bg-secondary);
    z-index: 1;
}

.selection-count {
    color: var(--accent-color);
    font-weight: bold;
}

.selection-count.warning {
    color: #ff9800;
}

/* 美化滚动条 */
.style-tab-contents::-webkit-scrollbar,#fullLyrics::-webkit-scrollbar {
    width: 4px;
}

.style-tab-contents::-webkit-scrollbar-track,#fullLyrics::-webkit-scrollbar-track {
    background: transparent;
    margin: 4px 0;
}

.style-tab-contents::-webkit-scrollbar-thumb,#fullLyrics::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
}

.style-tab-contents::-webkit-scrollbar-thumb:hover,#fullLyrics::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.2);
}

