/**
 * 图片轮播组件样式
 * 支持响应式设计，适配不同屏幕尺寸
 */

/* 容器 */
.carousel-container {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    background: linear-gradient(180deg, #0f0f1a 0%, #1a1a2e 50%, #0f0f1a 100%);
}

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

/* 移动端内容默认隐藏（PC端不显示） */
.mobile-content {
    display: none;
}

/* 加载指示器 */
.carousel-loading {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #0f0f1a;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.3s ease;
    overflow: hidden;
}

/* 加载完成后隐藏 */
.carousel-loading.hidden {
    display: none !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* 移动端加载指示器 */
@media (max-width: 768px) {
    .carousel-loading {
        background: #e8f4fc !important;
    }
}

.carousel-loading .loading-bg {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: url('../页面加载图手机.jpg') center / cover no-repeat !important;
    opacity: 0.8 !important;
}

.carousel-loading .loading-content {
    position: relative !important;
    z-index: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid #ffca61 !important;
    border-top-color: transparent !important;
    border-radius: 50% !important;
    animation: spin 0.8s linear infinite !important;
    margin-bottom: 15px !important;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-text {
    color: #fff !important;
    font-size: 16px !important;
    margin-bottom: 15px !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5) !important;
}

/* 进度条 */
.loading-progress-container {
    width: 200px !important;
    height: 6px !important;
    background: rgba(255, 255, 255, 0.2) !important;
    border-radius: 3px !important;
    overflow: hidden !important;
    margin-bottom: 10px !important;
}

.loading-progress-bar {
    height: 100% !important;
    background: linear-gradient(90deg, #ffca61, #ff9f43) !important;
    border-radius: 3px !important;
    transition: width 0.3s ease !important;
    width: 0% !important;
}

.loading-percent {
    color: #ffca61 !important;
    font-size: 14px !important;
    font-weight: bold !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5) !important;
}

/* 轮播内容区 */
.carousel-slides {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.carousel-track {
    display: flex;
    height: 100%;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.carousel-slide {
    flex-shrink: 0;
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--slide-bg, #1a1a2e);
}

.carousel-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    position: absolute;
    top: 0;
    left: 0;
    display: block;
    opacity: 1;
    transition: transform 0.8s ease;
}

.carousel-slide.active .carousel-image {
    transform: scale(1.02);
}

/* 名字图 */
.carousel-name {
    position: absolute;
    left: 30px;
    bottom: 120px;
    z-index: 10;
    width: auto;
    max-height: 80px;
    object-fit: contain;
    pointer-events: none;
}

@media (max-width: 768px) {
    .carousel-name {
        position: absolute !important;
        bottom: 20px !important;
        left: 15px !important;
        max-height: 50px !important;
        width: auto !important;
        z-index: 20 !important;
        object-fit: contain !important;
        pointer-events: none;
    }
}

@media (max-width: 480px) {
    .carousel-name {
        left: 15px;
        bottom: 90px;
        height: 50px;
    }
}

/* 导航按钮 */
.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    z-index: 50;
}

.carousel-nav:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-50%) scale(1.1);
    border-color: rgba(255, 255, 255, 0.4);
}

.carousel-nav:active {
    transform: translateY(-50%) scale(0.95);
}

.carousel-nav svg {
    width: 24px;
    height: 24px;
}

.carousel-prev {
    left: 30px;
}

.carousel-next {
    right: 30px;
}

/* 底部控制区 */
.carousel-controls {
    position: absolute;
    bottom: 90px;
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    z-index: 50;
}

/* 计数器 */
.carousel-counter {
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-family: 'Noto Serif SC', serif;
    font-size: 18px;
    font-weight: normal;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    letter-spacing: 2px;
}

.carousel-counter .current {
    font-size: 22px;
}

/* 指示器（圆形小图） */
.carousel-dots-wrapper {
    width: 100%;
    overflow: hidden;
}

.carousel-dots {
    display: flex;
    gap: 15px;
    padding: 10px 20px;
    justify-content: center;
}

.carousel-dot {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
    flex-shrink: 0;
}

.carousel-dot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-dot:hover {
    border-color: rgba(255, 255, 255, 0.6);
    transform: scale(1.15);
}

.carousel-dot.active {
    border-color: white;
    transform: scale(1.3);
    box-shadow: 0 0 25px rgba(255, 255, 255, 0.7);
    z-index: 10;
}

/* 移动端内容区 */
.mobile-content {
    width: 100%;
    padding: 0;
}

