/* 基础样式设置，确保页面固定宽度为375px */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    width: 100vw;
    font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
    font-size: 3.2vw; /* 12px / 3.75px */
    color: #333;
    background-color: #000;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    position: relative;
    overflow-x: hidden;
}

ul, ol, li {
    list-style: none;
}

/* 确保页面内容不会溢出固定宽度 */
.container {
    width: 100vw;
    overflow: hidden;
}

/* 防止图片等元素溢出 */
img, video {
    max-width: 100%;
    height: auto;
}

/* 弹窗样式 - 统一使用这一套样式 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* 弹窗容器初始状态 */
.modal-overlay .modal-container {
    position: relative;
    width: 72vw; /* 270px / 3.75px */
    min-height: 77.33vw; /* 290px / 3.75px */
    background-color: #fff;
    border-radius: 8vw; /* 30px / 3.75px */
    padding-top: 10.67vw; /* 40px / 3.75px */
    margin: 0 auto;
    transform: scale(0.8);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.modal-overlay .modal-container.s1 {
    width: 85.33vw; /* 320px / 3.75px */
}

/* 弹窗激活状态 - 显示动画 */
.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-overlay.active .modal-container {
    transform: scale(1);
    opacity: 1;
    /* 打开时使用弹性效果 */
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease;
}

.modal-header {
    position: absolute;
    top: -10.67vw; /* -40px / 3.75px */
    left: 50%;
    transform: translateX(-50%);
    width: 21.33vw; /* 80px / 3.75px */
    height: 21.33vw; /* 80px / 3.75px */
    border-radius: 50%;
    border: 0.27vw solid #fff; /* 1px / 3.75px */
    background: linear-gradient(to bottom, #01040D, #293044);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 4.27vw; /* 16px / 3.75px */
    font-weight: bold;
    box-shadow: 0 0.53vw 2.67vw rgba(0, 0, 0, 0.3); /* 2px 10px / 3.75px */
}

.modal-content {
    padding: 5.33vw; /* 20px / 3.75px */
    min-height: calc(85.33vw - 10.67vw); /* 320px - 40px / 3.75px */
}

.modal-inner-content {
    width: 100%;
}

.modal-close {
    position: absolute;
    bottom: -16vw; /* -60px / 3.75px */
    left: 50%;
    transform: translateX(-50%);
    width: 10.67vw; /* 40px / 3.75px */
    height: 10.67vw; /* 40px / 3.75px */
    border-radius: 50%;
    background-color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 0.53vw 2.67vw rgba(0, 0, 0, 0.2); /* 2px 10px / 3.75px */
}

.modal-close::before,
.modal-close::after {
    content: '';
    position: absolute;
    width: 5.33vw; /* 20px / 3.75px */
    height: 0.53vw; /* 2px / 3.75px */
    background-color: #333;
}

.modal-close::before {
    transform: rotate(45deg);
}

.modal-close::after {
    transform: rotate(-45deg);
}

/* Toast组件样式 - 移除遮罩层的透明度，避免页面变暗 */
.toast-mask {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: transparent;
    z-index: 999;
    pointer-events: none;
}

.toast-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.toast-container.active {
    opacity: 1;
}

.toast-content {
    background-color: rgba(0, 0, 0, 0.7);
    color: #fff;
    text-shadow: #000;
    padding: 3.2vw 4.27vw; /* 12px 16px / 3.75px */
    border-radius: 2.13vw; /* 8px / 3.75px */
    font-size: 3.73vw; /* 14px / 3.75px */
    max-width: 80%;
    text-align: center;
    word-wrap: break-word;
    box-shadow: 0 0.53vw 3.2vw rgba(0, 0, 0, 0.3); /* 2px 12px / 3.75px */
    display: flex;
    align-items: center;
    gap: 2.13vw; /* 8px / 3.75px */
}

.toast-icon {
    width: 5.33vw; /* 20px / 3.75px */
    height: 5.33vw; /* 20px / 3.75px */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Toast状态样式 */
.toast-warning .toast-content {
    background-color: rgba(0, 0, 0, 0.5);
}

.toast-info .toast-content {
    background-color: rgba(0, 0, 0, 0.5);
}

.toast-success .toast-content {
    background-color: rgba(0, 0, 0, 0.5);
}

.toast-error .toast-content {
    background-color: rgba(0, 0, 0, 0.5);
}

/* Toast动画 */
@keyframes toast-fade-in {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

@keyframes toast-fade-out {
    from {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    to {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.9);
    }
}

.toast-container.active {
    animation: toast-fade-in 0.3s ease;
}

.toast-container.closing {
    animation: toast-fade-out 0.3s ease;
}

/* 按钮角标样式 */
.btn-badge {
    position: relative;
}

.btn-badge .badge {
    position: absolute;
    top: -1.33vw; /* -5px / 3.75px */
    right: -1.33vw; /* -5px / 3.75px */
    min-width: 5.33vw; /* 20px / 3.75px */
    height: 5.33vw; /* 20px / 3.75px */
    padding: 0 1.6vw; /* 0 6px / 3.75px */
    background-color: #ff4444;
    color: #fff;
    font-size: 3.2vw; /* 12px / 3.75px */
    font-weight: bold;
    border-radius: 2.67vw; /* 10px / 3.75px */
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0.53vw 1.07vw rgba(0, 0, 0, 0.3); /* 2px 4px / 3.75px */
}

.btn-badge .badge:empty {
    display: none;
}