/* =====================================================
   PDF下载引导模态弹层 - 浅色系设计
   ===================================================== */

/* ========= 模态容器基础样式 ========= */
.pdf-download-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9998;
    display: none;
    opacity: 0;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.pdf-download-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.pdf-download-modal.show {
    opacity: 1;
}

/* ========= 遮罩层 ========= */
.pdf-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1;
}

/* ========= 模态主容器 ========= */
.pdf-modal-container {
    position: relative;
    width: 90%;
    max-width: 1000px;
    max-height: 90vh;
    z-index: 2;
    transform: scale(0.95) translateY(20px);
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);

    /* 浅色系背景 */
    background: #ffffff;
    border-radius: 20px;
    box-shadow:
        0 24px 80px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(0, 0, 0, 0.05);
    overflow: scroll;
}

.pdf-download-modal.show .pdf-modal-container {
    transform: scale(1) translateY(0);
}

/* ========= 关闭按钮 ========= */
.pdf-modal-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.08);
    color: #333333;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.pdf-modal-close-btn:hover {
    background: rgba(54, 201, 88, 0.1);
    border-color: rgba(54, 201, 88, 0.3);
    color: #36c958;
    transform: rotate(90deg);
}

.pdf-modal-close-btn i {
    width: 22px;
    height: 22px;
}

/* ========= 内容布局（黄金比例） ========= */
.pdf-modal-content {
    display: flex;
    min-height: 600px;
}

/* ========= 左侧：书籍展示区域（38%） ========= */
.pdf-left-section {
    flex: 0 0 38%;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 60px 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* 背景装饰网格 */
.pdf-left-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(54, 201, 88, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(54, 201, 88, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    opacity: 0.5;
}

.book-showcase {
    position: relative;
    width: 100%;
    max-width: 280px;
    z-index: 1;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

.book-image {
    width: 100%;
    height: auto;
    display: block;
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.2));
    transition: transform 0.3s ease;
}

.book-showcase:hover .book-image {
    transform: scale(1.05);
}

/* 光泽效果 */
.book-shine {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(255, 255, 255, 0.3) 50%,
        transparent 70%
    );
    transform: translateX(-100%);
    animation: shine 3s ease-in-out infinite;
}

@keyframes shine {
    0% {
        transform: translateX(-100%);
    }
    20%, 100% {
        transform: translateX(100%);
    }
}

/* ========= 解决方案列表 ========= */
.solution-list {
    width: 100%;
    max-width: 320px;
    margin-top: 40px;
    padding: 24px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 12px;
    border: 1px solid rgba(54, 201, 88, 0.15);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
    z-index: 2;
    position: relative;
}

.solution-list-title {
    font-size: 16px;
    font-weight: 600;
    color: #333333;
    margin-bottom: 16px;
    text-align: center;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(54, 201, 88, 0.15);
}

.solution-items {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.solution-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(54, 201, 88, 0.05);
    border-radius: 8px;
    transition: all 0.3s ease;
    cursor: default;
}

.solution-item:hover {
    background: rgba(54, 201, 88, 0.12);
    transform: translateX(4px);
}

.solution-item i {
    width: 20px;
    height: 20px;
    color: #36c958;
    flex-shrink: 0;
}

.solution-item span {
    font-size: 14px;
    color: #333333;
    font-weight: 500;
    line-height: 1.4;
}

/* 强制设置解决方案列表中图标的颜色 */
.pdf-download-modal .solution-list svg.lucide {
    stroke: #36c958 !important;
}

/* ========= 右侧：表单区域（62%） ========= */
.pdf-right-section {
    flex: 0 0 62%;
    padding: 50px 50px 40px;
    background: #ffffff;
    display: flex;
    flex-direction: column;
}

.pdf-form-wrapper {
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* 表单标题 */
.pdf-form-header {
    margin-bottom: 32px;
}

.pdf-form-title {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 12px;
    line-height: 1.3;
}

.pdf-form-subtitle {
    font-size: 15px;
    color: #666666;
    margin-bottom: 0;
    line-height: 1.6;
}

/* ========= 表单样式 ========= */
.pdf-download-form {
    margin-bottom: 28px;
}

.pdf-form-group {
    margin-bottom: 20px;
}

.pdf-form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #333333;
    margin-bottom: 10px;
}

.pdf-form-control {
    width: 100%;
    padding: 14px 16px;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    color: #1a1a1a;
    font-size: 15px;
    transition: all 0.3s ease;
}

.pdf-form-control:focus {
    outline: none;
    background: #ffffff;
    border-color: #36c958;
    box-shadow: 0 0 0 3px rgba(54, 201, 88, 0.1);
}

.pdf-form-control::placeholder {
    color: #999999;
}

/* 验证码输入组 */
.pdf-verification-wrapper {
    display: flex;
    gap: 12px;
    align-items: stretch;
}

.pdf-verification-wrapper .pdf-form-control {
    flex: 1;
}

.pdf-verification-btn {
    flex-shrink: 0;
    padding: 14px 24px;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    color: #36c958;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.pdf-verification-btn:hover:not(:disabled) {
    background: rgba(54, 201, 88, 0.05);
    border-color: #36c958;
}

