* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
}

.header {
    text-align: center;
    margin-bottom: 30px;
}

h1 {
    color: white;
    margin-bottom: 10px;
    font-size: 32px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.subtitle {
    color: rgba(255,255,255,0.8);
    font-size: 16px;
}

/* 控制面板 */
.control-panel {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    text-align: center;
}

.random-btn {
    padding: 12px 30px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    margin-bottom: 20px;
    transition: all 0.3s;
    display: inline-block;
}

.random-btn:hover {
    background: #45a049;
    transform: scale(1.05);
}

/* 控制组 */
.control-group {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    align-items: center;
}

.mode-selector, .toggle-switch {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}

.mode-selector select {
    padding: 8px 15px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    background: white;
    cursor: pointer;
    min-width: 120px;
}

.mode-selector select:focus {
    border-color: #667eea;
    outline: none;
}

/* 切换开关 */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #4CAF50;
}

input:checked + .slider:before {
    transform: translateX(26px);
}

/* 状态文字 */
#overlapStatus, #modeStatus {
    font-size: 13px;
    padding: 4px 10px;
    border-radius: 15px;
    min-width: 50px;
    text-align: center;
}

.status-on {
    background: #4CAF50;
    color: white;
}

.status-off {
    background: #f44336;
    color: white;
}

/* 分类容器 */
.category-section {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

.category-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.category-title {
    font-size: 20px;
    font-weight: bold;
    color: #333;
    margin: 0;
}

.category-count {
    background: #667eea;
    color: white;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 14px;
    margin-left: 15px;
}

/* 按钮网格 - 已修改为自适应宽度 */
.category-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

/* 扁长按钮 - 已修改为自适应宽度 */
.category-btn {
    padding: 12px 20px;
    background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%); /* 蓝色渐变 */
    color: black;
    border: none;             /* 去掉边框或改为透明 */
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
    transition: all 0.2s;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    position: relative;
    white-space: nowrap;
    flex-shrink: 0;
    min-width: fit-content;
}

.category-btn:hover {
    background: linear-gradient(135deg, #1976D2 0%, #1565C0 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(33, 150, 243, 0.4);
}

.btn-content {
    display: block;
    width: 100%;
    text-align: center;
}

.btn-name {
    font-weight: 500;
}

/* 播放状态指示 */
.category-btn.playing {
    border-color: #4CAF50;
    background: #f0fff4;
}

.category-btn.queued {
    border-color: #FF9800;
    background: #fff8e1;
}

.category-btn.queued:after {
    content: "队列中";
    position: absolute;
    top: -8px;
    right: -8px;
    background: #FF9800;
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
}

/* 说明文字 */
.instructions {
    text-align: center;
    color: white;
    font-size: 14px;
    margin-top: 30px;
    padding: 15px;
    background: rgba(255,255,255,0.1);
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

/* 状态栏 */
.status-bar {
    margin-top: 20px;
    padding: 12px;
    background: rgba(255,255,255,0.9);
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: #666;
}

/* 响应式 */
@media (max-width: 768px) {
    .category-btn {
        padding: 10px 15px;
        font-size: 14px;
    }
    
    .control-group {
        flex-direction: column;
        gap: 15px;
    }
    
    .mode-selector, .toggle-switch {
        width: 100%;
        justify-content: center;
    }
    
    /* 手机端长文字处理 */
    .category-btn.long-text {
        white-space: normal;
        word-break: break-word;
        max-width: 200px;
    }
}

@media (max-width: 480px) {
    .category-btn {
        font-size: 13px;
        padding: 8px 12px;
        min-height: 45px;
    }
    
    .btn-icon {
        font-size: 18px;
        margin-right: 8px;
    }
}