/* ========================================
   主题切换系统
   ======================================== */

/* 主题切换按钮 */
.theme-switcher {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.theme-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.theme-btn:hover {
    transform: scale(1.15) rotate(10deg);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.theme-btn.active {
    border-color: #fff;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.6);
    transform: scale(1.1);
}

/* 主题颜色定义 */
:root {
    --primary-color: #ff6b9d;
    --secondary-color: #ff8fab;
    --accent-color: #ffb3d9;
    --bg-color: #000;
    --text-color: #fff;
}

/* 浪漫粉主题（默认） */
[data-theme="pink"] {
    --primary-color: #ff6b9d;
    --secondary-color: #ff8fab;
    --accent-color: #ffb3d9;
}

/* 星空蓝主题 */
[data-theme="blue"] {
    --primary-color: #4a90e2;
    --secondary-color: #7ab8ff;
    --accent-color: #a8d0ff;
}

/* 夕阳金主题 */
[data-theme="gold"] {
    --primary-color: #ff9500;
    --secondary-color: #ffb340;
    --accent-color: #ffd280;
}

/* 彩虹渐变主题 */
[data-theme="rainbow"] {
    --primary-color: #ff6b9d;
    --secondary-color: #4a90e2;
    --accent-color: #50c878;
}

[data-theme="rainbow"] .music-player-panel,
[data-theme="rainbow"] .card {
    background: linear-gradient(135deg,
        rgba(255, 107, 157, 0.15),
        rgba(74, 144, 226, 0.15),
        rgba(80, 200, 120, 0.15));
    animation: rainbowShift 5s ease infinite;
}

@keyframes rainbowShift {
    0%, 100% { filter: hue-rotate(0deg); }
    50% { filter: hue-rotate(180deg); }
}

/* 性能监控面板 */
.performance-panel {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 16px 20px;
    color: #fff;
    font-size: 12px;
    font-family: 'Courier New', monospace;
    z-index: 999;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
    cursor: move;
    user-select: none;
}

.performance-panel.collapsed {
    width: 60px;
    height: 30px;
    overflow: hidden;
    border-radius: 15px;
}

.performance-panel.collapsed .perf-content {
    display: none;
}

.performance-panel.collapsed::after {
    content: '📊';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 18px;
}

.perf-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.perf-title {
    font-weight: 600;
    color: var(--primary-color);
}

.perf-toggle {
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.perf-toggle:hover {
    opacity: 1;
}

.perf-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
    padding: 4px 0;
}

.perf-label {
    opacity: 0.7;
}

.perf-value {
    font-weight: 600;
    color: var(--accent-color);
}

.perf-bar {
    height: 3px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    margin-top: 2px;
    overflow: hidden;
}

.perf-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    transition: width 0.3s ease;
}
