/* 基础布局 */
body {
    margin: 0;
    font-family: 'Segoe UI', Arial, sans-serif;
    background: #f5f6fa;
    color: #222;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-smooth: always;
    text-rendering: optimizeLegibility;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

/* 页面淡入类 */
body.page-fade-in {
    opacity: 1;
}

/* 页面淡出类 */
body.page-fade-out {
    opacity: 0;
}

header {
    background: #2d3e50;
    padding: 0;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 1rem;
    flex-wrap: wrap;
    gap: 1rem;
}

/* 实时信息展示样式 */
.real-time-info {
    display: flex;
    align-items: center;
    margin-left: auto;
    margin-right: 1rem;
    color: white;
    font-size: 14px;
}

.time-display {
    font-weight: 500;
}

/* 搜索框样式 */
.search-container {
    position: relative;
    margin-left: auto;
    margin-right: 1rem;
    display: flex;
    align-items: center;
}

#searchInput {
    padding: 8px 36px 8px 16px;
    border: none;
    border-radius: 20px;
    background: rgba(255,255,255,0.1);
    color: white;
    font-size: 14px;
    width: 200px;
    transition: all 0.3s ease;
}

#searchInput::placeholder {
    color: rgba(255,255,255,0.7);
}

#searchInput:focus {
    outline: none;
    background: rgba(255,255,255,0.2);
    width: 250px;
}

.search-btn {
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    padding: 0 12px;
    background: transparent;
    color: white;
    border: none;
    border-radius: 0 20px 20px 0;
    cursor: pointer;
    transition: background 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-btn:hover {
    background: rgba(255,255,255,0.2);
}

.search-results {
    position: absolute;
    top: 100%;
    right: 0;
    width: 300px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    margin-top: 5px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.search-results.active {
    display: block;
}

.search-result-item {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: background 0.3s;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background: #f8f9fa;
}

.search-result-title {
    font-weight: 500;
    color: #2d3e50;
    margin-bottom: 4px;
}

.search-result-description {
    font-size: 12px;
    color: #666;
}

.nav-item {
    color: #fff;
    text-decoration: none;
    margin: 0 2rem;
    font-size: 1.1rem;
    position: relative;
    transition: color 0.3s;
}

/* 导航悬停动画 */
.nav-item::after {
    content: '';
    display: block;
    width: 0;
    height: 2px;
    background: #00b894;
    transition: width 0.3s;
    position: absolute;
    left: 0;
    bottom: -5px;
}
.nav-item:hover {
    color: #00b894;
}
.nav-item:hover::after {
    width: 100%;
}

/* 动画定义 */
@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 底部 */
footer {
    text-align: center;
    padding: 2rem 0;
    background: #2d3e50;
    color: #fff;
    font-size: 0.95rem;
}

/* 轮播图样式 */
.carousel-section {
    margin: 0;
    max-width: 100%;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
}

.carousel-container {
    position: relative;
    width: 100%;
    height: 500px;
    overflow: hidden;
}

.carousel {
    position: relative;
    width: 100%;
    height: 100%;
}

.carousel-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.carousel-item.active {
    opacity: 1;
    visibility: visible;
    position: relative;
}

.carousel-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: -1;
}

.carousel-content {
    position: relative;
    z-index: 2;
    color: white;
    max-width: 800px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 2rem;
}

.carousel-content h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.carousel-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.carousel-btn {
    display: inline-block;
    padding: 1rem 2rem;
    background: rgba(255,255,255,0.2);
    color: white;
    text-decoration: none;
    border: 2px solid white;
    border-radius: 4px;
    font-size: 1.1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    width: fit-content;
}

.carousel-btn:hover {
    background: white;
    color: #2d3e50;
    transform: translateY(-2px);
}

.carousel-controls {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    padding: 0 2rem;
    z-index: 3;
}

.carousel-control {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    color: white;
    border: 2px solid white;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-control:hover {
    background: white;
    color: #2d3e50;
    transform: scale(1.1);
}

.carousel-indicators {
    position: absolute;
    bottom: 2rem;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 10px;
    z-index: 3;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.indicator.active {
    background: white;
    width: 30px;
    border-radius: 6px;
}

/* 板块通用样式 */
section {
    margin: 3rem auto;
    max-width: 1000px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    padding: 2.5rem 2rem;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
    position: relative;
    overflow: hidden;
}

/* 动画激活类 */
.section-visible {
    opacity: 1 !important;
    transform: translateY(0) !important;
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

/* 淡出动画 */
.section-hidden {
    opacity: 0 !important;
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

/* 从上方进入的元素（在视口中心上方的元素） */
.section-hidden.top {
    transform: translateY(-40px) !important;
}

/* 板块悬停效果 */
section:hover {
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
    transform: translateY(-5px);
    transition: all 0.3s ease;
}

/* 板块标题样式 */
section h2 {
    position: relative;
    display: inline-block;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
}

section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: #00b894;
    border-radius: 2px;
    transition: width 0.3s ease;
}

section:hover h2::after {
    width: 100px;
}

/* 平滑滚动 */
html {
    scroll-behavior: smooth;
}

/* 精选内容展示 */
.featured-section {
    background: #f8f9fa;
    padding: 4rem 2rem;
    margin: 0;
    border-radius: 0;
}

.featured-section .container {
    max-width: 1200px;
    margin: 0 auto;
}

.featured-section h2 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.5rem;
}

.featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.featured-item {
    background: white;
    border-radius: 10px;
    padding: 2.5rem 2rem;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.featured-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.15);
}

.featured-icon {
    width: 80px;
    height: 80px;
    background: #f8f9fa;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    transition: all 0.3s ease;
}

.featured-item:hover .featured-icon {
    transform: scale(1.1);
}

.featured-item h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #2d3e50;
}

.featured-item p {
    color: #666;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.featured-btn {
    display: inline-block;
    padding: 0.8rem 1.8rem;
    background: #2d3e50;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.featured-btn:hover {
    background: #00b894;
    transform: translateY(-2px);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .featured-section {
        padding: 3rem 1.5rem;
    }
    
    .featured-section h2 {
        font-size: 2rem;
        margin-bottom: 2rem;
    }
    
    .featured-grid {
        gap: 1.5rem;
    }
    
    .featured-item {
        padding: 2rem 1.5rem;
    }
}

@media (max-width: 480px) {
    .featured-section {
        padding: 2rem 1rem;
    }
    
    .featured-section h2 {
        font-size: 1.8rem;
    }
    
    .featured-icon {
        width: 60px;
        height: 60px;
    }
    
    .featured-icon svg {
        width: 32px;
        height: 32px;
    }
    
    .featured-item h3 {
        font-size: 1.3rem;
    }
    
    .featured-btn {
        padding: 0.6rem 1.4rem;
    }
}

/* 最新动态/公告板块 */
.news-section {
    background: white;
    padding: 4rem 2rem;
    margin: 0;
    border-radius: 0;
}

.news-section .container {
    max-width: 1200px;
    margin: 0 auto;
}

.news-section h2 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.5rem;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.news-item {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 2rem;
    display: flex;
    gap: 1.5rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}

.news-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.15);
}

