/* ========================================
   紫色渐变主题 - 玻璃态风格
   ======================================== */

/* CSS变量 - 主题颜色 */
:root {
    --primary: #7c3aed;           /* violet-600 */
    --primary-light: #8b5cf6;     /* violet-500 */
    --primary-dark: #6d28d9;      /* violet-700 */
    --secondary: #a855f7;         /* purple-500 */
    --accent: #d946ef;            /* fuchsia-500 */
    --accent-light: #e879f9;      /* fuchsia-400 */
    --gradient-start: #7c3aed;    /* violet-600 */
    --gradient-end: #a855f7;      /* purple-500 */
    --gradient-accent: #d946ef;   /* fuchsia-500 */
    --glow-color: rgba(139, 92, 246, 0.4);
    --glow-strong: rgba(139, 92, 246, 0.6);
}

/* 隐藏移动端横向滚动条 */
.scrollbar-hide::-webkit-scrollbar {
    display: none;
}
.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* 自定义样式 */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 渐变背景动画 - 紫色主题 */
.bg-gradient-animated {
    background: linear-gradient(-45deg, #7c3aed, #8b5cf6, #a855f7, #d946ef);
    background-size: 400% 400%;
    animation: gradient 15s ease infinite;
}

/* ========================================
   唱片机播放效果
   ======================================== */

/* 唱片旋转动画 */
@keyframes vinyl-spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* 唱片基础样式 */
.vinyl-disc {
    transition: transform 0.3s ease;
}

/* 唱片旋转状态 - 播放时 */
.vinyl-disc.playing {
    animation: vinyl-spin 3s linear infinite;
}

/* 唱片悬停效果 */
.vinyl-disc:hover {
    transform: scale(1.02);
}

.vinyl-disc.playing:hover {
    animation-play-state: running;
    transform: none;
}

/* 播放按钮样式 */
.vinyl-play-btn {
    background: transparent;
}

.vinyl-play-btn > div {
    transition: all 0.3s ease;
}

.vinyl-play-btn:hover > div {
    transform: scale(1.1);
    box-shadow: 0 10px 40px rgba(124, 58, 237, 0.4);
}

/* 播放状态时隐藏播放按钮内的图标区域透明度 */
.vinyl-disc.playing .vinyl-play-btn > div {
    opacity: 0;
}

.vinyl-disc.playing:hover .vinyl-play-btn > div {
    opacity: 1;
}

/* 唱片光泽动画 */
@keyframes vinyl-shine {
    0% {
        opacity: 0.3;
        transform: rotate(0deg);
    }
    50% {
        opacity: 0.5;
    }
    100% {
        opacity: 0.3;
        transform: rotate(360deg);
    }
}

.vinyl-disc::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 9999px;
    background: linear-gradient(
        135deg,
        transparent 40%,
        rgba(255,255,255,0.1) 50%,
        transparent 60%
    );
    pointer-events: none;
}

.vinyl-disc.playing::before {
    animation: vinyl-shine 3s linear infinite;
}

@keyframes gradient {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* ========================================
   玻璃态效果
   ======================================== */
.glass-card {
    background: linear-gradient(135deg, 
        rgba(139, 92, 246, 0.05) 0%, 
        rgba(255, 255, 255, 0.9) 50%, 
        rgba(217, 70, 239, 0.05) 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.glass-card-strong {
    background: linear-gradient(135deg, 
        rgba(139, 92, 246, 0.1) 0%, 
        rgba(255, 255, 255, 0.95) 50%, 
        rgba(217, 70, 239, 0.08) 100%);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* ========================================
   渐变边框效果
   ======================================== */
.gradient-border-left {
    position: relative;
    border-left: 4px solid transparent;
    background-clip: padding-box;
}

.gradient-border-left::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, var(--gradient-start), var(--gradient-end), var(--gradient-accent));
    border-radius: 4px 0 0 4px;
}

/* ========================================
   播放按钮 - 渐变发光
   ======================================== */
.play-btn-gradient {
    background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
    box-shadow: 0 4px 15px var(--glow-color);
    transition: all 0.3s ease;
}

.play-btn-gradient:hover {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--secondary) 100%);
    box-shadow: 0 6px 20px var(--glow-strong);
    transform: scale(1.1);
}

