/**
 * index.css
 * 首页特定的CSS样式
 */

/* 顶部广告轮播图样 */
.topad {
    margin: 20px auto;
    overflow: hidden;
}

.inner.container.topad {
    width: 1200px;
    max-width: 100%;
    padding: 0 10px;
    box-sizing: border-box;
}

/* 首页主广告区域样式优?- 添加左右边距与下方内容对 */
.inner.container.mainad {
    width: 1200px;
    max-width: 100%;
    padding: 0 10px;
    box-sizing: border-box;
    margin-bottom: 20px;
}

/* 仅首页底部广告容器：与 footer 贴近，缩小下外边距 */
.inner.container.mainad.mainad-bottom {
    margin-top: 6px !important;
    margin-bottom: -4px !important;
}

/* 确保flexslider容器与其他模块对 */
.topad .flexslider,
.mainad .flexslider,
.mainad .bottom-slider {
    margin: 0;
    border: none;
    background: transparent;
    overflow: visible !important;
}

/* 确保广告轮播图图片容器无留白 */
.mainad .bottom-slider.flexslider .slides,
.mainad .flexslider .slides {
    margin: 0;
    padding: 0;
}

.mainad .bottom-slider.flexslider .slides li,
.mainad .flexslider .slides li {
    margin: 0;
    padding: 0;
    background: transparent;
    line-height: 0;
    font-size: 0;
}

.mainad .bottom-slider.flexslider .slides li a,
.mainad .flexslider .slides li a {
    display: block;
    line-height: 0;
    font-size: 0;
    margin: 0;
    padding: 0;
}

.mainad .bottom-slider.flexslider .slides img,
.mainad .flexslider .slides img {
    width: 100%;
    height: auto;
    display: block;
    margin: 0;
    padding: 0;
}

/* 隐藏背景模糊 */
.mainad .bottom-slider.flexslider .slides .image-bg,
.mainad .flexslider .slides .image-bg {
    display: none;
}

/* 确保图片容器不会产生额外空白 */
.topad .flexslider .slides>li a {
    display: block;
    font-size: 0;
    line-height: 0;
}

/* 确保图片正确显示 */
.topad .flexslider .slides img {
    width: 100%;
    height: auto;
    display: block;
    margin: 0;
    padding: 0;
}

/* 重置flexslider默认样式 - 隐藏分页指示 */
.topad .flex-control-nav,
.bottom-slider .flex-control-nav {
    display: none !important;
}

/* 完全隐藏flexslider导航文本和箭 */
.flexslider .flex-direction-nav {
    display: none !important;
}

/* 确保容器宽度计算正确 */
.topad .flex-viewport {
    overflow: hidden;
    position: relative;
}

/* 确保所有广告轮播图元素无留?*/
.topad .flexslider .slides li,
.mainad .flexslider .slides li,
.mainad .bottom-slider .slides li {
    position: relative;
    overflow: hidden;
    line-height: 0;
    font-size: 0;
    margin: 0;
    padding: 0;
}

.topad .flexslider .slides,
.mainad .flexslider .slides,
.mainad .bottom-slider .slides {
    zoom: 1;
    margin: 0;
    padding: 0;
}

.topad .flexslider .slides>li,
.mainad .flexslider .slides>li,
.mainad .bottom-slider .slides>li {
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    margin: 0;
    padding: 0;
    position: relative;
}

.topad .flexslider .slides>li:first-child {
    display: block;
}

/* 底部广告容器：仅显示当前激活项，禁止首帧常显 */
.mainad-bottom .bottom-slider.flexslider {
    height: 123px;
    overflow: hidden;
    position: relative;
}

.mainad-bottom .bottom-slider.flexslider .flex-viewport {
    height: 123px;
    overflow: hidden;
    position: relative;
}

.mainad-bottom .bottom-slider.flexslider .slides {
    height: 123px;
    overflow: hidden;
    position: relative;
}

/* 修复：强制显示所有幻灯片，让插件通过opacity控制切换(fade模式) */
.mainad-bottom .bottom-slider.flexslider .slides>li {
    display: block !important;
    position: absolute !important;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    z-index: 1;
}

.mainad-bottom .bottom-slider.flexslider .slides>li:first-child {
    opacity: 1;
    z-index: 2;
}

/* 导航箭头样式 */
.topad .flex-direction-nav a {
    height: 30px;
    color: rgba(255, 255, 255, 0.8);
    text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.3);
    margin-top: -15px;
}

.topad .flex-direction-nav a:before {
    font-size: 30px;
    color: rgba(255, 255, 255, 0.8);
    text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.3);
}

