/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    min-height: 100vh;
    color: #fff;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

/* 加载动画 */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 40, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.loader-inner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(173, 216, 230, 0.3);
    border-radius: 50%;
    border-top-color: #add8e6;
    animation: spin 1s linear infinite;
}

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

/* 背景 */
.background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #001a33 0%, #003366 50%, #001a4d 100%);
    z-index: -1;
}

.background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(0, 150, 255, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(138, 43, 226, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(0, 255, 255, 0.05) 0%, transparent 70%);
}

/* 返回按钮 */
.back-button {
    position: fixed;
    top: 20px;
    left: 20px;
    color: rgba(173, 216, 230, 0.9);
    text-decoration: none;
    font-size: 14px;
    padding: 10px 16px;
    border: 1px solid rgba(173, 216, 230, 0.4);
    border-radius: 20px;
    background: rgba(0, 0, 40, 0.5);
    transition: all 0.3s ease;
    z-index: 100;
}

.back-button:hover {
    background: rgba(0, 150, 255, 0.3);
    border-color: #00ffff;
    color: #00ffff;
}

/* 主容器 */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 60px 20px 100px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
}

.container.show {
    opacity: 1;
    transform: translateY(0);
}

/* 标题 */
.title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #00ffff, #add8e6, #8a2be2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 30px rgba(0, 255, 255, 0.3);
}

.subtitle {
    text-align: center;
    color: rgba(173, 216, 230, 0.8);
    font-size: 1rem;
    margin-bottom: 40px;
}

/* 转盘区域 */
.wheel-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 50px;
    padding: 30px;
    background: rgba(0, 0, 40, 0.4);
    border-radius: 20px;
    border: 1px solid rgba(0, 255, 255, 0.2);
}

.wheel-container {
    position: relative;
    width: 200px;
    height: 200px;
    margin-bottom: 25px;
}

.wheel {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: conic-gradient(
        from 0deg,
        rgba(0, 150, 255, 0.8) 0deg 60deg,
        rgba(138, 43, 226, 0.8) 60deg 120deg,
        rgba(0, 255, 255, 0.8) 120deg 180deg,
        rgba(0, 150, 255, 0.8) 180deg 240deg,
        rgba(138, 43, 226, 0.8) 240deg 300deg,
        rgba(0, 255, 255, 0.8) 300deg 360deg
    );
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 
        0 0 30px rgba(0, 255, 255, 0.3),
        inset 0 0 30px rgba(0, 0, 0, 0.3);
    transition: transform 3s cubic-bezier(0.17, 0.67, 0.12, 0.99);
    position: relative;
}

.wheel::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    bottom: 10px;
    border-radius: 50%;
    border: 2px dashed rgba(255, 255, 255, 0.3);
}

.wheel-inner {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(0, 0, 40, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(0, 255, 255, 0.5);
}

.wheel-text {
    font-size: 2rem;
    color: #00ffff;
}

.wheel-pointer {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 12px solid transparent;
    border-right: 12px solid transparent;
    border-top: 20px solid #00ffff;
    filter: drop-shadow(0 0 5px rgba(0, 255, 255, 0.8));
}

.spin-button {
    padding: 12px 40px;
    font-size: 1.1rem;
    color: #fff;
    background: linear-gradient(135deg, rgba(0, 150, 255, 0.8), rgba(138, 43, 226, 0.8));
    border: 2px solid rgba(0, 255, 255, 0.5);
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
}

.spin-button:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.5);
    border-color: #00ffff;
}

.spin-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.result-display {
    margin-top: 20px;
    padding: 15px 30px;
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
    background: rgba(0, 0, 40, 0.6);
    border-radius: 10px;
    border: 1px solid rgba(0, 255, 255, 0.3);
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.5s ease;
}

.result-display.show {
    opacity: 1;
    transform: translateY(0);
}

.result-display .highlight {
    color: #00ffff;
    font-weight: bold;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

/* 歌单区域 */
.playlist-section {
    padding: 30px;
    background: rgba(0, 0, 40, 0.3);
    border-radius: 20px;
    border: 1px solid rgba(0, 255, 255, 0.15);
}

.section-title {
    font-size: 1.5rem;
    text-align: center;
    margin-bottom: 25px;
    color: rgba(173, 216, 230, 0.9);
}

.song-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 10px;
}

.song-list::-webkit-scrollbar {
    width: 6px;
}

.song-list::-webkit-scrollbar-track {
    background: rgba(0, 0, 40, 0.3);
    border-radius: 3px;
}

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

.song-item {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    background: rgba(0, 0, 60, 0.4);
    border-radius: 8px;
    border: 1px solid rgba(0, 255, 255, 0.1);
    transition: all 0.3s ease;
    cursor: default;
}

.song-item:hover {
    background: rgba(0, 100, 150, 0.3);
    border-color: rgba(0, 255, 255, 0.3);
    transform: translateX(5px);
}

.song-item.highlighted {
    background: rgba(0, 255, 255, 0.2);
    border-color: #00ffff;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.3);
}

.song-number {
    font-size: 0.75rem;
    color: rgba(173, 216, 230, 0.6);
    margin-right: 10px;
    min-width: 24px;
}

.song-name {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
}

/* 搜索框 */
.search-box {
    position: relative;
    margin-bottom: 20px;
}

.search-input {
    width: 100%;
    padding: 12px 40px 12px 16px;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.9);
    background: rgba(0, 0, 60, 0.4);
    border: 1px solid rgba(0, 255, 255, 0.2);
    border-radius: 25px;
    outline: none;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.search-input::placeholder {
    color: rgba(173, 216, 230, 0.5);
}

.search-input:focus {
    background: rgba(0, 0, 80, 0.5);
    border-color: rgba(0, 255, 255, 0.5);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.15);
}

.search-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1rem;
    opacity: 0.6;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.search-input:focus + .search-icon {
    opacity: 1;
}

/* 无结果提示 */
.no-result {
    text-align: center;
    padding: 30px 20px;
    color: rgba(173, 216, 230, 0.6);
    font-size: 0.9rem;
}

/* 版权信息 */
.copyright {
    color: rgba(255, 255, 255, 0.7);
    font-size: 11px;
    text-align: center;
    padding: 20px 0;
    background: linear-gradient(to top, rgba(0, 0, 30, 0.9), rgba(0, 0, 30, 0.6));
    line-height: 1.6;
    margin-top: auto;
}

.copyright-icp a {
    color: rgba(173, 216, 230, 0.8);
    text-decoration: none;
}

.copyright-icp a:hover {
    color: #00ffff;
    text-decoration: underline;
}

/* 响应式 */
@media (max-width: 600px) {
    .title {
        font-size: 1.8rem;
    }
    
    .wheel-container {
        width: 160px;
        height: 160px;
    }
    
    .wheel-inner {
        width: 60px;
        height: 60px;
    }
    
    .song-list {
        grid-template-columns: 1fr;
        max-height: 300px;
    }
    
    .container {
        padding: 80px 15px 80px;
    }
    
    /* 手机端返回按钮改为相对定位，放在内容上方 */
    .back-button {
        position: absolute;
        top: 15px;
        left: 15px;
        font-size: 12px;
        padding: 8px 12px;
    }
}
