/* 公众号照片墙样式 */
.partner-page {
    height: auto;
    min-height: calc(100vh - 50px - env(safe-area-inset-bottom));
    background: #f0f2f5;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
    padding-bottom: 70px;
    width: 100%;
    max-width: 100vw; /* 确保不超过视口宽度 */
    margin: 0 auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.partner-page::-webkit-scrollbar {
    display: none;
}

.partner-container {
    flex: 1;
    padding: 10px 0;
    display: flex;
    flex-direction: column;
    gap: 15px; /* 减小间距 */
    width: 100%;
    max-width: 100vw;
    box-sizing: border-box;
    margin-top: 10px; /* 减小顶部边距 */
}

/* 头部媒体模块样式 */
.header-media-section {
    margin: 0 10px 15px;
    width: auto;
    max-width: 100%;
    box-sizing: border-box;
}

.section-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
    padding: 0 2px;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 30px;
    height: 2px;
    background: linear-gradient(90deg, #1677ff, #4096ff);
    border-radius: 2px;
}

.header-media-list {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px; /* 减小间距 */
    margin-top: 12px;
    width: 100%;
    box-sizing: border-box;
    padding: 0 4px; /* 添加两侧内边距 */
}

.header-media-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    min-width: 0; /* 确保flex item可以收缩 */
}

.header-media-icon {
    width: 52px; /* 减小图标尺寸 */
    height: 52px;
    border-radius: 8px;
    overflow: hidden;
    background-color: #f5f5f5;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 4px; /* 减小底部间距 */
    position: relative;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-media-icon::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.02);
}

.header-media-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s ease;
    z-index: 1;
}

/* 头部媒体名称特效 */
.header-media-name {
    font-size: 10px; /* 减小字体大小 */
    color: #333;
    text-align: center;
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 500;
    position: relative;
    transition: all 0.3s ease;
    padding: 0 2px; /* 添加两侧内边距 */
    line-height: 1.2; /* 控制行高 */
}

.header-media-name.fancy-text {
    background: linear-gradient(to right, #1677ff, #ff758c, #1677ff);
    background-size: 200% auto;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradient-shift 3s linear infinite;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
}

.header-media-name.glowing-text {
    color: #fff;
    text-shadow: 0 0 5px #1677ff, 0 0 10px #1677ff, 0 0 15px #1677ff;
    animation: pulse-glow 2s infinite alternate;
    font-weight: 700;
}

.header-media-name.cyber-text {
    font-family: monospace;
    font-weight: 700;
    letter-spacing: 1px;
    position: relative;
    color: #00ff00;
    text-shadow: 0 0 2px rgba(0, 255, 0, 0.8);
    animation: cyber-glitch 3s infinite;
}

@keyframes gradient-shift {
    0% {
        background-position: 0% center;
    }
    100% {
        background-position: 200% center;
    }
}

@keyframes pulse-glow {
    from {
        text-shadow: 0 0 5px #1677ff, 0 0 10px #1677ff;
    }
    to {
        text-shadow: 0 0 10px #1677ff, 0 0 20px #1677ff, 0 0 30px #1677ff;
    }
}

@keyframes cyber-glitch {
    0% {
        text-shadow: 0 0 2px rgba(0, 255, 0, 0.8);
    }
    5% {
        text-shadow: -1px 0 #00ff00, 1px 0 #0000ff;
    }
    10% {
        text-shadow: 1px 0 #00ff00, -1px 0 #0000ff;
    }
    15%, 100% {
        text-shadow: 0 0 2px rgba(0, 255, 0, 0.8);
    }
}

.header-media-item:active .header-media-icon {
    transform: translateY(2px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.08);
}

.header-media-item:active .header-media-icon img {
    transform: scale(0.96);
}

/* 精选推荐区域 */
.featured-section {
    margin: 0 12px;
}

.section-title {
    font-size: 17px;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
    padding: 0 4px;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 40px;
    height: 3px;
    background: linear-gradient(90deg, #1677ff, #4096ff);
    border-radius: 3px;
}

.featured-logos {
    display: flex;
    overflow-x: auto;
    padding: 8px 4px;
    gap: 16px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    margin: 0 -4px;
}

.featured-logos::-webkit-scrollbar {
    display: none;
}

/* 筛选标签区域 */
.filter-container {
    margin: 0 10px 12px; /* 调整筛选区域边距 */
    width: auto;
    max-width: 100%;
    box-sizing: border-box;
    display: flex;
    align-items: center;
}

.filter-label {
    font-size: 12px;
    color: #666;
    margin-right: 8px;
}

.filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    flex: 1;
}

.filter-tag {
    font-size: 12px;
    padding: 4px 12px;
    border-radius: 20px;
    background: white;
    color: #666;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
}

.filter-tag.active {
    background: #1677ff;
    color: #fff;
    box-shadow: 0 2px 5px rgba(22, 119, 255, 0.2);
}

/* 随机排序按钮 */
.random-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    color: #1677ff;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.random-button:hover, .random-button:active {
    transform: rotate(180deg);
    background: #1677ff;
    color: white;
}