.news-date {
    min-width: 80px;
    background: #00b894;
    color: white;
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    flex-shrink: 0;
}

.news-day {
    display: block;
    font-size: 1.5rem;
    font-weight: bold;
}

.news-month {
    display: block;
    font-size: 0.9rem;
    margin-top: 0.2rem;
}

.news-content h3 {
    font-size: 1.3rem;
    margin-bottom: 0.8rem;
    color: #2d3e50;
}

.news-content p {
    color: #666;
    line-height: 1.6;
    margin: 0;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .news-section {
        padding: 3rem 1.5rem;
    }
    
    .news-section h2 {
        font-size: 2rem;
        margin-bottom: 2rem;
    }
    
    .news-grid {
        gap: 1.5rem;
        grid-template-columns: 1fr;
    }
    
    .news-item {
        padding: 1.5rem;
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .news-section {
        padding: 2rem 1rem;
    }
    
    .news-section h2 {
        font-size: 1.8rem;
    }
    
    .news-date {
        min-width: 60px;
        padding: 0.8rem;
    }
    
    .news-day {
        font-size: 1.2rem;
    }
    
    .news-month {
        font-size: 0.8rem;
    }
    
    .news-content h3 {
        font-size: 1.1rem;
    }
    
    .news-content p {
        font-size: 0.9rem;
    }
}

/* 从下方进入的元素（在视口中心下方的元素） */
.section-hidden.bottom {
    transform: translateY(40px) !important;
}

/* 板块标题 */
section h2 {
    margin-top: 0;
    color: #00b894;
    font-size: 2rem;
    margin-bottom: 1rem;
}



/* 主体左右布局 */
.main-flex {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: center;
    max-width: 1200px;
    margin: 3rem auto;
    gap: 2rem;
}
.left {
    flex: 0 0 340px;
    display: flex;
    flex-direction: column; /* 垂直排列子元素 */
    justify-content: flex-start;
    align-items: flex-start;
}
.right {
    flex: 1 1 0;
    min-width: 0;
}

@media (max-width: 900px) {
    .main-flex {
        flex-direction: column;
        /* 移动端保持右侧优先 */
    }
    .right {
        order: 0; /* 移动端恢复默认顺序 */
        width: 100%; /* 移动端占满宽度 */
    }
    .left {
        order: 1; /* 播放器移至内容下方 */
        margin: 0 auto; /* 居中显示 */
    }
}

/* 响应式布局 */
@media (max-width: 900px) {
    section {
        padding: 2rem 1rem;
    }
    
    /* 导航栏移动端适配 */
    .navbar {
        flex-wrap: wrap;
        gap: 0.5rem;
        padding: 0.5rem 0;
    }
    
    .nav-item {
        margin: 0.5rem;
        padding: 0.5rem 1rem;
        font-size: 1rem;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 6px;
    }
    
    /* 音乐播放器和QQ群图片移动端适配 */
    #music-player-container {
        width: 100%;
        max-width: 400px;
    }
    
    #music-player {
        width: 100% !important;
        height: auto !important;
        min-height: 300px;
    }
    
    section img {
        width: 100% !important;
        height: auto !important;
        max-width: 400px;
    }
}

