/**
 * 这是全局样式文件
 * 前后端通用
 * 作用：统一样式风格，实现无滚动条、无下划线、自适应等设计要求
 */

:root {
    --bg-color: #fbfbfd;
    --text-color: #1d1d1f;
    --accent-color: #0071e3;
    --card-bg: rgba(255, 255, 255, 0.8);
    --border-color: rgba(0, 0, 0, 0.05);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
    -webkit-font-smoothing: antialiased;
}

a, button, [onclick] {
    cursor: pointer;
    text-decoration: none !important;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.5;
    overflow-x: hidden;
}

/* 扁平化全局样式 */
.btn, .card, .tag, input, textarea, select {
    box-shadow: none !important;
    transition: none !important;
}

/* 隐藏所有滚动条 */
::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}
* {
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
}

/* 扁平化全局卡片样式 */
.waterfall-item, .card, .review-card, .photo-card {
    box-shadow: none !important;
    border: 1px solid var(--border-color) !important;
    transition: none !important;
    background: var(--card-bg) !important;
}

.waterfall-item:hover, .card:hover, .review-card:hover, .photo-card:hover {
    transform: none !important;
    border-color: rgba(0, 0, 0, 0.2) !important;
}

/* Header 重新设计 */
.site-header {
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.header-inner {
    max-width: 1400px;
    width: 95%;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 20px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.03);
}

.logo-text {
    font-size: 20px;
    font-weight: 900;
    letter-spacing: 2px;
    color: var(--text-color);
    position: relative;
    padding-left: 10px;
}

.logo-text::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 18px;
    background: var(--text-color);
    border-radius: 2px;
}

/* 导航药丸 */
.nav-container {
    flex-grow: 1;
    display: flex;
    justify-content: center;
}

.nav-pill {
    display: flex;
    background: rgba(0, 0, 0, 0.03);
    padding: 4px;
    border-radius: 16px;
    gap: 4px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 12px;
    color: var(--text-color);
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.5);
}

.nav-item.active {
    background: #fff;
    color: var(--accent-color);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.nav-icon {
    width: 18px;
    height: 18px;
}

.nav-label {
    display: block;
}

/* 认证动作 */
.auth-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.admin-pill {
    display: flex;
    background: rgba(0, 0, 0, 0.03);
    padding: 4px;
    border-radius: 14px;
    gap: 4px;
}

.auth-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    color: var(--text-color);
    background: rgba(255, 255, 255, 0.5);
    transition: all 0.3s ease;
}

.auth-btn:hover {
    background: #fff;
    color: var(--accent-color);
    transform: translateY(-1px);
}

.auth-icon {
    width: 20px;
    height: 20px;
}

/* 响应式适配 */
@media (max-width: 768px) {
    .site-header {
        padding: 0;
        position: sticky;
        top: 0;
        width: 100%;
        background: rgba(255, 255, 255, 0.8);
        backdrop-filter: saturate(180%) blur(20px);
        -webkit-backdrop-filter: saturate(180%) blur(20px);
        z-index: 1000;
        border-bottom: 1px solid var(--border-color);
    }
    
    .header-inner {
        width: 100%;
        padding: 12px 15px;
        border-radius: 0;
        background: transparent;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        border: none;
        box-shadow: none;
        margin: 0;
    }

    .logo-text {
        font-size: 16px;
        letter-spacing: 1px;
        padding-left: 10px;
    }

    .logo-text::before {
        width: 4px;
        height: 16px;
    }

    .nav-label {
        display: none;
    }

    .nav-pill {
        background: transparent;
        padding: 0;
        gap: 15px;
    }

    .nav-item {
        padding: 5px;
        border-radius: 0;
        color: var(--text-color);
    }

    .nav-item.active {
        background: transparent;
        color: var(--accent-color);
        box-shadow: none;
    }

    .auth-actions {
        gap: 10px;
    }

    .auth-btn {
        width: 32px;
        height: 32px;
        border-radius: 8px;
        background: rgba(0, 0, 0, 0.05);
    }

    .admin-pill {
        background: transparent;
        padding: 0;
        gap: 8px;
    }

    /* 针对移动端的间距调整 */
    body {
        padding-top: 0; /* Sticky header 不占用空间或已通过 header 自身 padding 处理 */
    }
}

.site-header.scrolled .header-inner {
    padding: 10px 15px;
}

/* 封面图增强样式 */
.review-cover {
    position: relative;
    overflow: hidden;
    background: #f5f5f7;
    transition: none !important;
}

.review-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: none !important;
}

.review-card:hover .review-cover img {
    transform: none !important;
}

.review-card:hover .review-cover {
    box-shadow: none !important;
}

/* 详情页 Banner 增强 */
.review-banner {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    box-shadow: none !important;
    border: 1px solid var(--border-color);
    background: #f5f5f7;
    margin-bottom: 40px;
    transition: none !important;
}

.review-banner img {
    width: 100%;
    height: auto;
    display: block;
    transition: none !important;
}

.review-banner:hover img {
    transform: none !important;
}

/* 摘要内容排版优化 */
.review-excerpt {
    font-size: 15px;
    line-height: 1.6;
    color: #424245;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-top: 12px;
}