/* 夜间模式下随机按钮样式 */
@media (prefers-color-scheme: dark) {
    .random-button {
        background: rgba(40, 40, 40, 0.8);
        color: #ff758c;
    }
    
    .random-button:hover, .random-button:active {
        background: #ff758c;
        color: white;
    }
}

/* 照片墙容器 */
.photo-wall-container {
    margin: 0 10px;
    width: auto;
    max-width: 100%;
    box-sizing: border-box;
}

.photo-wall {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 20px;
    width: 100%;
}

@media screen and (max-width: 360px) {
    .header-media-list {
        gap: 4px; /* 更小的间距 */
        padding: 0 2px; /* 更小的内边距 */
    }
    
    .header-media-icon {
        width: 48px; /* 更小的图标 */
        height: 48px;
    }
    
    .header-media-name {
        font-size: 9px; /* 更小的字体 */
    }
    
    .photo-wall {
        gap: 8px; /* 减小间距 */
    }
}

/* 品牌标题部分 */
.brand-title {
    flex-shrink: 0;
    text-align: center;
    padding: 16px 15px 15px;
    background: #1677ff; /* 改为纯色背景 */
    position: relative;
    width: 100%;
    box-sizing: border-box;
}

/* 移除之前的overlay效果 */
.brand-title::before,
.brand-title::after,
.grid-overlay {
    display: none;
}

.text-animate {
    font-size: 20px;
    font-weight: 800;
    position: relative;
    display: inline-block;
    color: white;
    letter-spacing: 0.5px;
    z-index: 1;
    max-width: 100%;
    line-height: 1.3;
    padding: 0 10px;
}

/* 移除闪烁效果 */
.glitch-effect {
    display: none;
}

.brand-slogan {
    font-size: 12px;
    margin-top: 6px;
    color: rgba(255, 255, 255, 0.95);
    font-weight: 400;
    letter-spacing: 0.5px;
    position: relative;
    z-index: 1;
    max-width: 100%;
}

/* 照片墙项目样式 */
.photo-item {
    border-radius: 8px;
    background-color: #fff;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    position: relative;
    max-width: 100%;
    margin-bottom: 8px;
    height: auto;
}

.photo-image {
    width: 100%;
    height: 0;
    padding-bottom: 100%; /* 保持1:1比例 */
    background-size: cover;
    background-position: center;
    background-color: #f5f5f5;
}

.photo-image.error {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #f0f0f0;
    color: #888;
    position: relative;
}

.photo-image.error::after {
    content: attr(data-name);
    font-size: 36px;
    font-weight: bold;
    color: #999;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.1);
}

.photo-body {
    padding: 6px 8px;
    display: flex;
    flex-direction: column;
    background: #fff;
}

.photo-title {
    font-size: 12px;
    font-weight: 500;
    color: #333;
    margin-bottom: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

.photo-desc {
    display: none; /* 隐藏描述，与截图一致 */
}

.photo-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2px;
}

.photo-meta {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    color: #999;
}

.photo-footer .photo-meta:first-child {
    font-size: 10px;
    color: #666;
}

.photo-footer .photo-meta + .photo-meta {
    color: #1677ff;
}

/* 精选LOGO项目样式保留 */
.logo-item {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 80px;
    transition: transform 0.2s ease;
}

.featured-logos .logo-item {
    width: 90px;
}

.logo-item:active {
    transform: scale(0.95);
}

.logo-icon {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    overflow: hidden;
    background-color: #fff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    margin-bottom: 8px;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.featured-logos .logo-icon {
    width: 72px;
    height: 72px;
    border-radius: 16px;
}