/* 移动端列表视图 */
@media (max-width: 768px) {
    .carousel-container {
        height: auto !important;
        min-height: calc(100vh - 120px) !important;
        background: #e8f4fc !important;
        padding: 0 !important;
    }
    
    .carousel-slides,
    .carousel-controls,
    .carousel-nav,
    .resonance-card-bg,
    .carousel-wrapper,
    .carousel-join-btn {
        display: none !important;
    }
    
    /* 移动端加载指示器 */
    .carousel-loading {
        display: flex !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        background: #e8f4fc !important;
        z-index: 9999 !important;
        overflow: hidden !important;
    }
    
    .carousel-loading .loading-bg {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        background: url('../页面加载图手机.jpg') center / cover no-repeat !important;
        opacity: 0.8 !important;
    }
    
    .carousel-loading .loading-content {
        position: relative !important;
        z-index: 1 !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    .carousel-loading .loading-spinner {
        width: 40px !important;
        height: 40px !important;
        border: 3px solid #ffca61 !important;
        border-top-color: transparent !important;
        border-radius: 50% !important;
        animation: spin 0.8s linear infinite !important;
        margin-bottom: 15px !important;
    }
    
    .carousel-loading .loading-text {
        margin-top: 0 !important;
        font-size: 16px !important;
        color: #333 !important;
        margin-bottom: 15px !important;
    }
    
    .carousel-loading .loading-progress-container {
        width: 200px !important;
        height: 6px !important;
        background: rgba(0, 0, 0, 0.1) !important;
        border-radius: 3px !important;
        overflow: hidden !important;
        margin-bottom: 10px !important;
    }
    
    .carousel-loading .loading-progress-bar {
        height: 100% !important;
        background: linear-gradient(90deg, #ffca61, #ff9f43) !important;
        border-radius: 3px !important;
        transition: width 0.3s ease !important;
    }
    
    .carousel-loading .loading-percent {
        color: #ff9f43 !important;
        font-size: 14px !important;
        font-weight: bold !important;
    }
    
    .mobile-content {
        display: block !important;
        width: 100% !important;
        position: relative !important;
        padding: 15px !important;
    }
    
    /* 筛选区域 */
    .resonance-filter-section {
        padding: 20px 0 !important;
        margin-bottom: 15px !important;
        border-bottom: 1px solid rgba(0,0,0,0.05) !important;
    }
    
    .resonance-filter-row {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 6px !important;
        margin-bottom: 2px !important;
    }
    
    .resonance-filter-row:last-child {
        margin-bottom: 0 !important;
    }
    
    .resonance-filter-tag {
        padding: 5px 12px !important;
        border-radius: 15px !important;
        font-size: 12px !important;
        background: #fff !important;
        border: 1px solid rgba(0,0,0,0.08) !important;
        color: #666 !important;
        cursor: pointer !important;
        transition: all 0.2s ease !important;
    }
    
    .resonance-filter-tag.active {
        background: #ff9f43 !important;
        border-color: #ff9f43 !important;
        color: #fff !important;
    }
    
    /* 卡片列表 - 3列布局 */
    .resonance-list {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 8px !important;
        max-height: calc(100vh - 220px) !important;
        overflow-y: auto !important;
        background: transparent !important;
    }
    
    .resonance-list-item {
        background: transparent !important;
        border-radius: 0 !important;
        position: relative !important;
        aspect-ratio: 2/3 !important;
        cursor: pointer !important;
        overflow: hidden !important;
        border: none !important;
        box-shadow: none !important;
        padding: 0 !important;
    }
    
    .resonance-list-item:active {
        opacity: 0.7 !important;
        transform: scale(0.98) !important;
    }
    
    /* 角色图片 - 完整显示3240*3240分辨率 */
    .resonance-list-item-thumb {
        width: 100% !important;
        height: 100% !important;
        object-fit: contain !important;
        object-position: center center !important;
        padding: 0 !important;
        border-radius: 0 !important;
        border: none !important;
        background: transparent !important;
    }
    
    /* 响应式调整 */
    @media (max-width: 360px) {
        .resonance-list {
            gap: 5px !important;
        }
        .resonance-filter-tag {
            padding: 4px 10px !important;
            font-size: 11px !important;
        }
    }
}
/* 右下角入口按钮 - 相对于轮播容器定位 */
.carousel-join-btn {
    position: absolute;
    bottom: 120px;
    right: 30px;
    z-index: 60;
}

.join-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: rgba(107, 77, 242, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 30px;
    color: white;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(107, 77, 242, 0.4);
}

.join-link:hover {
    transform: translateY(-3px) scale(1.05);
    background: rgba(107, 77, 242, 1);
    box-shadow: 0 8px 30px rgba(107, 77, 242, 0.6);
}

.join-icon {
    font-size: 16px;
}

.join-text {
    letter-spacing: 1px;
}

@media (max-width: 768px) {
    .carousel-join-btn {
        bottom: 120px;
        right: 20px;
    }
    
    .join-link {
        padding: 10px 20px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .carousel-join-btn {
        bottom: 100px;
        right: 15px;
    }
    
    .join-link {
        padding: 8px 16px;
        font-size: 12px;
    }
}

/* 触摸设备优化 */
@media (hover: none) {
    .carousel-nav:hover {
        transform: translateY(-50%);
    }
    
    .carousel-dot:hover {
        transform: none;
    }
}

/* 移除商业字体，使用免费可商用字体 */
/* Noto Serif SC 和 Noto Sans SC 来自 Google Fonts，完全免费可商用 */
/* 授权说明：SIL Open Font License (OFL)，可免费用于个人和商业项目 */

/* 家园共享进入系统按钮 */
.system-entry-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 50px;
    background: url('../p4_more_icon.png') no-repeat center center;
    background-size: cover;
    border: none;
    border-radius: 50px;
    color: white;
    text-decoration: none;
    font-size: 24px;
    font-family: 'Noto Serif SC', sans-serif;
    font-weight: normal;
    letter-spacing: 2px;
    box-shadow: none;
    transition: all 0.3s ease;
    min-width: 300px;
    min-height: 80px;
}

.system-entry-btn:hover {
    transform: translate(-50%, -50%) scale(1.1);
}

.system-entry-btn .btn-text {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 100%;
    text-align: center;
    margin-top: -10px;
}

@media (max-width: 768px) {
    .system-entry-btn {
        padding: 16px 40px;
        font-size: 20px;
        min-width: 250px;
        min-height: 70px;
    }
}

@media (max-width: 480px) {
    .system-entry-btn {
        padding: 14px 30px;
        font-size: 16px;
        min-width: 200px;
        min-height: 60px;
    }
}