/* 隐藏移动端横向滚动条 */
.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, #047857, #059669, #10b981, #34d399);
    background-size: 400% 400%;
    animation: gradient 15s ease infinite;
}

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

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

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

/* 音频播放器样式 */
#audio-player {
    min-width: 300px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* 搜索建议样式 */
#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: #c1c1c1;
    border-radius: 3px;
}

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

/* 加载动画 */
.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(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* 按钮样式 */
.btn-primary {
    background: linear-gradient(135deg, #047857 0%, #059669 100%);
    border: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(4, 120, 87, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #065f46 0%, #047857 100%);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(4, 120, 87, 0.4);
}

/* 响应式设计 */
@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: #f1f1f1;
}

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

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

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

/* 分类图标样式 */
.category-icon {
    background: linear-gradient(135deg, #047857 0%, #10b981 100%);
    transition: all 0.3s ease;
}

.category-icon:hover {
    background: linear-gradient(135deg, #065f46 0%, #047857 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, #f093fb 0%, #f5576c 100%);
    animation: pulse 2s infinite;
}

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

.new-badge {
    background: linear-gradient(45deg, #4ecdc4 0%, #44a08d 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, #047857, #10b981);
    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: #f3f4f6;
    border-color: #d1d5db;
    color: #1f2937;
}

.pagination-wrapper .pagination li.active span,
.pagination-wrapper .pagination li.current span {
    background-color: #059669;
    border-color: #059669;
    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-btn {
    background: transparent;
    color: #6b7280;
    cursor: pointer;
    position: relative;
    white-space: normal;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 1.4;
}

.tab-btn:hover {
    color: #374151;
    transform: translateY(-1px);
}

.tab-btn.active {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    color: white;
    box-shadow: 0 4px 14px rgba(5, 150, 105, 0.4);
}

.tab-btn.active:hover {
    background: linear-gradient(135deg, #047857 0%, #065f46 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(5, 150, 105, 0.5);
}

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

.tab-btn.active i {
    animation: iconPulse 0.6s ease-in-out;
}

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

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

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

.home-tab-btn {
    background: transparent;
    color: #6b7280;
    cursor: pointer;
    position: relative;
    white-space: normal;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 1.4;
}

.home-tab-btn:hover {
    color: #374151;
    transform: translateY(-1px);
}

.home-tab-btn.active {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    color: white;
    box-shadow: 0 4px 14px rgba(5, 150, 105, 0.4);
}

.home-tab-btn.active:hover {
    background: linear-gradient(135deg, #047857 0%, #065f46 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(5, 150, 105, 0.5);
}

.home-tab-btn i {
    transition: transform 0.3s ease;
}

.home-tab-btn.active i {
    animation: iconPulse 0.6s ease-in-out;
}

/* 森林绿主题卡片 */
.card-forest {
    border-left: 4px solid #059669;
    transition: all 0.3s ease;
}
.card-forest:hover {
    border-left-color: #047857;
    box-shadow: 0 8px 24px rgba(4, 120, 87, 0.15);
}

/* 森林绿徽章 */
.badge-forest {
    background: linear-gradient(135deg, #047857, #10b981);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* 绿色按钮波纹效果 */
.btn-forest-ripple {
    position: relative;
    overflow: hidden;
}
.btn-forest-ripple::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(16, 185, 129, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}
.btn-forest-ripple:active::after {
    width: 300px;
    height: 300px;
}
/* 打字机效果激活时的样式 */
.typewriter-active {
    caret-color: #047857;
    animation: blink 0.7s infinite;
}

/* 光标闪烁效果 */
@keyframes blink {
    0%, 49% {
        border-right: 2px solid #047857;
    }
    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(4, 120, 87, 0.5);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(4, 120, 87, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(4, 120, 87, 0);
    }
}