/* ============================================
   Usersafe · 首页样式
   ============================================ */

/* ---------- 广告横幅 ---------- */
#adarea {
    display: flex;
    gap: 20px;
    margin-bottom: 40px;
}

/* ============================================
   主广告位 - 轮播
   ============================================ */
#adarea_left {
    flex: 2;
    border-radius: 24px;
    overflow: hidden;
    height: 200px;
    position: relative;
    background: #0b1a2f;
}

.carousel-track {
    width: 100%;
    height: 100%;
    position: relative;
}

.ad-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.6s ease;
    z-index: 1;
    background: #0b1a2f;  /* 背景色防止透明 */
}

.ad-slide.active {
    opacity: 1;
    z-index: 2;
}

.ad-slide a,
.ad-slide img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;  /* 图片覆盖整个区域 */
}


/* 广告装饰图标 */
.ad-decoration {
    position: absolute;
    right: 40px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 80px;
    opacity: 0.08;
    color: #ffffff;
    pointer-events: none;
}

/* ---------- 轮播控制器 ---------- */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #ffffff;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    opacity: 0;
    pointer-events: none;
}

#adarea_left:hover .carousel-btn {
    opacity: 1;
    pointer-events: auto;
}

.carousel-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-50%) scale(1.05);
}

.carousel-btn.prev {
    left: 16px;
}

.carousel-btn.next {
    right: 16px;
}

.carousel-btn i {
    font-size: 14px;
}

/* ---------- 轮播指示器 ---------- */
.carousel-dots {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.carousel-dots .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-dots .dot.active {
    background: #ffffff;
    width: 24px;
    border-radius: 4px;
}

.carousel-dots .dot:hover {
    background: rgba(255, 255, 255, 0.6);
}

/* ---------- 自动播放进度条 ---------- */
.carousel-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(255, 255, 255, 0.1);
    z-index: 5;
    overflow: hidden;
}

.carousel-progress .progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #fbbf24, #f59e0b);
    border-radius: 0 2px 2px 0;
    transition: width 0.1s linear;
}

/* ========================================
   右侧广告位
   ======================================== */
#adarea_right {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.side-ad {
    flex: 1;
    border-radius: 20px;
    overflow: hidden;
    transition: transform 0.2s ease;
}

.side-ad:hover {
    transform: scale(1.01);
}

.side-ad-content {
    width: 100%;
    height: 100%;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    color: #ffffff;
}

.side-ad-content .side-icon {
    font-size: 28px;
    opacity: 0.5;
    flex-shrink: 0;
}

.side-ad-content > div {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.side-ad-content .side-title {
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
}

.side-ad-content .side-desc {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.65);
}

.side-ad-content .side-btn {
    font-size: 12px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
    padding: 4px 12px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.1);
    transition: all 0.2s ease;
    white-space: nowrap;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.side-ad-content .side-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

/* ---------- 列表区域 ---------- */
.list_area {
    margin-bottom: 48px;
}

.list_header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 20px;
    border-bottom: 1px solid #edf2f7;
    padding-bottom: 12px;
}

.header_title {
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -0.3px;
    color: #0b1a2f;
}

.header_more a {
    font-size: 14px;
    color: #5e6f8d;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: color 0.15s;
}

.header_more a:hover {
    color: #0b1a2f;
}

.header_more a i {
    font-size: 12px;
}

/* ---------- 两列卡片网格 ---------- */
.list_grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.list_item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 18px;
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #f1f4f9;
    transition: all 0.2s ease;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.list_item:hover {
    border-color: #0b1a2f;
    background: #fafcff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    transform: translateY(-2px);
}

.item_img {
    width: 52px;
    height: 52px;
    background: #f1f4f9;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.item_img img {
    width: 52px;
    height: 52px;
    object-fit: contain;
}

.item_info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.item_info h3 {
    font-size: 15px;
    font-weight: 600;
    color: #0b1a2f;
    letter-spacing: -0.2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.item_info p {
    font-size: 13px;
    color: #5e6f8d;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ---------- 响应式 ---------- */
@media (max-width: 1024px) {
    .ad-slide .ad-content h2 {
        font-size: 22px;
    }

    .ad-decoration {
        font-size: 60px;
        right: 20px;
    }

    .ad-slide .ad-content {
        padding: 24px 30px;
    }
}

@media (max-width: 768px) {
    #adarea {
        flex-direction: column;
    }

    #adarea_left {
        height: 180px;
    }

    .carousel-btn {
        width: 28px;
        height: 28px;
        opacity: 0.6;
        pointer-events: auto;
    }

    .carousel-btn.prev {
        left: 8px;
    }

    .carousel-btn.next {
        right: 8px;
    }

    .carousel-btn i {
        font-size: 12px;
    }

    .ad-slide .ad-content {
        padding: 20px 24px;
    }

    .ad-slide .ad-content h2 {
        font-size: 18px;
    }

    .ad-slide .ad-content p {
        font-size: 13px;
    }

    .ad-slide .ad-content .ad-btn {
        font-size: 12px;
        padding: 6px 18px;
    }

    .ad-decoration {
        font-size: 40px;
        right: 12px;
    }

    .carousel-dots .dot {
        width: 6px;
        height: 6px;
    }

    .carousel-dots .dot.active {
        width: 18px;
    }

    #adarea_right {
        flex-direction: row;
        height: 80px;
    }

    .side-ad-content {
        padding: 12px 16px;
    }

    .side-ad-content .side-icon {
        font-size: 20px;
    }

    .side-ad-content .side-title {
        font-size: 12px;
    }

    .side-ad-content .side-desc {
        font-size: 11px;
    }

    .side-ad-content .side-btn {
        font-size: 11px;
        padding: 2px 10px;
    }

    .list_grid {
        grid-template-columns: 1fr;
    }

    .list_item {
        padding: 14px;
    }

    .item_info h3 {
        font-size: 14px;
    }

    .item_info p {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    #adarea_left {
        height: 160px;
        border-radius: 16px;
    }

    .ad-slide .ad-content h2 {
        font-size: 16px;
    }

    .ad-slide .ad-content p {
        font-size: 12px;
        margin-bottom: 10px;
    }

    .ad-slide .ad-content .ad-badge {
        font-size: 10px;
        padding: 2px 12px;
    }

    .ad-slide .ad-content .ad-btn {
        font-size: 11px;
        padding: 4px 14px;
    }

    #adarea_right {
        height: 60px;
        gap: 8px;
    }

    .side-ad-content .side-icon {
        font-size: 16px;
    }

    .side-ad-content .side-title {
        font-size: 11px;
    }

    .side-ad-content .side-desc {
        font-size: 10px;
    }

    .side-ad-content .side-btn {
        font-size: 10px;
        padding: 2px 8px;
    }

    .carousel-dots {
        bottom: 10px;
        gap: 6px;
    }
}