.topad .flex-direction-nav .flex-prev {
    left: 0;
}

.topad .flex-direction-nav .flex-next {
    right: 0;
}

/* 返回顶部按钮样式 */
.fixed-widget {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.fixed-widget.show {
    opacity: 1;
    pointer-events: auto;
}

.fixed-widget ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.fixed-widget li {
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fixed-widget li:hover {
    background: rgba(0, 0, 0, 0.8);
}

.fixed-widget i {
    font-size: 22px;
    line-height: 1;
    transform: translateY(-2px);
    display: block;
}

/* ========== 直播预告模块样式 ========== */
.live-preview-content {
    padding: 8px 0 8px;
    max-width: 304px;
    margin: 0 auto;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
}

.live-info-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: linear-gradient(135deg, rgba(33, 150, 243, 0.08) 0%, rgba(66, 165, 245, 0.12) 100%);
    border-radius: 6px;
    overflow: hidden;
    border: 2px solid rgba(33, 150, 243, 0.2) !important;
}

/* 覆盖全局表格样式 - 彻底清除灰色边框 */
.live-info-table td {
    border: none !important;
}

.live-info-row {
    position: relative;
    transition: background-color 0.3s ease;
}

/* 使用伪元素创建底边框 */
.live-info-row:not(:last-child)::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: rgba(33, 150, 243, 0.2);
    z-index: 1;
}

.live-info-row:hover {
    background-color: rgba(33, 150, 243, 0.08);
}

.live-info-cell {
    padding: 10px 8px;
    vertical-align: middle;
}

/* 只为非最后一列添加右边框 */
.live-info-cell:not(:last-child) {
    border-right: 2px solid rgba(33, 150, 243, 0.2) !important;
}

.live-info-cell.icon-cell {
    width: 30px;
    text-align: center;
    padding-right: 12px;
}

.live-info-cell.label-cell {
    width: 70px;
    padding-right: 8px;
}

.live-info-cell.value-cell {
    padding-left: 12px;
}

