/* 疼死笑话网站自定义样式 */

/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
}

/* 自定义滚动条 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #fb923c, #ec4899);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, #f97316, #db2777);
}

/* 笑话卡片动画 */
.joke-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.joke-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* 分类标签样式 */
.category-tag {
    transition: all 0.2s ease;
}

.category-tag:hover {
    transform: scale(1.05);
}

.category-tag.active {
    background: linear-gradient(135deg, #fb923c, #ec4899);
    color: white;
    border-color: transparent;
}

/* 点赞按钮动画 */
.like-btn {
    transition: all 0.2s ease;
}

.like-btn:active {
    transform: scale(0.95);
}

.like-btn.liked {
    background-color: #fce7f3;
    border-color: #ec4899;
}

.like-btn.liked i {
    color: #ec4899;
    fill: #ec4899;
}

/* 搜索框聚焦动画 */
input:focus {
    box-shadow: 0 0 0 3px rgba(251, 146, 60, 0.1);
}

/* 分页按钮样式 */
.pagination-btn {
    transition: all 0.2s ease;
}

.pagination-btn:hover:not(:disabled) {
    background-color: #fff7ed;
    border-color: #fb923c;
    color: #ea580c;
}

.pagination-btn.active {
    background: linear-gradient(135deg, #fb923c, #ec4899);
    color: white;
    border-color: transparent;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 分享提示动画 */
@keyframes slideUp {
    from {
        transform: translate(-50%, 20px);
        opacity: 0;
    }
    to {
        transform: translate(-50%, 0);
        opacity: 1;
    }
}

@keyframes slideDown {
    from {
        transform: translate(-50%, 0);
        opacity: 1;
    }
    to {
        transform: translate(-50%, 20px);
        opacity: 0;
    }
}

.share-toast.show {
    animation: slideUp 0.3s ease forwards;
}

.share-toast.hide {
    animation: slideDown 0.3s ease forwards;
}

/* 内容展开/收起动画 */
.joke-content {
    max-height: 120px;
    overflow: hidden;
    position: relative;
}

.joke-content.expanded {
    max-height: none;
}

.joke-content::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: linear-gradient(to bottom, transparent, white);
    pointer-events: none;
}

.joke-content.expanded::after {
    display: none;
}

/* 加载动画 */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.loading {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .joke-card:hover {
        transform: none;
    }
    
    .category-tag:hover {
        transform: none;
    }
}

/* 选中文字样式 */
::selection {
    background-color: #fed7aa;
    color: #9a3412;
}

/* 链接下划线动画 */
a.animated-link {
    position: relative;
}

a.animated-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 0;
    background: linear-gradient(90deg, #fb923c, #ec4899);
    transition: width 0.3s ease;
}

a.animated-link:hover::after {
    width: 100%;
}
