/* ========================================
   界面美化增强样式
   在原有样式基础上增强视觉效果
   ======================================== */

/* === 1. 全局优化 === */
:root {
    /* 增强渐变色 */
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-success: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    --gradient-info: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --gradient-warning: linear-gradient(135deg, #fa709a 0%, #fee140 100%);

    /* 阴影增强 */
    --shadow-soft: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-medium: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-strong: 0 8px 32px rgba(0, 0, 0, 0.16);
    --shadow-glow: 0 0 20px rgba(102, 126, 234, 0.3);

    /* 动画时长 */
    --transition-fast: 0.15s;
    --transition-normal: 0.3s;
    --transition-slow: 0.5s;

    /* 背景色优化 - 减少刺眼的白色 */
    --bg-primary: #f8f9fc;
    --bg-secondary: #f3f4f8;
    --bg-card: #ffffff;
}

/* 全局背景色 */
body {
    background: #fef7e7 !important;
}

/* 暗黑模式背景 */
[data-theme="dark"] {
    --bg-primary: #1a202c;
    --bg-secondary: #2d3748;
    --bg-card: #1e2530;
}

[data-theme="dark"] body {
    background: #1a202c !important;
}

[data-theme="dark"] body {
    background: var(--bg-primary) !important;
}

/* === 2. 导航栏增强 === */
.navbar {
    backdrop-filter: blur(20px) saturate(180%);
    background: rgba(254, 247, 231, 0.95) !important;
    box-shadow: 0 2px 20px rgba(212, 175, 55, 0.15);
    transition: all var(--transition-normal) ease;
}

.navbar:hover {
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

/* 暗黑模式导航栏 */
[data-theme="dark"] .navbar {
    background: rgba(26, 32, 44, 0.9) !important;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

/* 导航链接悬浮效果 */
.navbar-link {
    position: relative;
    transition: all var(--transition-normal) ease;
}

.navbar-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transform: translateX(-50%);
    transition: width var(--transition-normal) ease;
}

.navbar-link:hover::after,
.navbar-link.active::after {
    width: 80%;
}

/* === 3. 按钮增强 === */
.btn {
    position: relative;
    overflow: hidden;
    transition: all var(--transition-normal) ease;
    font-weight: 500;
}

/* 按钮波纹效果 */
.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:active::before {
    width: 300px;
    height: 300px;
}

/* 主要按钮渐变 */
.btn-primary {
    background: var(--gradient-primary);
    border: none;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(102, 126, 234, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

/* === 4. 卡片增强 === */
.card {
    border-radius: 16px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    transition: all var(--transition-normal) ease;
    background: var(--bg-card);
    box-shadow: var(--shadow-soft);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-strong);
    border-color: rgba(102, 126, 234, 0.2);
}

[data-theme="dark"] .card {
    background: var(--bg-card);
    border-color: rgba(255, 255, 255, 0.06);
}

/* === 5. 音乐卡片增强 === */
.music-card {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    transition: all var(--transition-normal) ease;
}

.music-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity var(--transition-normal) ease;
    z-index: -1;
}

.music-card:hover::before {
    opacity: 0.08;
}

.music-card-cover {
    position: relative;
    overflow: hidden;
}

.music-card-cover img {
    transition: transform 0.6s ease;
}

.music-card:hover .music-card-cover img {
    transform: scale(1.1);
}

/* 播放按钮光晕效果 */
.play-btn-small {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    transition: all var(--transition-normal) ease;
}

.play-btn-small:hover {
    transform: scale(1.15);
    box-shadow: 0 6px 30px rgba(102, 126, 234, 0.5);
}

/* === 6. 输入框增强 === */
.input,
.textarea {
    border-radius: 12px;
    border: 2px solid rgba(0, 0, 0, 0.08);
    transition: all var(--transition-normal) ease;
    background: var(--bg-card);
}

.input:focus,
.textarea:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
    background: var(--bg-card);
    transform: translateY(-1px);
}

[data-theme="dark"] .input,
[data-theme="dark"] .textarea {
    background: var(--bg-card);
    border-color: rgba(255, 255, 255, 0.08);
}

/* === 7. Hero 区域增强 === */
.hero {
    position: relative;
    overflow: hidden;
}

.hero-gradient {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
}

.hero-title {
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* === 8. 标签增强 === */
.badge,
.membership-badge {
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
    box-shadow: var(--shadow-soft);
    transition: all var(--transition-fast) ease;
}

.badge:hover,
.membership-badge:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-medium);
}

/* === 9. 进度条增强 === */
.progress-bar {
    background: var(--gradient-primary);
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
    transition: width 0.3s ease, box-shadow 0.3s ease;
}

.progress-bar:hover {
    box-shadow: 0 2px 15px rgba(102, 126, 234, 0.5);
}

/* === 10. 模态框增强 === */
.modal {
    backdrop-filter: blur(10px);
}

