/* ===== 大图预览模态框 ===== */
.image-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.95) 0%, rgba(20, 20, 20, 0.95) 100%);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.image-modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: transparent;
    overflow: visible;
}

.modal-media {
    position: relative;
    border-radius: 18px;
    overflow: hidden;
}

.modal-image {
    display: block;
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 18px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
    animation: modalZoomIn 0.5s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
    opacity: 0;
    transform: scale(0.9);
}

@keyframes modalZoomIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ===== 关闭按钮 - 确保在最上层 ===== */
.close-modal {
    position: absolute;
    top: -15px;
    right: -15px;
    width: 30px;
    height: 30px;
    background: rgba(30, 30, 30, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    color: #ffffff;
    font-size: 28px;
    font-weight: 300;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1002; /* 增加z-index，确保在最上层 */
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}


/* ===== 图片信息 - 调整布局 ===== */
.modal-info {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between; /* 左右分开 */
    align-items: center;
    padding: 25px 30px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.96) 0%, rgba(0, 0, 0, 0.78) 46%, rgba(0, 0, 0, 0) 100%);
    border-bottom-left-radius: 18px;
    border-bottom-right-radius: 18px;
    animation: infoSlideUp 0.5s cubic-bezier(0.165, 0.84, 0.44, 1) 0.3s forwards;
    opacity: 0;
    transform: translateY(10px);
    box-sizing: border-box;
    backdrop-filter: none; /* 移除模糊 */
}

@keyframes infoSlideUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 角色名字 - 左下角 */
.modal-info .character-name {
    font-size: 1.8rem;
    font-weight: 700;
    color: white;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
    letter-spacing: 0.5px;
    padding: 10px 20px;
    border-radius: 8px;
}

/* 社交图标 - 右下角 */
.modal-info .social-icons {
    display: flex;
    gap: 15px;
    margin-top: 0; /* 移除顶部边距 */
}

.modal-info .social-icon {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 20px;
    background: rgba(0, 0, 0, 0.7); /* 黑色半透明背景 */
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    backdrop-filter: none; /* 移除模糊 */
}

.modal-info .social-icon:hover {
    transform: translateY(-5px) scale(1.15);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
}

/* 社交图标悬停颜色 */
.modal-info .social-icon.bilibili:hover { 
    background: rgba(251, 114, 153, 0.9); 
    border-color: #fb7299;
}
.modal-info .social-icon.weibo:hover { 
    background: rgba(230, 22, 45, 0.9); 
    border-color: #e6162d;
}
.modal-info .social-icon.douyin:hover { 
    background: rgba(0, 0, 0, 0.9); 
    border-color: #000;
}
.modal-info .social-icon.twitter:hover { 
    background: rgba(29, 161, 242, 0.9); 
    border-color: #1da1f2;
}
.modal-info .social-icon.instagram:hover { 
    background: rgba(225, 48, 108, 0.9); 
    border-color: #e1306c;
}
.modal-info .social-icon.youtube:hover { 
    background: rgba(255, 0, 0, 0.9); 
    border-color: #ff0000;
}
