/* 弹窗基础样式 */
.psc-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease;
    opacity: 0;
}

.psc-popup.active {
    display: flex;
    opacity: 1;
}

.psc-popup-content {
    position: relative;
    background-color: #f87666;
    padding: 30px;
    border-radius: 10px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    animation: slideIn 0.3s ease-out;
}

/* 关闭按钮 */
.psc-close {
    position: absolute;
    right: 15px;
    top: 10px;
    font-size: 24px;
    cursor: pointer;
    color: #fff;
    transition: color 0.3s;
}

.psc-close:hover {
    color: #f1f1f1;
}

/* 弹窗标题和优惠信息 */
.psc-popup-header {
    text-align: center;
    margin-bottom: 20px;
}

.psc-title-image {
    max-width: 100%;
    height: auto;
    margin-bottom: 10px;
}

.psc-coupon-image {
    max-width: 80%;
    height: auto;
    margin: 0 auto 20px;
    display: block;
}

.psc-popup-header h2 {
    margin: 0 0 15px;
    color: #fff;
    font-size: 24px;
}

.psc-coupon-text {
    font-size: 12px;
    color: #fff;
    margin-bottom: 20px;
    text-align: center;
}

/* 表单样式 */
.psc-form-group {
    margin-bottom: 20px;
}

.psc-form-group input[type="email"] {
    width: 100%;
    padding: 14px;
    border: 2px solid #fff;
    border-radius: 5px;
    font-size: 16px;
    transition: border-color 0.3s;
    background-color: rgba(255, 255, 255, 0.9);
}

.psc-form-group input[type="email"]:focus {
    border-color: #fff;
    outline: none;
    background-color: #fff;
}

/* 按钮样式 */
.psc-button {
    width: 100%;
    padding: 14px;
    background-color: #3f554d;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
    position: relative;
}

.psc-button:hover {
    background-color: #2c3e35;
}

.psc-button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

/* 按钮加载状态 */
.psc-button-loader {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
}

.psc-button.loading .psc-button-text {
    visibility: hidden;
}

.psc-button.loading .psc-button-loader {
    display: flex;
}

.psc-loader-dot {
    width: 8px;
    height: 8px;
    background-color: #fff;
    border-radius: 50%;
    margin: 0 3px;
    animation: loadingBounce 1.4s infinite ease-in-out both;
}

.psc-loader-dot:nth-child(1) {
    animation-delay: -0.32s;
}

.psc-loader-dot:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes loadingBounce {
    0%, 80%, 100% { 
        transform: scale(0);
    } 
    40% { 
        transform: scale(1.0);
    }
}

/* 消息样式 */
#psc-message {
    display: none;
    margin-top: 10px;
    padding: 10px;
    border-radius: 5px;
    text-align: center;
    background-color: rgba(255, 255, 255, 0.9);
}

#psc-message.error {
    background-color: #ffe6e6;
    color: #dc3545;
    font-size: 12px;
}

#psc-message.success {
    background-color: #d4edda;
    color: #155724;
}

/* 隐私政策链接 */
.psc-privacy-notice {
    margin-top: 15px;
    text-align: center;
    font-size: 14px;
    color: #fff;
}

.psc-privacy-notice a {
    color: #fff;
    text-decoration: underline;
}

.psc-privacy-notice a:hover {
    text-decoration: none;
}

/* 成功动画样式 */
.psc-success-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.9);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.psc-success-content {
    text-align: center;
    animation: fadeInUp 0.5s ease-out;
    background-color: #f87666;
    padding: 30px;
    border-radius: 10px;
    color: #fff;
}

.psc-checkmark-container {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
}

/* SVG动画 */
.psc-checkmark {
    width: 80px;
    height: 80px;
}

.psc-checkmark-circle {
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    stroke-width: 2;
    stroke: #fff;
    fill: none;
    animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.psc-checkmark-check {
    transform-origin: 50% 50%;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    stroke-width: 3;
    stroke: #fff;
    animation: stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.8s forwards;
}

/* 优惠券详情样式 */
.psc-coupon-details {
    margin-top: 20px;
}

.psc-coupon-details h3 {
    color: #fff;
    margin-bottom: 10px;
}

.psc-coupon-code {
    background-color: #fff;
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 24px;
    font-weight: bold;
    color: #3f554d;
    margin: 10px 0;
    display: inline-block;
}

/* 动画关键帧 */
@keyframes slideIn {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes stroke {
    100% {
        stroke-dashoffset: 0;
    }
}

/* 响应式样式 */
@media (max-width: 480px) {
    .psc-popup-content {
        padding: 20px;
    }
    
    .psc-popup-header h2 {
        font-size: 20px;
    }
    
    .psc-coupon-image {
        max-width: 90%;
    }
}