/* 禁止文本选择 */
.unselectable
{
    user-select: none;
    -webkit-user-select: none; /* Safari/Chrome */
    -moz-user-select: none;    /* Firefox */
    -ms-user-select: none;     /* IE10+ */
}
/* 网站标题样式 */
.site-title {
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
    font-size: 18px;
    font-weight: bold;
}

.site-title h1 {
    margin: 0;
    font-size: 24px;
    color: white;
}

.site-title span {
    font-size: 14px;
    opacity: 0.9;
}
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}
.user-type {
    background: #28a745;
    color: white;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    margin-left: 8px;
    display: inline-block;
    vertical-align: middle;
    line-height: 1.4;
    white-space: nowrap;
}

/* 自定义歌单样式 */
#custom-playlist {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    padding: 20px;
    margin-top: 20px;
    width: 100%;
    box-sizing: border-box;
}

#custom-playlist h3 {
    margin-top: 0;
    margin-bottom: 16px;
    color: #2d3e50;
    font-size: 1.2rem;
    font-weight: 600;
}

#custom-playlist h4 {
    margin-top: 20px;
    margin-bottom: 12px;
    color: #555;
    font-size: 1rem;
    font-weight: 500;
}

#playlist-history {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

#history-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 6px;
    font-size: 14px;
}

.history-item span {
    color: #495057;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.history-btn {
    padding: 4px 10px;
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: background 0.3s;
}

.history-btn:hover {
    background: #5a6268;
}

#history-list p {
    color: #6c757d;
    font-size: 14px;
    text-align: center;
    padding: 10px;
}

#playlist-input {
    width: 100%;
    max-width: 280px;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    margin-right: 12px;
    transition: border-color 0.3s, box-shadow 0.3s;
    box-sizing: border-box;
}

#playlist-input:focus {
    outline: none;
    border-color: #00b894;
    box-shadow: 0 0 0 2px rgba(0,184,148,0.1);
}

#save-apply-playlist, #reset-playlist {
    padding: 10px 16px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    margin-right: 8px;
}

#save-apply-playlist {
    background: #00b894;
    color: white;
}

#save-apply-playlist:hover {
    background: #019875;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,184,148,0.2);
}

#reset-playlist {
    background: #6c757d;
    color: white;
}

#reset-playlist:hover {
    background: #5a6268;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(108,117,125,0.2);
}

#playlist-message {
    margin-top: 12px;
    color: #666;
    font-size: 13px;
    line-height: 1.4;
    min-height: 20px;
}

/* 设置下拉菜单样式 */
.settings-dropdown {
    position: relative;
    display: inline-block;
}

.settings-btn {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
}

.settings-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.settings-dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 180px;
    z-index: 1000;
    overflow: hidden;
}

.settings-dropdown-content a {
    color: #333;
    padding: 10px 16px;
    text-decoration: none;
    display: block;
    transition: background 0.3s;
}

.settings-dropdown-content a:hover {
    background: #f5f6fa;
}

.settings-theme {
    padding: 10px 16px;
}

