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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #f0f2f5 0%, #dfe3e8 100%);
    min-height: 100vh;
    color: #34495e;
}

body.dark-mode {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    color: #ffffff;
}

body.dark-mode .search-trigger,
body.dark-mode .search-box,
body.dark-mode .list-toggle,
body.dark-mode .search-modal-content,
body.dark-mode .search-input-wrapper,
body.dark-mode .station-item {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

body.dark-mode .search-trigger:hover,
body.dark-mode .list-toggle:hover,
body.dark-mode .station-item:hover {
    background: rgba(255, 255, 255, 0.15);
}

body.dark-mode .stations-list {
    background-color: #2a2a2a;
}

body.dark-mode .station-item {
    background-color: #1f1f1f;
    border-color: #333333;
    margin-bottom: 8px;
}

body.dark-mode .station-item:last-child {
    margin-bottom: 0;
}

body.dark-mode .station-item:hover {
    background-color: #2a2a2a;
}

body.dark-mode .station-name {
    color: #a0a0a0;
}

body.dark-mode .station-details {
    color: #808080;
}

body.dark-mode .album-name {
    color: #ffffff;
}

body.dark-mode .artist-name {
    color: #cccccc;
}

body.dark-mode .station-name-display {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

body.dark-mode .station-name-display h2 {
    color: #a0a0a0;
}

body.dark-mode .station-name-display p {
    color: #808080;
}

body.dark-mode .player-controls {
    background-color: transparent;
    border-color: #333333;
}

body.dark-mode .control-btn {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

body.dark-mode .control-btn:hover {
    background: rgba(255, 255, 255, 0.15);
}

body.dark-mode .volume-slider-container {
    background-color: #2d2d2d;
    border-color: #404040;
}

body.dark-mode .volume-slider-container input[type="range"] {
    background: rgba(255, 255, 255, 0.1);
}

body.dark-mode .volume-slider-container input[type="range"]::-webkit-slider-thumb {
    background: #ffffff;
}

body.dark-mode .volume-slider-container input[type="range"]::-webkit-slider-thumb:hover {
    background: #ffffff;
}

body.dark-mode .search-box {
    background-color: #2d2d2d;
    color: #b0b0b0;
    border-color: #404040;
}

body.dark-mode .search-box::placeholder {
    color: #808080;
}

body.dark-mode .list-toggle {
    background-color: #2d2d2d;
    border-color: #404040;
    color: #ffffff;
}

body.dark-mode .list-toggle:hover {
    background-color: #404040;
}

/* 暗色模式按钮样式 */
#darkmode-btn {
    transition: transform 0.3s ease;
}

#darkmode-btn:hover {
    transform: rotate(30deg);
}

.container {
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* 顶部搜索栏 */
.search-bar {
    padding: 20px;
    display: flex;
    justify-content: center;
    gap: 15px;
}

.search-trigger {
    width: 15%;
    min-width: 200px;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border: none;
    outline: none;
    pointer-events: auto;
    position: relative;
}

.search-trigger:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.search-trigger .material-icons {
    color: #34495e;
    font-size: 20px;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
}

.search-trigger span:not(.material-icons) {
    color: #34495e;
    font-weight: 400;
    text-align: center;
    padding-left: 25px;
}

/* 搜索框样式 */
.search-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    width: 100%;
    max-width: 600px;
    padding: 0 20px;
}

.search-box {
    width: 100%;
    padding: 12px 20px;
    border: none;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    font-size: 16px;
    color: #2c3e50;
    transition: all 0.3s ease;
}

.search-box:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.8);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* 列表按钮样式 */
.list-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 100;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.list-toggle:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.list-toggle .material-icons {
    color: #2c3e50;
    font-size: 28px;
}

/* 搜索弹窗 */
.search-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(5px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 100px;
    pointer-events: none;
}

.search-modal.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.search-modal-content {
    width: 90%;
    max-width: 600px;
    background: rgba(253, 253, 253, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 8px 32px rgba(204, 204, 208, 0.37);
    transform: translateY(0);
    transition: transform 0.3s ease;
}

.search-input-wrapper {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    padding: 10px 15px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    position: relative;
}

.search-input-wrapper .material-icons {
    color: #34495e;
    font-size: 20px;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
}

#search-input {
    flex: 1;
    background: none;
    border: none;
    color: #34495e;
    font-size: 16px;
    outline: none;
    font-weight: 400;
    text-align: center;
    padding-left: 25px;
}