.modal-content {
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* === 11. Toast 通知增强 === */
.toast {
    border-radius: 12px;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    animation: toastSlideIn 0.3s ease;
}

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.toast.success {
    background: linear-gradient(135deg, rgba(17, 153, 142, 0.95) 0%, rgba(56, 239, 125, 0.95) 100%);
}

.toast.error {
    background: linear-gradient(135deg, rgba(235, 87, 87, 0.95) 0%, rgba(249, 115, 22, 0.95) 100%);
}

.toast.info {
    background: linear-gradient(135deg, rgba(79, 172, 254, 0.95) 0%, rgba(0, 242, 254, 0.95) 100%);
}

/* === 12. 滚动条美化 === */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    transition: background 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #764ba2 0%, #667eea 100%);
}

[data-theme="dark"] ::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

/* === 13. 加载动画增强 === */
.spinner {
    border: 3px solid rgba(102, 126, 234, 0.2);
    border-top-color: #667eea;
    animation: spin 0.8s linear infinite;
}

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

/* === 14. 图标悬浮效果 === */
.icon-btn {
    transition: all var(--transition-normal) ease;
}

.icon-btn:hover {
    transform: scale(1.1) rotate(5deg);
    color: #667eea;
}

/* === 15. 链接增强 === */
a {
    transition: all var(--transition-fast) ease;
}

a:hover {
    color: #667eea;
    text-decoration: none;
}

/* === 16. 下拉菜单增强 === */
.dropdown-menu {
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.08);
    animation: dropdownSlideIn 0.2s ease;
}

@keyframes dropdownSlideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-menu a {
    transition: all var(--transition-fast) ease;
}

.dropdown-menu a:hover {
    background: linear-gradient(90deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    transform: translateX(5px);
}

/* === 17. 会员徽章增强 === */
.membership-badge {
    background: var(--gradient-primary);
    color: white;
    text-transform: uppercase;
    font-weight: bold;
    animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {
    0%, 100% {
        box-shadow: 0 0 10px rgba(102, 126, 234, 0.3);
    }
    50% {
        box-shadow: 0 0 20px rgba(102, 126, 234, 0.6);
    }
}

/* === 18. 响应式优化 === */
@media (max-width: 768px) {
    .card:hover {
        transform: translateY(-2px);
    }

    .music-card:hover .music-card-cover img {
        transform: scale(1.05);
    }
}

/* === 19. 动画性能优化 === */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.card,
.btn,
.music-card,
.navbar {
    will-change: transform;
    transform: translateZ(0);
}

/* === 20. 暗黑模式增强 === */
[data-theme="dark"] {
    color-scheme: dark;
}

[data-theme="dark"] .text-gradient {
    filter: brightness(1.2);
}

[data-theme="dark"] .shadow-glow {
    box-shadow: 0 0 30px rgba(102, 126, 234, 0.5);
}

/* === 21. 会员专属功能区 === */
.vip-features-section {
    padding: 80px 0;
    background: linear-gradient(180deg, rgba(102, 126, 234, 0.03) 0%, rgba(118, 75, 162, 0.03) 100%);
    position: relative;
    overflow: hidden;
}

.vip-features-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 50%, rgba(102, 126, 234, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 50%, rgba(118, 75, 162, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

[data-theme="dark"] .vip-features-section {
    background: linear-gradient(180deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
}

.vip-features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.vip-feature-card {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    border: 2px solid rgba(102, 126, 234, 0.1);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.vip-feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.vip-feature-card:hover::before {
    transform: scaleX(1);
}

.vip-feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 60px rgba(102, 126, 234, 0.2);
    border-color: rgba(102, 126, 234, 0.3);
}

[data-theme="dark"] .vip-feature-card {
    background: rgba(45, 55, 72, 0.95);
    border-color: rgba(102, 126, 234, 0.15);
}

.vip-feature-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: var(--gradient-primary);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
    transition: all 0.4s ease;
}

.vip-feature-card:hover .vip-feature-icon {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.5);
}

.vip-feature-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.vip-feature-desc {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.vip-feature-badge {
    display: inline-block;
    padding: 6px 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.vip-feature-badge.premium {
    background: linear-gradient(135deg, #f59e0b 0%, #f97316 100%);
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
}

.vip-feature-btn {
    margin-top: 1rem;
    width: 100%;
    transition: all 0.3s ease;
}

.vip-feature-btn:hover {
    background: var(--gradient-primary);
    color: white;
    border-color: transparent;
    transform: translateY(-2px);
}

/* 会员卡片动画 */
.vip-feature-card[data-vip-level="premium"] .vip-feature-icon {
    background: linear-gradient(135deg, #f59e0b 0%, #f97316 100%);
    box-shadow: 0 10px 30px rgba(245, 158, 11, 0.3);
}

.vip-feature-card[data-vip-level="premium"]:hover .vip-feature-icon {
    box-shadow: 0 15px 40px rgba(245, 158, 11, 0.5);
}

/* 响应式 */
@media (max-width: 768px) {
    .vip-features-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .vip-features-section {
        padding: 60px 0;
    }

    .vip-feature-card:hover {
        transform: translateY(-5px);
    }
}