.settings-theme a {
    padding: 4px 8px;
    margin: 0 4px 4px 0;
    border-radius: 4px;
    display: inline-block;
}

.settings-language {
    padding: 10px 16px;
    border-top: 1px solid #eee;
    margin-top: 4px;
}

.settings-language a {
    padding: 4px 8px;
    margin: 0 4px 0 0;
    border-radius: 4px;
    display: inline-block;
}

/* 深色模式样式 */
.dark-mode {
    background-color: #1a1a1a;
    color: #f5f5f5;
}

.dark-mode header {
    background-color: #2d3e50;
}

.dark-mode footer {
    background-color: #2d3e50;
    color: #f5f5f5;
}

.dark-mode section {
    background-color: #2c2c2c;
    color: #f5f5f5;
}

.dark-mode #custom-playlist {
    background-color: #2c2c2c;
    color: #f5f5f5;
}

.dark-mode #custom-playlist h3 {
    color: #00b894;
}

.dark-mode #custom-playlist h4 {
    color: #b0b0b0;
}

.dark-mode #playlist-history {
    border-top-color: #444;
}

.dark-mode .history-item {
    background: #444;
}

.dark-mode .history-item span {
    color: #f5f5f5;
}

.dark-mode #history-list p {
    color: #999;
}

.dark-mode #playlist-input {
    background-color: #444;
    border-color: #666;
    color: #f5f5f5;
}

.dark-mode .settings-dropdown-content {
    background-color: #2c2c2c;
    color: #f5f5f5;
}

.dark-mode .settings-dropdown-content a {
    color: #f5f5f5;
}

.dark-mode .settings-dropdown-content a:hover {
    background-color: #444;
}

.dark-mode .settings-language {
    border-top-color: #444;
}

/* 浅色主题样式 */
.light-mode {
    background-color: #f5f6fa;
    color: #222;
}

.light-mode header {
    background-color: #2d3e50;
}

.light-mode footer {
    background-color: #2d3e50;
    color: #fff;
}

.light-mode section {
    background-color: #fff;
    color: #222;
}

.light-mode #custom-playlist {
    background-color: #fff;
    color: #222;
}

.light-mode #custom-playlist h3 {
    color: #2d3e50;
}

.light-mode #custom-playlist h4 {
    color: #555;
}

.light-mode #playlist-history {
    border-top-color: #eee;
}

.light-mode .history-item {
    background: #f8f9fa;
}

.light-mode .history-item span {
    color: #495057;
}

.light-mode #history-list p {
    color: #6c757d;
}

.light-mode #playlist-input {
    background-color: #fff;
    border-color: #ddd;
    color: #222;
}

.light-mode .settings-dropdown-content {
    background-color: #fff;
    color: #333;
}

.light-mode .settings-dropdown-content a {
    color: #333;
}

.light-mode .settings-dropdown-content a:hover {
    background-color: #f5f6fa;
}

.light-mode .settings-language {
    border-top-color: #eee;
}

/* 蓝色主题样式 */
.blue-mode {
    background-color: #e3f2fd;
    color: #1a237e;
}

.blue-mode header {
    background-color: #1976d2;
}

.blue-mode footer {
    background-color: #1976d2;
    color: #fff;
}

.blue-mode section {
    background-color: #fff;
    color: #1a237e;
}

.blue-mode section h2 {
    color: #1976d2;
}

.blue-mode #custom-playlist {
    background-color: #fff;
    color: #1a237e;
}

.blue-mode #custom-playlist h3 {
    color: #1565c0;
}

.blue-mode #custom-playlist h4 {
    color: #1976d2;
}

.blue-mode #playlist-history {
    border-top-color: #bbdefb;
}

.blue-mode .history-item {
    background: #e3f2fd;
}

.blue-mode .history-item span {
    color: #1a237e;
}

.blue-mode #history-list p {
    color: #1976d2;
}

.blue-mode #playlist-input {
    background-color: #fff;
    border-color: #bbdefb;
    color: #1a237e;
}

.blue-mode #playlist-input:focus {
    border-color: #1976d2;
    box-shadow: 0 0 0 2px rgba(25,118,210,0.1);
}

.blue-mode .settings-dropdown-content {
    background-color: #fff;
    color: #1a237e;
}

.blue-mode .settings-dropdown-content a {
    color: #1a237e;
}

.blue-mode .settings-dropdown-content a:hover {
    background-color: #e3f2fd;
}

.blue-mode .settings-language {
    border-top-color: #bbdefb;
}