.pdf-verification-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    color: #999999;
}

/* ========= 提交按钮区域 ========= */
.pdf-submit-wrapper {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 8px;
}

.pdf-submit-btn {
    flex: 1;
    padding: 16px 32px;
    background: linear-gradient(135deg, #36c958, #2da849);
    border: none;
    border-radius: 8px;
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(54, 201, 88, 0.25);
}

.pdf-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(54, 201, 88, 0.35);
}

.pdf-submit-btn i {
    width: 18px;
    height: 18px;
}

/* 剩余提示 */
.pdf-remaining-hint {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 12px 16px;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 8px;
    font-size: 13px;
    color: #856404;
    white-space: nowrap;
}

.pdf-remaining-hint i {
    width: 16px;
    height: 16px;
    color: #ffc107;
}

.pdf-remaining-hint strong {
    color: #ff6b00;
    font-weight: 700;
}

/* ========= 分隔线 ========= */
.pdf-divider {
    position: relative;
    text-align: center;
    margin: 24px 0;
}

.pdf-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 1px;
    background: #e0e0e0;
}

.pdf-divider span {
    position: relative;
    display: inline-block;
    padding: 0 16px;
    background: #ffffff;
    color: #999999;
    font-size: 14px;
    font-weight: 500;
}

/* ========= 企业微信区域 ========= */
.pdf-wechat-section {
    position: relative;
    margin-bottom: 20px;
}

.pdf-wechat-btn {
    width: 100%;
    padding: 16px 24px;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    color: #333333;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.pdf-wechat-btn:hover {
    background: #f8f9fa;
    border-color: #36c958;
    color: #36c958;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.pdf-wechat-btn i {
    width: 20px;
    height: 20px;
}

.pdf-wechat-btn .arrow-icon {
    width: 18px;
    height: 18px;
    margin-left: auto;
    transition: transform 0.3s ease;
}

.pdf-wechat-btn:hover .arrow-icon {
    transform: translateX(4px);
}

/* 企业微信二维码（鼠标移入显示）*/
.pdf-wechat-qrcode {
    position: absolute;
    bottom: calc(100% + 16px);
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: #ffffff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10;
    text-align: center;
    min-width: 200px;
}

.pdf-wechat-btn:hover + .pdf-wechat-qrcode,
.pdf-wechat-qrcode:hover {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* 二维码箭头 */
.qrcode-arrow {
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid #ffffff;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.pdf-wechat-qrcode img {
    width: 160px;
    height: 160px;
    border-radius: 8px;
    margin-bottom: 12px;
    display: block;
}

.pdf-wechat-qrcode p {
    margin: 0;
    font-size: 14px;
    color: #666666;
    font-weight: 500;
}

/* ========= 底部提示 ========= */
.pdf-form-notice {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: auto;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    font-size: 13px;
    color: #1a1a1a;  /* 改为深色以提高可读性 */
    font-weight: 500;  /* 增加字重 */
}

.pdf-form-notice i {
    width: 16px;
    height: 16px;
    color: #36c958;
}

.pdf-form-notice span {
    color: #1a1a1a;  /* 确保文字颜色深色可见 */
    font-weight: 500;
}

/* 强制设置所有Lucide图标的stroke颜色 */
.pdf-download-modal svg.lucide {
    stroke: currentColor !important;
}

/* ========= 响应式设计 ========= */
@media (max-width: 991px) {
    .pdf-modal-content {
        flex-direction: column;
        min-height: auto;
    }

    .pdf-left-section {
        flex: 0 0 auto;
        padding: 40px 30px;
        min-height: 300px;
    }

    .pdf-right-section {
        flex: 0 0 auto;
        padding: 40px 30px;
    }

    .book-showcase {
        max-width: 200px;
    }
}

@media (max-width: 767px) {
    .pdf-modal-container {
        width: 95%;
        max-height: 95vh;
        overflow-y: auto;
    }

    .pdf-left-section {
        padding: 30px 20px;
        min-height: 250px;
    }

    .pdf-right-section {
        padding: 30px 20px;
    }

    .pdf-form-title {
        font-size: 24px;
    }

    .pdf-form-subtitle {
        font-size: 14px;
    }

    .pdf-submit-wrapper {
        flex-direction: column;
        align-items: stretch;
    }

    .pdf-remaining-hint {
        justify-content: center;
    }

    .pdf-verification-btn {
        padding: 14px 16px;
        font-size: 13px;
    }
}

/* ========= 滚动条样式 ========= */
.pdf-modal-container::-webkit-scrollbar {
    width: 8px;
}

.pdf-modal-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.pdf-modal-container::-webkit-scrollbar-thumb {
    background: #36c958;
    border-radius: 4px;
}

.pdf-modal-container::-webkit-scrollbar-thumb:hover {
    background: #2da849;
}

/* ========= 提交成功页面样式 ========= */
.pdf-success-view {
    display: none;
}

.pdf-success-wrapper {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px 0;
}

/* 成功图标 */
.pdf-success-icon {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(54, 201, 88, 0.1), rgba(54, 201, 88, 0.2));
    border-radius: 50%;
    margin-bottom: 24px;
    animation: successPulse 2s ease-in-out infinite;
}

