/* ========================================
   YYOFX 全局样式表
   ======================================== */

/* ===== 瀑布流布局 ===== */
.masonry {
    columns: 2;
    column-gap: 12px;
}
@media (min-width: 640px) {
    .masonry { columns: 3; column-gap: 16px; }
}
@media (min-width: 1024px) {
    .masonry { columns: 4; column-gap: 18px; }
}
@media (min-width: 1280px) {
    .masonry { columns: 5; column-gap: 18px; }
}
.masonry-item {
    break-inside: avoid;
    margin-bottom: 12px;
}
@media (min-width: 640px) {
    .masonry-item { margin-bottom: 16px; }
}

/* ===== 标签滚动 ===== */
.tags-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.tags-scroll::-webkit-scrollbar {
    display: none;
}

/* ===== 卡片交互 ===== */
.effect-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.3s ease;
}
.effect-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}
.effect-card.hidden-card {
    display: none;
}
.effect-card.fade-out {
    opacity: 0;
}

/* ===== 视频播放图标 ===== */
.play-icon {
    opacity: 0;
    transition: opacity 0.2s;
}
.effect-card:hover .play-icon {
    opacity: 1;
}

/* ===== 搜索框 ===== */
.search-box:focus-within {
    border-color: #ff2442;
    box-shadow: 0 0 0 2px rgba(255, 36, 66, 0.1);
}

/* ===== 分类 tab 激活下划线 ===== */
.tab-active {
    color: #ff2442;
    border-bottom: 2px solid #ff2442;
}

/* ===== 隐藏滚动条 ===== */
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { scrollbar-width: none; }

/* ===== 点赞动画 ===== */
.like-btn.liked svg { color: #ff2442; fill: #ff2442; }

/* ===== 图片加载占位 ===== */
.card-img {
    background: linear-gradient(135deg, #f0f0f0 0%, #e8e8e8 100%);
}

/* ===== 弹窗动画 ===== */
.modal-backdrop.show {
    opacity: 1;
}
.modal-content.show {
    opacity: 1;
    transform: scale(1);
}
.sheet-backdrop.show {
    opacity: 1;
}
.sheet-content.show {
    transform: translateY(0);
}

/* ===== Loading spinner ===== */
@keyframes spin {
    to { transform: rotate(360deg); }
}
.animate-spin {
    animation: spin 1s linear infinite;
}

/* ===== 安全区域 ===== */
.pb-safe {
    padding-bottom: env(safe-area-inset-bottom, 0);
}

/* ===== 文字截断 ===== */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