/* 播放按钮光环效果 */
.play-btn-glow {
    position: relative;
}

.play-btn-glow::before {
    content: '';
    position: absolute;
    inset: -3px;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-accent));
    border-radius: 50%;
    opacity: 0;
    z-index: -1;
    transition: opacity 0.3s ease;
    filter: blur(8px);
}

.play-btn-glow:hover::before {
    opacity: 0.6;
}

/* 播放中的呼吸动画 */
.play-btn-playing {
    animation: playingPulse 1.5s ease-in-out infinite;
}

@keyframes playingPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 var(--glow-color);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(139, 92, 246, 0);
    }
}

/* ========================================
   铃声卡片样式
   ======================================== */
.ringtone-card {
    background: linear-gradient(135deg, 
        rgba(139, 92, 246, 0.03) 0%, 
        rgba(255, 255, 255, 1) 50%, 
        rgba(217, 70, 239, 0.03) 100%);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.ringtone-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, #7c3aed, #a855f7, #d946ef);
    border-radius: 4px 0 0 4px;
}

.ringtone-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(139, 92, 246, 0.15);
    background: linear-gradient(135deg, 
        rgba(139, 92, 246, 0.06) 0%, 
        rgba(255, 255, 255, 1) 50%, 
        rgba(217, 70, 239, 0.06) 100%);
}

/* 封面图样式 */
.ringtone-cover {
    transition: all 0.3s ease;
    ring: 2px solid rgba(139, 92, 246, 0.2);
}

.ringtone-card:hover .ringtone-cover {
    ring: 2px solid rgba(139, 92, 246, 0.4);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.2);
}

/* ========================================
   悬停效果
   ======================================== */
.hover-scale {
    transition: transform 0.3s ease;
}

.hover-scale:hover {
    transform: scale(1.05);
}

.hover-glow {
    transition: all 0.3s ease;
}

.hover-glow:hover {
    box-shadow: 0 8px 25px var(--glow-color);
}

/* ========================================
   音频播放器样式
   ======================================== */
#audio-player {
    min-width: 300px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(139, 92, 246, 0.2);
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(217, 70, 239, 0.05));
}

/* 搜索建议样式 */
#search-suggestions {
    max-height: 300px;
    overflow-y: auto;
}

#search-suggestions::-webkit-scrollbar {
    width: 6px;
}

#search-suggestions::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

#search-suggestions::-webkit-scrollbar-thumb {
    background: #a78bfa;
    border-radius: 3px;
}

#search-suggestions::-webkit-scrollbar-thumb:hover {
    background: #8b5cf6;
}

/* 加载动画 */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

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

/* 卡片悬停效果 */
.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(139, 92, 246, 0.1), 0 10px 10px -5px rgba(139, 92, 246, 0.04);
}

/* ========================================
   按钮样式 - 紫色渐变
   ======================================== */
.btn-primary {
    background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
    border: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #6d28d9 0%, #7c3aed 100%);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(124, 58, 237, 0.4);
}

/* 渐变按钮 */
.btn-gradient {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: white;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px var(--glow-color);
}

.btn-gradient:hover {
    background: linear-gradient(135deg, var(--primary-light), var(--accent));
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--glow-strong);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.125rem;
    }
    
    #audio-player {
        min-width: 280px;
        left: 1rem;
        right: 1rem;
        bottom: 1rem;
    }
}

/* 滚动条样式 - 紫色主题 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f5f3ff;
}

::-webkit-scrollbar-thumb {
    background: #c4b5fd;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a78bfa;
}

/* 导航栏滚动效果 */
.navbar-scrolled {
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid rgba(139, 92, 246, 0.1);
}

/* 分类图标样式 - 紫色渐变 */
.category-icon {
    background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
    transition: all 0.3s ease;
}

