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

/* ===== SEO 隐藏类 ===== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* ===== 瀑布流布局 ===== */
.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;
}

/* ===== Hero 区域 ===== */
.hero-section {
    background: linear-gradient(135deg, #fff0f1 0%, #ffffff 50%, #fff7ed 100%);
    position: relative;
    overflow: hidden;
}
.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 60%;
    height: 200%;
    background: radial-gradient(ellipse, rgba(255,36,66,0.04) 0%, transparent 70%);
    pointer-events: none;
}

/* ===== 测评文章横向滚动 ===== */
.reviews-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    scroll-snap-type: x mandatory;
    padding-bottom: 4px;
}
.reviews-scroll::-webkit-scrollbar { display: none; }
.review-card {
    scroll-snap-align: start;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.review-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.1);
}

/* ===== 悬浮按钮 ===== */
.fab-wechat {
    animation: fab-bounce 2s ease-in-out infinite;
}
@keyframes fab-bounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}
.fab-wechat:hover {
    animation: none;
    transform: scale(1.08);
}

/* ===== 图片发光效果 ===== */
.hero-glow {
    box-shadow: 0 8px 32px rgba(255,36,66,0.15);
    transition: box-shadow 0.3s ease;
}
.hero-glow:hover {
    box-shadow: 0 12px 40px rgba(255,36,66,0.25);
}