#search-input::placeholder {
    color: #bdc3c7;
    font-weight: 300;
    text-align: center;
}

.search-results {
    max-height: 60vh;
    overflow-y: auto;
}

.search-result-item {
    padding: 15px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #2c3e50;
}

.search-result-item:hover {
    background: rgba(236, 240, 241, 0.8);
}

.search-result-item h3 {
    margin-bottom: 5px;
    font-size: 18px;
    color: #2c3e50;
}

.search-result-item p {
    color: #7f8c8d;
    font-size: 14px;
}

/* 电台列表侧边栏 */
.stations-sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100vh;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: -4px 0 16px rgba(0, 0, 0, 0.1);
    transition: right 0.3s ease;
    z-index: 1000;
    padding: 20px;
    overflow-y: auto;
    pointer-events: none;
}

.stations-sidebar.active {
    right: 0;
    pointer-events: auto;
}

.stations-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 10px 0;
}

.station-item {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 10px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.station-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.station-info h3 {
    margin-bottom: 8px;
    color: #a0a0a0;
    font-size: 16px;
}

.station-info p {
    color: #808080;
    font-size: 14px;
}

.station-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.station-tag {
    padding: 4px 8px;
    background: rgba(236, 240, 241, 0.8);
    border-radius: 4px;
    font-size: 12px;
    color: #7f8c8d;
}

/* 电台名称显示区域 */
.station-name-display {
    position: fixed;
    left: 20px;
    top: 20px;
    transform: none;
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    padding: 10px 15px;  /* 减小内边距 */
    border-radius: 8px;  /* 减小圆角 */
    z-index: 100;
    max-width: 40%;  /* 减小最大宽度 */
    transition: all 0.3s ease;
}

.station-name-display h2 {
    font-size: clamp(14px, 2.5vw, 18px);  /* 减小字体大小 */
    margin-bottom: 4px;  /* 减小底部边距 */
    color: rgba(52, 73, 94, 0.8);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.station-name-display p {
    color: rgba(149, 165, 166, 0.8);
    font-size: clamp(11px, 2vw, 13px);  /* 减小字体大小 */
    font-weight: 400;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 响应式设计 */
@media (max-width: 640px) {
    .station-name-display {
        left: 10px;
        top: 10px;
        padding: 10px 15px;
        max-width: 60%;
    }

    .list-toggle {
        top: 15px;
        right: 15px;
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 480px) {
    .station-name-display {
        position: fixed;
        left: 50%;
        top: 85px;  /* 调整到更下方 */
        transform: translateX(-50%);
        padding: 8px 15px;
        border-radius: 8px;
        max-width: 90%;
        text-align: center;
    }

    .station-name-display h2 {
        font-size: 14px;
        margin-bottom: 0;
    }

    .station-name-display p {
        display: none;
    }

    .list-toggle {
        top: 10px;
        right: 10px;
        width: 38px;
        height: 38px;
    }
}

/* 横屏模式 */
@media (orientation: landscape) and (max-height: 500px) {
    .station-name-display {
        top: 10px;
        left: 20px;
        transform: none;
        padding: 8px 15px;
        max-width: 40%;
        text-align: left;
    }
    
    .station-name-display h2 {
        font-size: 14px;
        margin-bottom: 2px;
    }
    
    .station-name-display p {
        display: block;
        font-size: 11px;
    }
}

/* 超小屏幕适配 */
@media (max-width: 360px) {
    .station-name-display {
        top: 80px;  /* 调整到更下方 */
        padding: 6px 12px;
        max-width: 85%;
    }
    
    .station-name-display h2 {
        font-size: 13px;
    }
}

/* 底部播放控制区 */
.player-controls {
    margin-top: 30px;
    padding: 20px;
    background: transparent;
}

.controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.control-btn {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.control-btn:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.control-btn .material-icons {
    color: #34495e;
    font-size: 24px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0;
}

.volume-control {
    position: relative;
    display: flex;
    align-items: center;
}

.volume-slider-container {
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.95);
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: none;
    margin-left: 10px;
}

.volume-control:hover .volume-slider-container {
    display: block;
}

.volume-slider-container input[type="range"] {
    width: 100px;
    height: 4px;
    -webkit-appearance: none;
    background: rgba(236, 240, 241, 0.8);
    border-radius: 2px;
    outline: none;
}

.volume-slider-container input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    background: #95a5a6;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.volume-slider-container input[type="range"]::-webkit-slider-thumb:hover {
    background: #34495e;
    transform: scale(1.1);
}

/* 自定义滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(236, 240, 241, 0.8);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: rgba(149, 165, 166, 0.5);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(149, 165, 166, 0.8);
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .player {
        padding: 20px;
    }
    
    .now-playing {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    
    .stations-list {
        grid-template-columns: 1fr;
    }
}

.error-message {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(231, 76, 60, 0.9);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 3000;
    animation: fadeInOut 3s ease;
}

@keyframes fadeInOut {
    0% { opacity: 0; transform: translate(-50%, -20px); }
    10% { opacity: 1; transform: translate(-50%, 0); }
    90% { opacity: 1; transform: translate(-50%, 0); }
    100% { opacity: 0; transform: translate(-50%, -20px); }
}

/* 专辑容器 */
.album-container {
    width: 100%;
    max-width: 400px;
    margin: 60px auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

.album-image {
    width: 400px;  /* 固定宽度 */
    height: 300px;  /* 固定高度 */
    object-fit: cover;  /* 保持图片比例并填充容器 */
    border-radius: 10px;
    transition: transform 0.3s ease;
    transform: translateY(60px);  /* 向下移动 */
}

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

/* 信息容器 */
.info-container {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    text-align: center;
    background: transparent;
    border-radius: 15px;
    margin-top: 20px;
}

.album-name {
    font-size: 1.5em;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.artist-name {
    font-size: 1.2em;
    color: #7f8c8d;
    margin-bottom: 15px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.song-progress {
    width: 100%;
    height: 4px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.song-progress-bar {
    height: 100%;
    background: #3498db;
    width: 0;
    transition: width 0.3s ease;
}

/* 响应式设计 */
@media (max-width: 640px) {
    .search-container {
        top: 15px;
        padding: 0 15px;
    }

    .search-box {
        padding: 10px 15px;
        font-size: 14px;
    }

    .list-toggle {
        top: 15px;
        right: 15px;
        width: 40px;
        height: 40px;
    }

    .list-toggle .material-icons {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .search-container {
        top: 10px;
        padding: 0 10px;
    }

    .search-box {
        padding: 8px 12px;
        font-size: 13px;
    }

    .list-toggle {
        top: 10px;
        right: 10px;
        width: 38px;
        height: 38px;
    }

    .list-toggle .material-icons {
        font-size: 22px;
    }
}

@media (max-width: 450px) {
    .stations-sidebar {
        width: 60%;  /* 设置最大宽度为屏幕的60% */
        max-width: 60%;  /* 确保不会超过60% */
    }

    .volume-slider-container {
        position: absolute;
        bottom: -60px;
        left: 50%;
        transform: translateX(-50%);
        width: 100px;
        padding: 10px;
        background: rgba(255, 255, 255, 0.9);
        border-radius: 8px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        display: none;
        z-index: 1000;
    }

    .volume-control:hover .volume-slider-container {
        display: block;
    }

    .volume-slider-container input[type="range"] {
        width: 100%;
        height: 4px;
        -webkit-appearance: none;
        background: #ddd;
        border-radius: 2px;
        outline: none;
        transform: rotate(-90deg);
        margin: 40px 0;
    }
}

body.dark-mode .search-trigger .material-icons {
    color: #a0a0a0;
}

body.dark-mode .search-trigger span:not(.material-icons) {
    color: #a0a0a0;
}

body.dark-mode .list-toggle .material-icons {
    color: #a0a0a0;
}

body.dark-mode .control-btn .material-icons {
    color: #a0a0a0;
}

body.dark-mode .search-input-wrapper .material-icons {
    color: #a0a0a0;
}

body.dark-mode .stations-sidebar {
    background-color: #2a2a2a;
    border-color: #333333;
}

body.dark-mode .search-input-wrapper #search-input {
    color: #b0b0b0;
} 