/* 绿色主题样式 */
.green-mode {
    background-color: #e8f5e8;
    color: #2e7d32;
}

.green-mode header {
    background-color: #388e3c;
}

.green-mode footer {
    background-color: #388e3c;
    color: #fff;
}

.green-mode section {
    background-color: #fff;
    color: #2e7d32;
}

.green-mode section h2 {
    color: #388e3c;
}

.green-mode #custom-playlist {
    background-color: #fff;
    color: #2e7d32;
}

.green-mode #custom-playlist h3 {
    color: #2e7d32;
}

.green-mode #custom-playlist h4 {
    color: #388e3c;
}

.green-mode #playlist-history {
    border-top-color: #c8e6c9;
}

.green-mode .history-item {
    background: #e8f5e8;
}

.green-mode .history-item span {
    color: #2e7d32;
}

.green-mode #history-list p {
    color: #388e3c;
}

.green-mode #playlist-input {
    background-color: #fff;
    border-color: #c8e6c9;
    color: #2e7d32;
}

.green-mode #playlist-input:focus {
    border-color: #388e3c;
    box-shadow: 0 0 0 2px rgba(56,142,60,0.1);
}

.green-mode .settings-dropdown-content {
    background-color: #fff;
    color: #2e7d32;
}

.green-mode .settings-dropdown-content a {
    color: #2e7d32;
}

.green-mode .settings-dropdown-content a:hover {
    background-color: #e8f5e8;
}

.green-mode .settings-language {
    border-top-color: #c8e6c9;
}

/* 页面加载动画 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.dark-mode .loading-overlay {
    background: #1a1a1a;
}

.light-mode .loading-overlay {
    background: #f5f6fa;
}

.blue-mode .loading-overlay {
    background: #e3f2fd;
}

.green-mode .loading-overlay {
    background: #e8f5e8;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-left-color: #4a6fa5;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.dark-mode .loading-spinner {
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-left-color: #00b894;
}

.blue-mode .loading-spinner {
    border-left-color: #1976d2;
}

.green-mode .loading-spinner {
    border-left-color: #388e3c;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-overlay.hidden {
    opacity: 0;
    visibility: hidden;
}

/* 轮播图响应式设计 */
@media (max-width: 768px) {
    .carousel-container {
        height: 400px;
    }
    
    .carousel-content h2 {
        font-size: 2.2rem;
    }
    
    .carousel-content p {
        font-size: 1rem;
    }
    
    .carousel-btn {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }
    
    .carousel-controls {
        padding: 0 1rem;
    }
    
    .carousel-control {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .carousel-container {
        height: 300px;
    }
    
    .carousel-content {
        padding: 0 1rem;
    }
    
    .carousel-content h2 {
        font-size: 1.8rem;
    }
    
    .carousel-content p {
        font-size: 0.9rem;
        margin-bottom: 1.5rem;
    }
    
    .carousel-btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }
    
    .carousel-indicators {
        bottom: 1rem;
    }
}

/* 响应式调整 */
@media (max-width: 900px), (orientation: portrait) {
    /* 实时信息显示在移动端的适配 */
    .real-time-info {
        order: 2;
        margin: 0.5rem auto;
        width: calc(100% - 1rem);
        justify-content: center;
        font-size: 12px;
        gap: 1rem;
    }
    
    .time-display {
        font-size: 12px;
    }
    
    /* 搜索框在移动端的适配 */
    .search-container {
        order: 3;
        margin: 0.5rem auto;
        width: calc(100% - 1rem);
    }
    
    #searchInput {
        width: 100%;
        max-width: none;
    }
    
    /* 导航项在移动端和竖屏设备的适配 */
    .navbar {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
        gap: 0.5rem;
    }
    
    .nav-item {
        margin: 0;
        padding: 0.8rem 1rem;
        text-align: center;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 6px;
        flex: 1 1 auto;
        min-width: 100px;
        max-width: calc(50% - 0.75rem);
    }
    
    /* 设置按钮在移动端和竖屏设备的适配 */
    .settings-dropdown {
        order: 1;
        margin: 0.5rem auto 0;
        width: calc(100% - 1rem);
        text-align: center;
    }
}

