/*author: 葉研万事屋*/
/*BilibiliSpace: https://space.bilibili.com/3546741129349750*/
/*QQGroup: 1056692175*/
.mail-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.mail-popup-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.mail-popup-container {
    position: relative;
    animation: slideUp 0.5s ease forwards;
    transform: translateY(100vh);
}

@keyframes slideUp {
    to {
        transform: translateY(0);
    }
}

.mail-background {
    display: block;
    max-width: 90vw;
    max-height: 90vh;
}

.mail-title {
    position: absolute;
    top: 8%;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: auto;
}

.anchor-name-container {
    padding: 2.5% 0;
    position: absolute;
    top: 7.6%;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    text-align: center;
    border-top: 2px solid #a98553;
    border-bottom: 2px solid #a98553;
    background-color: rgba(0, 0, 0, 0.5);
    mask-image: linear-gradient(to right, transparent 0%, black 20%, black 80%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 20%, black 80%, transparent 100%);
}

.anchor-name {
    color: white;
    font-family: 'SourceHanSemiBold', serif;
    font-size: 32px;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.8);
}
.anchor-name:after {
    content: '信箱';
     color: white;
     font-family: 'SourceHanSemiBold', serif;
    font-size: var(--after-font-size, 32px);
     text-shadow: 0 0 5px rgba(0, 0, 0, 0.8);
 }

.qr-code-container {
    position: absolute;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 56%;
    max-width: 250px;
}

/* 邮件提示文字区域 */
.mail-instructions {
    position: absolute;
    top: 66%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    text-align: center;
    font-family: 'SourceHan', serif;
}

.instruction-line-1 {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: #BED9F7;
}

.mail-icon-small {
    width: 33px;
    height: 26px;
    position: relative;
    top: 2px;
    left: -4px;
}

.instruction-line-2 {
    font-size: 18px;
    color: #4f5d6e;
}

.mail-components-container {
    position: absolute;
    bottom: 25%;
    left: 50%;
    transform: translateX(-50%);
    width: 77%;
    height: 4%;
    overflow: hidden;
    mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
}

.mail-components-track {
    position: absolute;
    display: flex;
    width: 100%;
    height: 100%;
}

.mail-component-item {
    height: 100%;
    flex-shrink: 0;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    animation: scrollItem linear infinite;
    opacity: 0;
}

@keyframes scrollItemA {
    0% {
        left: 90%;
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        left: -30%;
        opacity: 0;
    }
}

@keyframes scrollItemB {
    0% {
        left: 100%;
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        left: -30%;
        opacity: 0;
    }
}

@keyframes scrollItemC {
    0% {
        left: 120%;
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        left: -30%;
        opacity: 0;
    }
}

@keyframes scrollItemD {
    0% {
        left: 140%;
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        left: -30%;
        opacity: 0;
    }
}

@keyframes scrollItemE {
    0% {
        left: 130%;
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        left: -30%;
        opacity: 0;
    }
}

@keyframes scrollItemF {
    0% {
        left: 150%;
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        left: -30%;
        opacity: 0;
    }
}

@keyframes scrollItemG {
    0% {
        left: 110%;
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        left: -30%;
        opacity: 0;
    }
}

.exit-button {
    position: absolute;
    bottom: -1%;
    right: -17%;
    width: 20%;
    max-width: 86px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.exit-button:hover {
    transform: scale(1.1);
}

.exit-icon {
    width: 100%;
    height: 100%;
    display: block;
}

.exit-icon-light {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.exit-button:hover .exit-icon-light {
    opacity: 1;
}