@keyframes successPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(54, 201, 88, 0.4);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(54, 201, 88, 0);
    }
}

.pdf-success-icon i {
    width: 48px;
    height: 48px;
    color: #36c958;
}

/* 成功标题 */
.pdf-success-header {
    text-align: center;
    margin-bottom: 28px;
}

.pdf-success-title {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 8px;
    line-height: 1.3;
}

.pdf-success-subtitle {
    font-size: 16px;
    color: #666666;
    margin-bottom: 0;
    line-height: 1.6;
}

/* 提示信息 */
.pdf-success-message {
    width: 100%;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 12px;
    border: 1px solid rgba(54, 201, 88, 0.2);
    margin-bottom: 24px;
}

.message-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(54, 201, 88, 0.15);
    border-radius: 8px;
}

.message-icon i {
    width: 24px;
    height: 24px;
    color: #36c958;
}

.message-text {
    flex: 1;
    margin: 0;
    font-size: 15px;
    line-height: 1.7;
    color: #333333;
}

/* 文档列表 */
.pdf-success-list {
    width: 100%;
    margin-bottom: 24px;
}

.list-title {
    font-size: 16px;
    font-weight: 600;
    color: #333333;
    margin-bottom: 16px;
}

.document-items {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.document-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.document-item i {
    width: 20px;
    height: 20px;
    color: #36c958;
    flex-shrink: 0;
}

.document-item span {
    font-size: 15px;
    color: #333333;
    font-weight: 500;
}

/* 底部提示 */
.pdf-success-notice {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: auto;
    padding: 14px 16px;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 8px;
    font-size: 13px;
    color: #856404;
    text-align: center;
}

.pdf-success-notice i {
    width: 16px;
    height: 16px;
    color: #ffc107;
    flex-shrink: 0;
}

.pdf-success-notice span {
    color: #856404;
    font-weight: 500;
}

/* ========= 邮箱输入表单样式 ========= */
.pdf-email-form {
    width: 100%;
    margin-top: 28px;
    padding: 24px;
    background: rgba(54, 201, 88, 0.03);
    border-radius: 12px;
    border: 1px dashed rgba(54, 201, 88, 0.3);
}

.pdf-email-input-wrapper {
    display: flex;
    gap: 12px;
    align-items: stretch;
}

.pdf-email-input {
    flex: 1;
    padding: 16px 20px;
    background: #ffffff;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    color: #1a1a1a;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.pdf-email-input:hover {
    border-color: #36c958;
}

.pdf-email-input:focus {
    outline: none;
    background: #ffffff;
    border-color: #36c958;
    box-shadow: 0 0 0 4px rgba(54, 201, 88, 0.15);
    transform: translateY(-1px);
}

.pdf-email-input::placeholder {
    color: #999999;
    font-weight: 400;
}

.pdf-send-email-btn {
    flex-shrink: 0;
    padding: 16px 36px;
    background: linear-gradient(135deg, #36c958 0%, #2da849 100%);
    border: none;
    border-radius: 10px;
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 16px rgba(54, 201, 88, 0.3);
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.pdf-send-email-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.pdf-send-email-btn:hover::before {
    left: 100%;
}

.pdf-send-email-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(54, 201, 88, 0.4);
}

.pdf-send-email-btn:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(54, 201, 88, 0.3);
}

.pdf-send-email-btn i {
    width: 20px;
    height: 20px;
}

/* ========= 最终成功页面样式 ========= */
.pdf-final-success-view {
    display: none;
}

.pdf-final-close-wrapper {
    width: 100%;
    margin-top: 32px;
    text-align: center;
}

.pdf-final-close-btn {
    padding: 14px 48px;
    background: #ffffff;
    border: 2px solid #36c958;
    border-radius: 8px;
    color: #36c958;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pdf-final-close-btn:hover {
    background: #36c958;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(54, 201, 88, 0.25);
}

/* ========= 成功页面响应式 ========= */
@media (max-width: 767px) {
    .pdf-success-icon {
        width: 64px;
        height: 64px;
        margin-bottom: 20px;
    }

    .pdf-success-icon i {
        width: 38px;
        height: 38px;
    }

    .pdf-success-title {
        font-size: 24px;
    }

    .pdf-success-subtitle {
        font-size: 14px;
    }

    .pdf-success-message {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 16px;
    }

    .message-text {
        font-size: 14px;
    }

    .list-title {
        font-size: 15px;
    }

    .document-item {
        padding: 12px 14px;
    }

    .document-item span {
        font-size: 14px;
    }

    .pdf-success-notice {
        font-size: 12px;
        padding: 12px 14px;
    }

    /* 邮箱输入响应式 */
    .pdf-email-input-wrapper {
        flex-direction: column;
        gap: 12px;
    }

    .pdf-send-email-btn {
        width: 100%;
        justify-content: center;
    }

    .pdf-email-input {
        font-size: 14px;
        padding: 12px 14px;
    }

    .pdf-final-close-btn {
        width: 100%;
        padding: 12px 32px;
    }
}
