/* css/modal.css - P5 风格弹窗 */

/* 1. 遮罩层 */
#p5-modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.85); /* 深色背景遮罩 */
    z-index: 10000; /* 保证在最上层 */
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none; /* 隐藏时无法点击 */
    transition: opacity 0.3s ease;
    backdrop-filter: blur(2px); /* 背景模糊 */
}

/* 激活状态 */
#p5-modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

/* 2. 弹窗主体 */
.p5-modal-box {
    background: #f0f0f0;
    width: 500px;
    max-width: 90%;
    border: 4px solid #151515;
    /* 初始状态：稍微缩小且旋转 */
    transform: scale(0.8) rotate(-5deg);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 15px 15px 0 #D20505; /* 经典的P5红阴影 */
    position: relative;
    /* 剪切角 */
    clip-path: polygon(2% 0, 100% 0, 100% 95%, 98% 100%, 0 100%, 0 5%);
}

/* 激活时的动画状态 */
#p5-modal-overlay.active .p5-modal-box {
    transform: scale(1) rotate(-2deg); /* 回正一点点，保持P5的歪斜感 */
}

/* 3. 标题栏 */
.p5-modal-header {
    background: #151515;
    color: #D20505;
    padding: 15px 25px;
    font-family: 'Bangers', cursive;
    font-size: 2rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* 标题栏右侧装饰点 */
.p5-modal-header::after {
    content: "!";
    color: #fce100;
    font-size: 1.5rem;
    transform: rotate(10deg);
}

/* 4. 内容区域 */
.p5-modal-content {
    padding: 30px 25px;
    color: #151515;
    font-family: 'Noto Sans SC', sans-serif;
    font-weight: bold;
    font-size: 1.1rem;
    line-height: 1.6;
    min-height: 60px;
}

/* 5. 底部按钮区 */
.p5-modal-footer {
    padding: 0 25px 25px;
    display: flex;
    justify-content: flex-end;
    gap: 15px;
}

/* 6. 弹窗专用按钮 */
.p5-modal-btn {
    border: 2px solid #151515;
    padding: 8px 30px;
    font-family: 'Bangers', cursive;
    font-size: 1.3rem;
    cursor: pointer;
    transform: skewX(-10deg);
    transition: all 0.2s;
    text-transform: uppercase;
    background: white;
    color: black;
}

.p5-modal-btn:hover {
    transform: skewX(-10deg) scale(1.1);
    box-shadow: 3px 3px 0 rgba(0,0,0,0.3);
    z-index: 1;
}

/* 确认按钮（红色） */
.p5-modal-btn.primary {
    background: #D20505;
    color: white;
}

/* 取消按钮（灰色） */
.p5-modal-btn.cancel {
    background: #ccc;
    color: #555;
    border-color: #888;
}