/* 图标样式 */
.live-icon {
    color: var(--icon-color, #42a5f5);
    font-size: 15px;
    transition: color 0.3s ease;
    display: inline-block;
}

.live-info-row:hover .live-icon {
    color: var(--primary-color, #2196f3);
}

/* 标签样式 */
.live-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary, #546e7a);
    white-space: nowrap;
}

/* 值样?*/
.live-value {
    font-size: 13px;
    color: var(--text-primary, #263238);
    font-weight: 600;
    line-height: 1.4;
    word-break: break-word;
}

/* 直播链接特殊样式 */
.live-link {
    display: inline-flex;
    align-items: center;
    padding: 5px 12px;
    background: var(--primary-color, #2196f3);
    color: #fff !important;
    text-decoration: none;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    height: 26px;
    box-sizing: border-box;
}

.live-link:hover {
    background: var(--primary-color, #2196f3);
    transform: none;
    box-shadow: none;
    color: #fff !important;
}

.live-link:active {
    transform: translateY(0);
}

/* 深色主题适配 */
[data-theme="dark"] .live-preview-content,
body.dark-theme .live-preview-content {
    background: transparent;
    border: none;
    box-shadow: none;
}

[data-theme="dark"] .live-info-table,
body.dark-theme .live-info-table {
    background: linear-gradient(135deg, rgba(66, 165, 245, 0.12) 0%, rgba(129, 212, 250, 0.08) 100%);
    border-color: rgba(66, 165, 245, 0.25);
}

[data-theme="dark"] .live-info-row:not(:last-child)::after,
body.dark-theme .live-info-row:not(:last-child)::after {
    background: rgba(66, 165, 245, 0.25);
}

[data-theme="dark"] .live-info-cell,
body.dark-theme .live-info-cell {
    border-right-color: rgba(66, 165, 245, 0.25) !important;
}

[data-theme="dark"] .live-info-row:hover,
body.dark-theme .live-info-row:hover {
    background-color: rgba(66, 165, 245, 0.15);
}

[data-theme="dark"] .live-icon,
body.dark-theme .live-icon {
    color: var(--dark-icon-color, #81d4fa);
}

[data-theme="dark"] .live-info-row:hover .live-icon,
body.dark-theme .live-info-row:hover .live-icon {
    color: var(--primary-color, #42a5f5);
}

[data-theme="dark"] .live-label,
body.dark-theme .live-label {
    color: var(--dark-text-secondary, #b0bec5);
}

[data-theme="dark"] .live-value,
body.dark-theme .live-value {
    color: var(--dark-text-primary, #eceff1);
}

[data-theme="dark"] .live-link,
body.dark-theme .live-link {
    background: var(--primary-color, #42a5f5);
}

[data-theme="dark"] .live-link:hover,
body.dark-theme .live-link:hover {
    background: var(--primary-hover, #29b6f6);
}


/* ========== 一键三连侧边栏模块样式 ========== */
/* 友情链接侧边栏容 - 优化上下间距 */
.friendlink-widget {
    padding: 8px 8px 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

/* 友情链接项目 - 深蓝灰科技风格 */
.friendlink-item {
    display: flex;
    align-items: center;
    padding: 6px 8px;
    width: calc(50% - 2px);
    background: linear-gradient(135deg, #4a5568 0%, #2c5282 100%);
    border-radius: 4px;
    color: #fff !important;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(44, 82, 130, 0.3);
    min-height: 28px;
    box-sizing: border-box;
}

/* 鼠标悬停效果 - 深蓝渐变 */
.friendlink-item:hover {
    transform: translateY(-1px) scale(1.01);
    background: linear-gradient(135deg, #4a5a6e 0%, #1e3a8a 100%);
    box-shadow: 0 3px 8px rgba(30, 58, 138, 0.4);
    color: #fff !important;
}

/* 链接图标 - 去掉圆形边框，增大图标尺 */
.link-icon {
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 8px;
    font-size: 26px;
    transition: all 0.3s ease;
    flex-shrink: 0;
    color: #fff;
}

.friendlink-item:hover .link-icon {
    transform: scale(1.1);
}

/* 社交图标特殊样式 - 适应新的大小 */
.link-icon .social-icon {
    width: 26px;
    height: 26px;
    display: block;
}

/* 链接文本样式 */
.link-text {
    flex: 1;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.3px;
    transition: transform 0.3s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #fff !important;
}

.friendlink-item:hover .link-text {
    transform: translateX(1px);
}

/* 箭头图标统一样式 */
.link-arrow {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    opacity: 0.7;
    transition: all 0.3s ease;
    color: #fff;
}

.friendlink-item:hover .link-arrow {
    opacity: 1;
    transform: translateX(3px);
}

/* 科技风泽光动画效 */
.friendlink-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    transition: left 0.6s ease;
}

.friendlink-item:hover::before {
    left: 100%;
}

/* 点击效果 */
.friendlink-item:active {
    transform: translateY(0) scale(0.98);
}

/* 响应式设 - 统一蓝色风格 */

/* 加载动画 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.friendlink-item {
    animation: fadeInUp 0.6s ease forwards;
}

.friendlink-item:nth-child(1) {
    animation-delay: 0.1s;
}

.friendlink-item:nth-child(2) {
    animation-delay: 0.2s;
}

.friendlink-item:nth-child(3) {
    animation-delay: 0.3s;
}

.friendlink-item:nth-child(4) {
    animation-delay: 0.4s;
}

.friendlink-item:nth-child(5) {
    animation-delay: 0.5s;
}

.friendlink-item:nth-child(6) {
    animation-delay: 0.6s;
}

.friendlink-item:nth-child(7) {
    animation-delay: 0.7s;
}

.friendlink-item:nth-child(8) {
    animation-delay: 0.8s;
}

.friendlink-item:nth-child(9) {
    animation-delay: 0.9s;
}

.friendlink-item:nth-child(n+10) {
    animation-delay: 1s;
}

/* ========================================
   我的圈子侧边栏样式
   ======================================== */
.widget.asklist {
    border-radius: 0;
}

.widget.asklist ul {
    padding: 8px 10px;
    width: 100%;
}

.widget.asklist ul li {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    border: none;
    position: relative;
    padding: 6px 0;
    width: 100%;
}

.widget.asklist ul li+li {
    border-top: 1px solid #f0f0f0;
}

.widget.asklist .recom-tag {
    display: inline-block;
    background: transparent;
    color: #ff6b6b;
    font-size: 0.55em;
    padding: 0 4px;
    border: 1px solid #ff6b6b;
    border-radius: 2px;
    font-weight: 500;
    white-space: nowrap;
    letter-spacing: 0.2px;
    line-height: 1.4;
    flex-shrink: 0;
}

.widget.asklist a {
    color: #2c3e50;
    text-decoration: none;
    font-size: 1.05em;
    font-weight: 700;
    line-height: 1.6;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.3s ease;
    display: block;
    flex: 1;
    box-sizing: border-box;
}

.widget.asklist a:hover {
    color: #007bff;
}