/* 机型 Tag 样式 */
.model-tag {
    display: inline-flex;
    align-items: center;
    background: rgba(0, 113, 227, 0.08);
    color: var(--accent-color);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    margin-left: 8px;
    white-space: nowrap;
}

.category-tags {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;
}

.tag-item {
    padding: 4px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    background: #f5f5f7;
    color: #86868b;
    white-space: nowrap;
}

.tag-item.accent {
    background: #0071e3;
    color: #fff;
}

/* 品牌配色 */
.brand-oneplus { --accent-color: #F60514 !important; }
.brand-oppo { --accent-color: #000000 !important; }
.brand-iqoo { --accent-color: #C99E19 !important; }
.brand-apple { --accent-color: #000000 !important; }
.brand-xiaomi { --accent-color: #FF6700 !important; }
.brand-vivo { --accent-color: #415fff !important; }
.brand-samsung { --accent-color: #1428a0 !important; }
.brand-honor { --accent-color: #000000 !important; }

/* 强制白色字体 */
.review-tag, .btn-primary, .submit-btn, .action-btn {
    color: #ffffff !important;
}

/* 严禁一切下划线效果 */
a {
    text-decoration: none !important;
    color: inherit;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 删除/隐藏所有滚动条 */
::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}

body {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

/* 严禁一切深色模式，强制保持高亮精致风格 */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-color: #fbfbfd !important;
        --card-bg: rgba(255, 255, 255, 0.8) !important;
        --text-color: #1d1d1f !important;
        --border-color: rgba(0, 0, 0, 0.05) !important;
    }
    body {
        background-color: var(--bg-color) !important;
        color: var(--text-color) !important;
    }
}

/* 错乱式瀑布流微调 */
.waterfall-container {
    column-count: 3;
    column-gap: 20px;
    padding: 15px;
    max-width: 1600px;
    margin: 0 auto;
}

@media (max-width: 1100px) {
    .waterfall-container { column-count: 2; }
}

@media (max-width: 700px) {
    .waterfall-container { 
        column-count: 1; 
        padding: 15px;
    }
}

.waterfall-item {
    opacity: 0;
    transform: translateY(30px);
    break-inside: avoid;
    margin-bottom: 25px;
    background: var(--card-bg);
    border-radius: 20px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: all 0.8s cubic-bezier(0.165, 0.84, 0.44, 1) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.waterfall-item.reveal {
    opacity: 1;
    transform: translateY(0);
}

.waterfall-item:hover {
    transform: none !important;
    box-shadow: none !important;
    border-color: var(--border-color);
}

/* 增强“错乱式”效果 - 通过随机感的高度偏移 */
.waterfall-item:nth-child(3n+1) { margin-top: 0; }
.waterfall-item:nth-child(3n+2) { margin-top: 40px; }
.waterfall-item:nth-child(3n) { margin-top: 20px; }

/* 深度排版通用样式 (Deep Typesetting) */
.content-body, .review-content, .photo-desc {
    line-height: 1.8;
    color: #1d1d1f;
    font-size: 18px;
}

.content-body p, .review-content p, .photo-desc p {
    margin-bottom: 1.6em;
    letter-spacing: 0.02em;
}

.content-body h3, .review-content h3, 
.content-body h4, .review-content h4 {
    margin: 2em 0 1.2em;
    font-weight: 700;
    color: #1d1d1f;
    position: relative;
    padding-left: 18px;
    line-height: 1.4;
}

.content-body h3::before, .review-content h3::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.2em;
    bottom: 0.2em;
    width: 5px;
    background: var(--accent-color);
    border-radius: 3px;
}

.content-body blockquote, .review-content blockquote {
    border-left: 4px solid #e5e5e7;
    padding: 20px 30px;
    margin: 2em 0;
    background: #f5f5f7;
    border-radius: 0 16px 16px 0;
    color: #48484a;
    font-style: italic;
    font-size: 0.95em;
}

.content-body ul, .review-content ul, 
.content-body ol, .review-content ol {
    margin: 1.6em 0;
    padding-left: 28px;
}

.content-body li, .review-content li {
    margin-bottom: 1em;
    position: relative;
}

.content-body strong, .review-content strong {
    color: var(--accent-color);
    font-weight: 700;
}

.content-body img, .review-content img {
    max-width: 100%;
    height: auto;
    border-radius: 20px;
    margin: 2em 0;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

/* 响应式调整 */
@media (max-width: 768px) {
    .header-inner {
        flex-direction: column;
        gap: 15px;
        padding: 15px;
    }
    
    .nav-tabs {
        width: 100%;
        justify-content: center;
        overflow-x: auto;
    }
    
    .nav-tab {
        padding: 8px 16px;
        white-space: nowrap;
    }

    .site-logo {
        margin: 0;
    }

    .auth-links {
        width: 100%;
        justify-content: center;
        display: flex;
        gap: 15px;
    }

    .auth-links a {
        margin: 0;
    }

    .review-meta {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 10px;
    }

    .waterfall-item:nth-child(n) { margin-top: 0; }
}

/* 动效：淡入升起 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* SVG 图标基础样式 */
.icon {
    width: 20px;
    height: 20px;
    vertical-align: middle;
    fill: currentColor;
    transition: transform 0.3s ease;
}

.like-btn:hover .icon {
    transform: scale(1.2);
}