.logo-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.logo-item:active .logo-icon {
    transform: translateY(2px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.06);
}

.logo-item:active .logo-icon img {
    transform: scale(0.96);
}

.logo-name {
    font-size: 12px;
    color: #333;
    text-align: center;
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 500;
}

/* 统一验证徽章样式 */
.verify-badge {
    position: absolute;
    right: 4px;
    bottom: 4px;
    width: 14px;
    height: 14px;
    background: #52c41a;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 8px;
    border: 1px solid #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    z-index: 1;
}

/* 模态框样式调整 */
.modal {
    z-index: 1000;
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.modal.show {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    width: 90%;
    max-width: 350px;
    max-height: 90vh;
    background-color: #fff;
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    position: relative;
    overflow-y: auto;
    padding: 16px;
    box-sizing: border-box;
    transform: translateY(0);
    animation: scaleIn 0.3s ease;
}

.photo-modal-content {
    padding: 0;
    overflow: hidden;
}

/* 弹窗内容样式 */
.logo-header {
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #f0f0f0;
}

.logo-name {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.logo-content {
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.logo-image-wrapper {
    width: 180px;
    height: 180px;
    max-width: 100%;
    background-color: #f9f9f9;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 8px;
    overflow: hidden;
}

.logo-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.logo-info {
    width: 100%;
    text-align: center;
}

.logo-desc {
    font-size: 14px;
    color: #666;
    margin-bottom: 12px;
    line-height: 1.5;
    max-height: 80px;
    overflow-y: auto;
}

.logo-stats {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-top: 8px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #666;
}

.stat-item i {
    color: #1677ff;
    font-size: 16px;
}

.follow-btn {
    width: 100%;
    padding: 12px;
    background: #1677ff;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 12px rgba(22, 119, 255, 0.2);
    transition: all 0.3s ease;
}

.follow-btn:active {
    transform: translateY(2px);
    box-shadow: 0 2px 8px rgba(22, 119, 255, 0.1);
}

.follow-tip {
    font-size: 12px;
    color: #999;
    margin-top: 8px;
    text-align: center;
}

/* 搜索模态框样式 */
.search-modal-content {
    padding: 0;
    width: 90%;
    max-width: 350px;
    max-height: 80vh;
}

.search-header {
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid #f0f0f0;
}

.search-input {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
    background: #f5f5f5;
    border-radius: 8px;
    padding: 8px 12px;
}

.search-input .search-icon {
    font-size: 16px;
    color: #999;
    margin-right: 8px;
}

.search-input input {
    border: none;
    outline: none;
    background: transparent;
    font-size: 14px;
    width: 100%;
    color: #333;
}

.clear-icon {
    color: #999;
    cursor: pointer;
}

.search-content {
    padding: 12px 16px;
    max-height: calc(80vh - 60px);
    overflow-y: auto;
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes scaleIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* 搜索框样式增强 */
.search-container {
    padding: 0 12px;
    margin-top: 10px; /* 改为正值，放在品牌标题下方 */
    position: relative;
    z-index: 2;
    width: 100%;
    box-sizing: border-box;
}

.search-bar {
    display: flex;
    align-items: center;
    background: #fff;
    border-radius: 28px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    padding: 8px 14px;
    width: 100%;
    box-sizing: border-box;
}

.search-icon {
    color: #1677ff;
    font-size: 20px;
    margin-right: 10px;
}

.search-input {
    border: none;
    outline: none;
    font-size: 14px;
    flex: 1;
    background: transparent;
    color: #666;
}

.search-input::placeholder {
    color: #bbb;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 适配小屏幕设备 */
@media screen and (max-width: 360px) {
    .brand-title {
        padding: 14px 12px 15px;
    }
    
    .text-animate {
        font-size: 18px;
        letter-spacing: 0.3px;
    }
    
    .brand-slogan {
        font-size: 11px;
    }
    
    .search-container {
        margin-top: 8px;
    }
    
    .search-bar {
        padding: 8px 14px;
    }
    
    .search-icon {
        font-size: 18px;
    }
    
    .search-input {
        font-size: 13px;
    }
}

/* 底部导航栏适配 */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .partner-page {
        padding-bottom: calc(70px + env(safe-area-inset-bottom));
    }
}

/* 夜间模式 */
@media (prefers-color-scheme: dark) {
    .partner-page {
        background: #121212;
    }
    
    .section-title {
        color: #f0f0f0;
    }
    
    .photo-item {
        background: #222;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    }
    
    .photo-title {
        color: #e0e0e0;
    }
    
    .photo-desc {
        color: #aaa;
    }
    
    .filter-tag {
        background: rgba(40, 40, 40, 0.8);
        color: #bbb;
    }
    
    .filter-tag.active {
        background: #ff758c;
        color: #fff;
        box-shadow: 0 3px 8px rgba(255, 117, 140, 0.2);
    }
    
    .filter-label {
        color: #bbb;
    }
    
    .tab-header.active {
        color: #ff758c;
    }
    
    .tab-header.active::after {
        background: #ff758c;
    }
    
    .logo-name {
        color: #e0e0e0;
    }
    
    .logo-header {
        border-bottom: 1px solid #2a2a2a;
    }
    
    .logo-desc {
        color: #bbb;
    }
    
    .photo-badge {
        background: #ff758c;
    }
    
    .photo-tag {
        background: rgba(255, 117, 140, 0.15);
        color: #ff758c;
    }
    
    .photo-meta i {
        color: #ff758c;
    }
    
    .stat-item {
        color: #aaa;
    }
    
    .stat-item i {
        color: #ff758c;
    }
    
    .follow-btn {
        background: linear-gradient(135deg, #ff5a5f, #ff758c);
        box-shadow: 0 4px 10px rgba(255, 90, 95, 0.2);
    }
    
    .follow-btn:active {
        box-shadow: 0 2px 5px rgba(255, 90, 95, 0.1);
    }
    
    .follow-tip {
        color: #888;
    }
    
    .section-title::after {
        background: linear-gradient(90deg, #ff5a5f, #ff758c);
    }
    
    .result-name {
        color: #e0e0e0;
    }
    
    .result-type {
        background: rgba(255, 117, 140, 0.15);
        color: #ff758c;
    }
    
    .search-result-item {
        border-bottom: 1px solid #2a2a2a;
    }
    
    .tip-item {
        background: #2a2a2a;
        color: #aaa;
    }
    
    .tip-item:active {
        background: #333;
    }
    
    .no-result-icon {
        background: #2a2a2a;
    }
    
    .no-result-icon i {
        color: #666;
    }
    
    .no-result-text {
        color: #888;
    }

    .header-media-name.fancy-text {
        background: linear-gradient(to right, #ff758c, #ffbaa6, #ff758c);
        background-size: 200% auto;
        background-clip: text;
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
    }

    .header-media-name.glowing-text {
        color: #fff;
        text-shadow: 0 0 5px #ff758c, 0 0 10px #ff758c, 0 0 15px #ff758c;
    }

    .header-media-name.cyber-text {
        color: #1eff00;
        text-shadow: 0 0 2px rgba(30, 255, 0, 0.8);
    }
}

/* 小屏幕设备弹窗适配 */
@media screen and (max-width: 320px) {
    .logo-image-wrapper {
        width: 150px;
        height: 150px;
    }
    
    .modal-content {
        width: 95%;
        padding: 12px;
    }
    
    .logo-header {
        padding: 12px;
    }
    
    .logo-content {
        padding: 12px;
        gap: 12px;
    }
    
    .logo-name {
        font-size: 16px;
    }
    
    .logo-desc {
        font-size: 13px;
    }
    
    .follow-btn {
        padding: 10px;
        font-size: 15px;
    }
    
    .search-modal-content {
        max-height: 85vh;
    }
}

/* 动画定义 */
@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

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

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

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

/* 改进头部媒体图标加载错误时的样式 */
.header-media-icon.error {
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(145deg, #f5f5f5, #e0e0e0);
    border-radius: 50%;
    position: relative;
}

.header-media-icon.error::after {
    content: attr(data-name);
    font-size: 20px;
    font-weight: bold;
    color: #999;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.1);
}

/* 为头部媒体图标添加悬停效果 */
.header-media-icon {
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
}

.header-media-icon:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

.header-media-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0);
    transition: background 0.3s ease;
    z-index: 1;
    border-radius: 50%;
}

.header-media-icon:hover::before {
    background: rgba(255, 255, 255, 0.2);
}

/* 优化照片项的悬停效果 */
.photo-item {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.photo-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

/* 改进照片标题显示 */
.photo-title {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
} 