@media (max-width: 480px), (orientation: portrait) and (max-height: 600px) {
    /* 导航栏适配 */
    .navbar {
        gap: 0.25rem;
        padding: 0.25rem 0.5rem;
    }
    
    .nav-item {
        padding: 0.4rem 0.8rem;
        font-size: 0.9rem;
        max-width: calc(50% - 0.375rem);
        min-width: 80px;
    }
    
    /* 优化小高度竖屏设备上的设置按钮 */
    .settings-btn {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    /* 优化小高度竖屏设备上的设置按钮 */
    @media (orientation: portrait) and (max-height: 600px) {
        .settings-btn {
            padding: 6px 12px;
            font-size: 12px;
        }
    }
    
    /* 自定义歌单样式适配 */
    #playlist-input {
        max-width: 100%;
        margin-right: 0;
        margin-bottom: 10px;
    }
    
    #save-apply-playlist, #reset-playlist {
        width: calc(50% - 6px);
        margin-right: 6px;
        margin-bottom: 6px;
        font-size: 14px;
        padding: 8px 12px;
    }
    
    #reset-playlist {
        margin-right: 0;
    }
    
    /* 歌单历史记录适配 */
    #playlist-history {
        margin-top: 15px;
        padding-top: 12px;
    }
    
    #custom-playlist h4 {
        font-size: 0.9rem;
        margin-bottom: 10px;
    }
    
    .history-item {
        padding: 6px 10px;
        font-size: 13px;
    }
    
    .history-btn {
        padding: 3px 8px;
        font-size: 11px;
    }
    
    /* 音乐播放器适配 */
    #music-player-container {
        max-width: 100%;
    }
    
    #music-player {
        min-height: 250px;
    }
    
    /* 游戏页面适配 */
    .game-board {
        gap: 8px;
    }
    
    .game-info {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .score-container {
        justify-content: center;
    }
    
    .game-controls {
        justify-content: center;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .difficulty-selector {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }
    
    /* 工具页面适配 */
    .tool-container {
        padding: 1rem;
    }
    
    .tool-header h2 {
        font-size: 1.5rem;
    }
    
    .tool-content {
        margin-top: 1.5rem;
    }
    
    .tool-section {
        margin-bottom: 1.5rem;
    }
    
    .form-group {
        margin-bottom: 1rem;
    }
    
    .form-group label {
        display: block;
        margin-bottom: 0.5rem;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        width: 100%;
        padding: 0.8rem;
        font-size: 1rem;
    }
    
    .btn {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }
    
    /* 响应式调整工具按钮 */
    .btn-group {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .btn-group .btn {
        width: 100%;
    }

    .badge {
        position: relative;
        display: inline-block;
    }
    
    .badge-count {
        position: absolute;
        top: -8px;
        right: -8px;
        background: #ff4444;
        color: white;
        border-radius: 50%;
        width: 18px;
        height: 18px;
        font-size: 12px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: bold;
        box-shadow: 0 0 0 2px white;
    }
    
    .badge-count.hidden {
        display: none;
    }

}

/* 实用工具快捷入口样式 */
.tools-shortcuts {
    background: white;
    padding: 4rem 2rem;
    margin: 0;
    border-radius: 0;
}

.tools-shortcuts .container {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.tools-shortcuts h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.tools-shortcuts p {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 3rem;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.tool-card {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 2.5rem 2rem;
    text-decoration: none;
    color: #2d3e50;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    position: relative;
    overflow: hidden;
}

.tool-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.15);
    background: white;
}

.tool-icon {
    width: 80px;
    height: 80px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.tool-card:hover .tool-icon {
    transform: scale(1.1);
}

.tool-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.8rem;
    color: #2d3e50;
}

.tool-card p {
    font-size: 1rem;
    color: #666;
    margin: 0;
    line-height: 1.6;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .tools-shortcuts {
        padding: 3rem 1.5rem;
    }
    
    .tools-shortcuts h2 {
        font-size: 2rem;
        margin-bottom: 0.8rem;
    }
    
    .tools-shortcuts p {
        font-size: 1rem;
        margin-bottom: 2rem;
    }
    
    .tools-grid {
        gap: 1.5rem;
    }
    
    .tool-card {
        padding: 2rem 1.5rem;
    }
}

@media (max-width: 480px) {
    .tools-shortcuts {
        padding: 2rem 1rem;
    }
    
    .tools-shortcuts h2 {
        font-size: 1.8rem;
    }
    
    .tool-icon {
        width: 60px;
        height: 60px;
    }
    
    .tool-icon svg {
        width: 32px;
        height: 32px;
    }
    
    .tool-card h3 {
        font-size: 1.3rem;
    }
    
    .tool-card p {
        font-size: 0.9rem;
    }
}