.category-icon:hover {
    background: linear-gradient(135deg, #6d28d9 0%, #7c3aed 100%);
    transform: scale(1.1);
}

/* 统计数字动画 */
.counter {
    font-variant-numeric: tabular-nums;
}

/* 播放按钮样式 */
.play-button {
    position: relative;
    overflow: hidden;
}

.play-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.play-button:hover::before {
    width: 300px;
    height: 300px;
}

/* 特色标签样式 - 紫色渐变 */
.featured-badge {
    background: linear-gradient(45deg, #a855f7 0%, #d946ef 100%);
    animation: pulse 2s infinite;
}

.hot-badge {
    background: linear-gradient(45deg, #f97316 0%, #fbbf24 100%);
    animation: bounce 2s infinite;
}

.new-badge {
    background: linear-gradient(45deg, #8b5cf6 0%, #6366f1 100%);
    animation: shake 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-2px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(2px);
    }
}

/* 进度条样式 */
.progress-bar {
    transition: width 0.1s ease;
}

/* 音频可视化效果 - 紫色 */
.audio-visualizer {
    display: flex;
    align-items: end;
    height: 30px;
    gap: 2px;
}

.audio-bar {
    width: 3px;
    background: linear-gradient(to top, #7c3aed, #d946ef);
    border-radius: 2px;
    animation: audioWave 1s ease-in-out infinite alternate;
}

.audio-bar:nth-child(2) { animation-delay: 0.1s; }
.audio-bar:nth-child(3) { animation-delay: 0.2s; }
.audio-bar:nth-child(4) { animation-delay: 0.3s; }
.audio-bar:nth-child(5) { animation-delay: 0.4s; }

@keyframes audioWave {
    0%, 100% { height: 10px; }
    50% { height: 30px; }
}

/* ========================================
   分页样式 - 紫色主题
   ======================================== */
.pagination-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
}

.pagination-wrapper .pagination {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 0.25rem;
}

.pagination-wrapper .pagination li {
    display: flex;
}

.pagination-wrapper .pagination li a,
.pagination-wrapper .pagination li span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    height: 2.5rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    border: 1px solid #e5e7eb;
    background-color: white;
    color: #374151;
    transition: all 0.2s ease;
    border-radius: 0.375rem;
}

.pagination-wrapper .pagination li a:hover {
    background-color: #f5f3ff;
    border-color: #c4b5fd;
    color: #6d28d9;
}

.pagination-wrapper .pagination li.active span,
.pagination-wrapper .pagination li.current span {
    background: linear-gradient(135deg, #7c3aed, #a855f7);
    border-color: #7c3aed;
    color: white;
}

.pagination-wrapper .pagination li.disabled span {
    color: #9ca3af;
    background-color: #f9fafb;
    border-color: #e5e7eb;
    cursor: not-allowed;
}

.pagination-wrapper .pagination li:first-child a,
.pagination-wrapper .pagination li:first-child span {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.pagination-wrapper .pagination li:last-child a,
.pagination-wrapper .pagination li:last-child span {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.pagination-wrapper .pagination li:not(:first-child):not(:last-child) a,
.pagination-wrapper .pagination li:not(:first-child):not(:last-child) span {
    border-radius: 0;
}

/* 响应式分页 */
@media (max-width: 640px) {
    .pagination-wrapper .pagination li a,
    .pagination-wrapper .pagination li span {
        min-width: 2rem;
        height: 2rem;
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }
    
    .pagination-wrapper .pagination {
        gap: 0.125rem;
    }
}

/* 分页信息样式 */
.pagination-info {
    text-align: center;
    color: #6b7280;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

/* 排序下拉框样式 */
.sort-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

/* ========================================
   Tab 切换器样式 - 紫色主题
   ======================================== */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* ========================================
   详情页 Tab 切换器样式 - 现代滑动式
   ======================================== */

/* Tab 容器 */
.detail-tabs-container {
    position: relative;
}

/* 滑动指示器 */
.detail-tab-indicator {
    pointer-events: none;
}

/* Tab 按钮 */
.detail-tab-btn {
    background: transparent;
    color: #6b7280;
    cursor: pointer;
    white-space: nowrap;
}

.detail-tab-btn:hover:not(.active) {
    color: #7c3aed;
}

/* 激活状态 - 白色文字（在渐变背景上） */
.detail-tab-btn.active {
    color: white;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

/* Tab 图标动画 */
.detail-tab-btn i {
    transition: transform 0.3s ease;
}

.detail-tab-btn.active i {
    animation: tabIconBounce 0.5s ease-out;
}

/* 悬停时的微动效 */
.detail-tab-btn:hover i {
    transform: scale(1.1);
}

.detail-tab-btn.active:hover i {
    transform: scale(1);
}

/* ========================================
   首页 Tab 切换器样式 - 现代滑动式
   ======================================== */
.home-tab-content {
    display: none;
}

.home-tab-content.active {
    display: block;
}

/* Tab 容器 */
.home-tabs-container {
    position: relative;
}

/* 滑动指示器 */
.home-tab-indicator {
    pointer-events: none;
}

/* Tab 按钮 */
.home-tab-btn {
    background: transparent;
    color: #6b7280;
    cursor: pointer;
    white-space: nowrap;
}

.home-tab-btn:hover:not(.active) {
    color: #7c3aed;
}

/* 激活状态 - 白色文字（在渐变背景上） */
.home-tab-btn.active {
    color: white;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

/* Tab 图标动画 */
.home-tab-btn i {
    transition: transform 0.3s ease;
}

.home-tab-btn.active i {
    animation: tabIconBounce 0.5s ease-out;
}

@keyframes tabIconBounce {
    0% { transform: scale(1); }
    30% { transform: scale(1.3); }
    50% { transform: scale(0.9); }
    70% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* 悬停时的微动效 */
.home-tab-btn:hover i {
    transform: scale(1.1);
}

.home-tab-btn.active:hover i {
    transform: scale(1);
}

/* ========================================
   紫色主题卡片
   ======================================== */
.card-violet {
    position: relative;
    transition: all 0.3s ease;
}

.card-violet::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, #7c3aed, #a855f7, #d946ef);
    border-radius: 4px 0 0 4px;
}

.card-violet:hover {
    box-shadow: 0 8px 24px rgba(124, 58, 237, 0.15);
}

/* 紫色徽章 */
.badge-violet {
    background: linear-gradient(135deg, #7c3aed, #a855f7);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* 紫色按钮波纹效果 */
.btn-violet-ripple {
    position: relative;
    overflow: hidden;
}

.btn-violet-ripple::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(167, 139, 250, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-violet-ripple:active::after {
    width: 300px;
    height: 300px;
}

/* 打字机效果激活时的样式 */
.typewriter-active {
    caret-color: #7c3aed;
    animation: blink 0.7s infinite;
}

/* 光标闪烁效果 */
@keyframes blink {
    0%, 49% {
        border-right: 2px solid #7c3aed;
    }
    50%, 100% {
        border-right: 2px solid transparent;
    }
}

/* 打字完成后的提示效果 */
.typewriter-complete {
    animation: pulse-ring 2s ease-in-out;
}

/* 脉冲环效果 - 紫色 */
@keyframes pulse-ring {
    0% {
        box-shadow: 0 0 0 0 rgba(124, 58, 237, 0.5);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(124, 58, 237, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(124, 58, 237, 0);
    }
}

/* ========================================
   热门搜索标签 - 紫色主题
   ======================================== */
.hot-keyword-tag {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(217, 70, 239, 0.1));
    color: #6d28d9;
    transition: all 0.3s ease;
}

.hot-keyword-tag:hover {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(217, 70, 239, 0.2));
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.2);
}

/* ========================================
   侧边栏热门排名样式
   ======================================== */
.rank-badge-gold {
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
    color: white;
}

.rank-badge-silver {
    background: linear-gradient(135deg, #9ca3af, #d1d5db);
    color: white;
}

.rank-badge-bronze {
    background: linear-gradient(135deg, #d97706, #f59e0b);
    color: white;
}

.rank-badge-normal {
    background: linear-gradient(135deg, #7c3aed, #a855f7);
    color: white;
}

/* ========================================
   Focus 状态 - 紫色主题
   ======================================== */
input:focus, 
textarea:focus, 
select:focus {
    outline: none;
    ring: 2px solid rgba(124, 58, 237, 0.5);
    border-color: #7c3aed;
}

.focus-violet:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.3);
    border-color: #7c3aed;
}

/* ========================================
   移动端分类导航背景
   ======================================== */
.mobile-category-bg {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(217, 70, 239, 0.08) 100%);
}

/* ========================================
   链接悬停效果
   ======================================== */
a.link-violet {
    color: #6d28d9;
    transition: color 0.2s ease;
}

a.link-violet:hover {
    color: #7c3aed;
}
