/* 标题样式优化 */
.text-download {
    font-weight: 600 !important;
    color: #333 !important;
    margin-bottom: 15px !important;
    padding: 0 15px !important;
    line-height: 1.4 !important;
}

.text-download .text-warning {
    color: #ff6b35 !important;
    font-weight: 700 !important;
}

/* 下载区域容器优化 */
.xunhu-downbox {
    padding: 20px 15px !important;
    margin: 15px auto !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* 下载按钮容器样式 - 参考付费前按钮形式 */
.download-buttons-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
    margin: 20px 0 15px 0;
    padding: 0 15px;
}

/* 下载按钮基础样式 - 统一使用配置的样式 */
.wshop-download-btn {
    min-width: 120px;
    max-width: 300px;
    width: auto;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    margin: 5px 0;
}

/* 按钮样式配置 */
.wshop-download-btn.btn-blue {
    background: linear-gradient(135deg, #4facfe, #00f2fe);
}

.wshop-download-btn.btn-blue:hover {
    background: linear-gradient(135deg, #3d8bfe, #00d4fe);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(79, 172, 254, 0.3);
}

.wshop-download-btn.btn-green {
    background: linear-gradient(135deg, #4CAF50, #45a049);
}

.wshop-download-btn.btn-green:hover {
    background: linear-gradient(135deg, #45a049, #3d8b40);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.wshop-download-btn.btn-orange {
    background: linear-gradient(135deg, #ff6b35, #f7931e);
}

.wshop-download-btn.btn-orange:hover {
    background: linear-gradient(135deg, #e55a2b, #e8841a);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

.wshop-download-btn.btn-purple {
    background: linear-gradient(135deg, #667eea, #764ba2);
}

.wshop-download-btn.btn-purple:hover {
    background: linear-gradient(135deg, #5a6fd8, #6a4190);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.wshop-download-btn.btn-red {
    background: linear-gradient(135deg, #ff416c, #ff4b2b);
}

.wshop-download-btn.btn-red:hover {
    background: linear-gradient(135deg, #e53a61, #e54429);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 65, 108, 0.3);
}

/* 按钮尺寸配置 */
.wshop-download-btn.btn-small {
    padding: 8px 16px;
    font-size: 12px;
    min-width: 100px;
}

.wshop-download-btn.btn-large {
    padding: 12px 24px;
    font-size: 16px;
    min-width: 140px;
}

/* 按钮状态样式 */
.wshop-download-btn.success {
    background: linear-gradient(135deg, #28a745, #20c997) !important;
    color: white !important;
}

.wshop-download-btn.loading {
    opacity: 0.8;
    cursor: not-allowed;
    pointer-events: none;
}

.wshop-download-btn.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    margin: auto;
    border: 2px solid transparent;
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
}

@keyframes spin {
    0% {
        transform: translateY(-50%) rotate(0deg);
    }

    100% {
        transform: translateY(-50%) rotate(360deg);
    }
}

/* 确保按钮在容器中居中对齐 */
.download-buttons-container .wshop-download-btn {
    align-self: center;
}

/* 按钮焦点状态 - 无障碍优化 */
.wshop-download-btn:focus {
    outline: 2px solid rgba(255, 255, 255, 0.8);
    outline-offset: 2px;
}

/* 按钮禁用状态 */
.wshop-download-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
}

/* ================================
   VIP会员模态框样式优化
   ================================ */

/* 模态框背景遮罩 */
.xunhu-modal {
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(2px);
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* 模态框内容容器 */
.xunhu-modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    position: relative;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* 关闭按钮 */
.xunhu-modal .xunhu-close {
    position: absolute;
    right: 5px;
    top: 5px;
    color: #999;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(0, 0, 0, 0.1);
    padding: 8px;
}

.xunhu-modal .xunhu-close:hover,
.xunhu-modal .xunhu-close:focus {
    color: #fff;
    background: linear-gradient(135deg, #ff6b6b, #ee5a52);
    border-color: transparent;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
}

/* 模态框内容区域 */
.xunhu-ptb40 {
    padding: 40px 30px;
}

.download-content .xunhu-ptb40 {
    padding: 40px 10px;
}

/* 模态框标题 */
.xunhu-modal .text-download {
    font-size: 20px !important;
    font-weight: 600 !important;
    color: #333 !important;
    margin-bottom: 25px !important;
    padding: 0 !important;
}

/* 会员说明区域 */
.xunhu-modal .xunhu-member-info {
    background: linear-gradient(135deg, #f8f9ff, #e8f4fd) !important;
    border: 1px solid #e1e8ed !important;
    border-radius: 8px !important;
    padding: 15px !important;
    font-size: 14px !important;
    color: #666 !important;
    line-height: 1.6 !important;
}

/* 会员类型选择区域 */
.xunhu-member-item {
    background: #fff;
    border: 2px solid #e1e8ed;
    border-radius: 12px;
    padding: 20px 15px;
    margin: 8px;
    min-width: 160px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.xunhu-member-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.xunhu-member-item:hover {
    border-color: #667eea;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.15);
    transform: translateY(-2px);
}

.xunhu-member-item:hover::before {
    transform: scaleX(1);
}

.xunhu-member-item.active {
    border-color: #667eea;
    background: linear-gradient(135deg, #f8f9ff, #e8f4fd);
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.2);
}

.xunhu-member-item.active::before {
    transform: scaleX(1);
}

/* 会员价格显示 */
.xunhu-member-item .xunhu-text-lg {
    font-size: 24px !important;
    font-weight: 700 !important;
    color: #667eea !important;
    margin-bottom: 0px !important;
}

/* 会员信息文本 */
.xh_membership_info {
    color: #666;
    font-size: 13px;
    line-height: 1.5;
}

.xh_membership_info>div {
    margin: 5px 0;
}

.xh_membership_info>div:first-child {
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

/* 支付方式选择 */

.xunhu-modal .xh-member-pay {
    width: 82%;
    display: flex;
    gap: 10px;
    margin: 15px auto;
    overflow: hidden;
}

.xh-member-pay a {
    padding: 8px 20px;
    text-decoration: none;
    color: #666;
    border: 1px solid #e1e8ed;
    transition: all 0.3s ease;
    font-size: 16px !important;
    width: 50%;
    border-radius: 8px;
    text-align: center;
    margin: 0;
}

.xh-member-pay a:hover {
    color: #667eea;
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.05);
}

.xunhu-modal .xh-member-pay a.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white!important;
    border-color: transparent;
}

/* 支付方式单选按钮 */
.radio {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 20px 0;
    align-items: center;
}

.radio input[type="radio"] {
    display: none;
}

.radio-label {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fff;
    min-width: 200px;
    justify-content: center;
    gap: 8px;
}

.radio-label:hover {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.05);
}

.radio input[type="radio"]:checked+.radio-label {
    border-color: #667eea;
    background: linear-gradient(135deg, #f8f9ff, #e8f4fd);
    color: #667eea;
    font-weight: 500;
}

.radio-label img {
    width: 20px !important;
    height: 20px !important;
}

/* 激活码输入框 */
.xunhu-input {
    padding: 12px 16px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: #fff;
}

.xunhu-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.xh-w50 {
    width: 50%;
    min-width: 200px;
}

/* 错误提示 */
.xunhu-alert-danger {
    background: linear-gradient(135deg, #ffe6e6, #ffcccc);
    border: 1px solid #ffb3b3;
    color: #cc0000;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}

.xunhu-alert-danger a {
    color: #cc0000;
    font-weight: 600;
    text-decoration: underline;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .xunhu-modal-content {
        width: 95%;
        margin: 10% auto;
        max-height: 96vh;
    }

    .xunhu-modal .xunhu-member-info{
        display: none;
    }

    .xunhu-modal .text-download{
        margin-bottom: 5px !important;
    }

    .xunhu-ptb40 {
        padding: 30px 20px;
    }

    .xunhu-member-item {
        min-width: 140px;
        padding: 15px 10px;
        margin: 5px;
    }

    .xunhu-member-item .xunhu-text-lg {
        font-size: 20px !important;
    }

    .radio-label {
        min-width: 180px;
        padding: 10px 15px;
    }

    .xh-w50 {
        width: 80%;
        min-width: 180px;
    }
}

@media (max-width: 480px) {
    .xunhu-modal-content {
        width: 98%;
        margin: 5% auto;
    }

    .xunhu-ptb40 {
        padding: 25px 15px;
    }

    .xunhu-member-item {
        min-width: 120px;
        margin: 3px;
    }

    .xh-member-pay {
        flex-direction: column;
        gap: 10px;
    }

    .xh-member-pay a {
        margin: 0 !important;
    }
}

/* 额外的微交互效果 */

/* 模态框打开时的背景动画 */
.xunhu-modal.show {
    animation: modalShow 0.3s ease-out forwards;
}

@keyframes modalShow {
    from {
        opacity: 0;
        backdrop-filter: blur(0px);
    }

    to {
        opacity: 1;
        backdrop-filter: blur(2px);
    }
}

/* 会员卡片选中时的脉冲效果 */
.xunhu-member-item.active {
    animation: pulse 0.6s ease-out;
}

@keyframes pulse {
    0% {
        box-shadow: 0 4px 20px rgba(102, 126, 234, 0.2);
    }

    50% {
        box-shadow: 0 4px 25px rgba(102, 126, 234, 0.4);
    }

    100% {
        box-shadow: 0 4px 20px rgba(102, 126, 234, 0.2);
    }
}

/* 支付按钮的加载状态 */
.xunhu-btn-buy.loading {
    position: relative;
    color: transparent !important;
}

.xunhu-btn-buy.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid transparent;
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* 输入框聚焦时的发光效果 */
.xunhu-input:focus {
    animation: inputGlow 0.3s ease-out;
}

@keyframes inputGlow {
    from {
        box-shadow: 0 0 0 0 rgba(102, 126, 234, 0.4);
    }

    to {
        box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    }
}

/* 错误提示的摇摆动画 */
.xunhu-alert-danger.shake {
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    75% {
        transform: translateX(5px);
    }
}

/* 成功状态的检查标记动画 */
.success-check {
    display: inline-block;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #28a745;
    position: relative;
    margin-right: 8px;
}

.success-check::after {
    content: '✓';
    position: absolute;
    color: white;
    font-size: 12px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: checkmark 0.3s ease-out;
}

@keyframes checkmark {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0);
    }

    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* 淘宝按钮样式 */
.xunhu-btn-taobao {
    background: linear-gradient(135deg, #ff6900, #ff4500) !important;
    color: white !important;
    border: none !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 10px 20px !important;
    border-radius: 8px !important;
    text-decoration: none !important;
    font-weight: 500 !important;
    transition: all 0.3s ease !important;
    margin: 5px 0 !important;
    box-shadow: 0 2px 4px rgba(255, 105, 0, 0.2) !important;
    min-width: 120px !important;
    justify-content: center !important;
}

.xunhu-btn-taobao:hover {
    background: linear-gradient(135deg, #e55a00, #e03e00) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(255, 105, 0, 0.3) !important;
    color: white !important;
    text-decoration: none !important;
}

.xunhu-btn-taobao svg {
    width: 16px !important;
    height: 16px !important;
    fill: currentColor !important;
    flex-shrink: 0 !important;
}

/* VIP按钮样式优化 */
.xunhu-btn-vip {
    background: linear-gradient(135deg, #8B5CF6, #A855F7) !important;
    color: white !important;
    border: none !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 10px 20px !important;
    border-radius: 8px !important;
    text-decoration: none !important;
    font-weight: 500 !important;
    transition: all 0.3s ease !important;
    margin: 5px 0 !important;
    box-shadow: 0 2px 4px rgba(139, 92, 246, 0.2) !important;
    min-width: 120px !important;
    justify-content: center !important;
}

.xunhu-btn-vip:hover {
    background: linear-gradient(135deg, #7C3AED, #9333EA) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3) !important;
    color: white !important;
    text-decoration: none !important;
}

.xunhu-btn-vip svg {
    width: 16px !important;
    height: 16px !important;
    flex-shrink: 0 !important;
}

/* 购买按钮样式优化 */
.xunhu-btn-buy {
    background: linear-gradient(135deg, #3B82F6, #1D4ED8) !important;
    color: white !important;
    border: none !important;
    padding: 10px 20px !important;
    border-radius: 8px !important;
    text-decoration: none !important;
    font-weight: 500 !important;
    transition: all 0.3s ease !important;
    margin: 5px 0 !important;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.2) !important;
    min-width: 120px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.xunhu-btn-buy:hover {
    background: linear-gradient(135deg, #2563EB, #1E40AF) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3) !important;
    color: white !important;
    text-decoration: none !important;
}

/* 按钮包装器优化 */
.xunhu-btn-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 0 15px;
    margin-top: 15px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .xunhu-downbox {
        margin: 10px 5px !important;
        padding: 15px 10px !important;
    }

    .text-download {
        font-size: 15px !important;
        padding: 0 10px !important;
    }

    .download-buttons-container {
        gap: 8px;
        padding: 0 10px;
    }

    .wshop-download-btn {
        min-width: 160px;
        max-width: calc(100vw - 60px);
        width: auto;
        padding: 10px 20px;
        font-size: 13px;
    }

    .xunhu-btn-wrapper {
        gap: 8px;
        padding: 0 10px;
    }

    .xunhu-btn-taobao,
    .xunhu-btn-vip,
    .xunhu-btn-buy {
        width: auto !important;
        max-width: calc(100vw - 60px) !important;
        min-width: 160px !important;
        justify-content: center !important;
        margin: 3px 0 !important;
    }
}

@media (max-width: 480px) {
    .xunhu-downbox {
        margin: 8px 3px !important;
        padding: 12px 8px !important;
    }

    .text-download {
        font-size: 14px !important;
        padding: 0 8px !important;
    }

    .download-buttons-container {
        padding: 0 8px;
    }

    .wshop-download-btn {
        min-width: 140px;
        max-width: calc(100vw - 40px);
        padding: 9px 16px;
        font-size: 12px;
    }

    .xunhu-btn-wrapper {
        padding: 0 8px;
    }

    .xunhu-btn-taobao,
    .xunhu-btn-vip,
    .xunhu-btn-buy {
        max-width: calc(100vw - 40px) !important;
        min-width: 140px !important;
        padding: 9px 16px !important;
        font-size: 12px !important;
    }
}

/* 客服提示文本样式 */
.xunhu-downbox p {
    color: #666 !important;
    font-size: 13px !important;
    line-height: 1.5 !important;
    margin: 15px 0 10px 0 !important;
    padding: 0 15px !important;
    text-align: center !important;
}

/* 锁定图标样式优化 */
.xunhu-downlockicon {
    opacity: 0.6 !important;
    max-width: 32px !important;
    height: auto !important;
}

/* 价格显示优化 */
.xunhu-text-lg {
    font-size: 1.2em !important;
    font-weight: 700 !important;
}

/* 会员下载次数显示 */
.xunhu-downbox>div:last-child {
    text-align: center;
    color: #28a745;
    font-size: 12px;
    margin-top: 10px;
    padding: 5px 15px;
    background: rgba(40, 167, 69, 0.1);
    border-radius: 4px;
    display: inline-block;
    margin-left: auto;
    margin-right: auto;
}

/* 管理后台样式 */
.wshop-download-custom-text-section {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 5px;
    margin-top: 15px;
}

.wshop-download-custom-text-section h4 {
    color: #333;
    margin-bottom: 15px;
    border-bottom: 2px solid #0073aa;
    padding-bottom: 5px;
}

.wshop-download-text-field {
    margin-bottom: 15px;
}

.wshop-download-text-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
    color: #555;
}

.wshop-download-text-field input,
.wshop-download-text-field textarea {
    width: 100%;
    max-width: 500px;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.wshop-download-text-field input:focus,
.wshop-download-text-field textarea:focus {
    border-color: #0073aa;
    box-shadow: 0 0 0 1px #0073aa;
    outline: none;
}

.wshop-download-text-field .description {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
    font-style: italic;
}

/* 弹出模态框优化 */
.xunhu-modal .xunhu-modal-content {
    margin-top: 0 !important;
}

.xunhu-member-item .xunhu-text-lg,
.pay_to_see .xunhu-member-item .xunhu-text-lg {
    color: #000;
    font-family: "Ivar Headline", Sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
}



@media (max-width: 480px) {
    .xunhu-flex .xunhu-member-item {
        box-sizing: border-box;
        width: 90% !important;
        margin: 5px;
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: center;
    }

    .xunhu-member-item .xh_membership_info,
    .pay_to_see .xunhu-member-item .xh_membership_info {
        text-align: left;
        padding-left: 10px;
        margin-left: 10px;
        border-left: 1px dashed #DDD;
    }

    .xunhu-modal .xunhu-modal-content {
        border-radius: 10px;
    }

    .xunhu-modal .xunhu-ptb40 {
        padding: 20px 10px 30px;
    }

    .xunhu-member-item .xh_membership_info .xunhu-mt10,
    .pay_to_see .xunhu-member-item .xh_membership_info .xunhu-mt10 {
        margin-top: 0;
    }

}