@charset "utf-8";
/* CSS Document */

/* 演示内容卡片 - 展示页面常规元素，测试弹窗覆盖效果 */
        .demo-content {
            max-width: 800px;
            background: rgba(255, 255, 255, 0.92);
            backdrop-filter: blur(2px);
            border-radius: 2rem;
            padding: 2rem 2rem 2.5rem;
            box-shadow: 0 20px 35px -12px rgba(0, 0, 0, 0.2);
            text-align: center;
            border: 1px solid rgba(255, 255, 255, 0.5);
            transition: all 0.2s ease;
        }

        .demo-content h1 {
            font-size: 2rem;
            background: linear-gradient(135deg, #1f2b3c, #2c3e50);
            background-clip: text;
            -webkit-background-clip: text;
            color: transparent;
            margin-bottom: 1rem;
        }

        .demo-content p {
            color: #2c3e50;
            line-height: 1.6;
            margin: 1rem 0;
            font-size: 1rem;
        }

        .demo-card {
            background: #ffffffcc;
            border-radius: 1.5rem;
            padding: 1rem;
            margin: 1.5rem 0;
            box-shadow: 0 6px 14px rgba(0, 0, 0, 0.05);
        }

        button {
            background: #2c3e50;
            border: none;
            padding: 10px 20px;
            border-radius: 40px;
            color: white;
            font-weight: 600;
            cursor: pointer;
            transition: 0.2s;
            box-shadow: 0 2px 6px rgba(0,0,0,0.1);
        }

        button:hover {
            background: #1e2b38;
            transform: translateY(-2px);
        }

        .demo-note {
            font-size: 0.85rem;
            color: #5a6e7c;
            border-top: 1px solid #cddae9;
            padding-top: 1rem;
            margin-top: 1rem;
        }

        /* ========= 弹窗模态框样式 ========= */
        /* 遮罩层 - 全屏固定，背景半透明，支持滚动 (确保小屏可滚动看到完整弹窗) */
        .modal-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0, 0, 0, 0.75);
            backdrop-filter: blur(4px);
            z-index: 1000;
            display: flex;
            align-items: center;
            justify-content: center;
            /* 关键：允许内容超出时滚动，以保证在任何屏幕高度下都能看到完整300x600弹窗 */
            overflow-y: auto;
            opacity: 1;
            visibility: visible;
            transition: opacity 0.25s ease, visibility 0.25s ease;
        }

        /* 弹窗主体容器: 固定宽300px 高600px，相对定位用于关闭按钮绝对定位 */
        .popup-card {
            position: relative;
            width: 360px;
            height: 716px;
            background: #fff;
            border-radius: 24px;
            box-shadow: 0 25px 45px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.2) inset;
            overflow: hidden;
            /* 优雅入场动画 */
            animation: floatScale 0.3s cubic-bezier(0.2, 0.9, 0.4, 1.1);
            margin: 30px auto;
        }

        /* 图片本身 - 完全填充弹窗，采用 cover 保持比例覆盖，不会变形留白 */
        .popup-image {
            width: 100%;
            height: 100%;
            display: block;
            object-fit: cover;
            /* 确保图片覆盖整个区域，无白边，同时保留良好视觉效果 */
            object-position: center;
            background-color: #f0f2f5;
        }

        /* 右上角关闭按钮：圆形白色背景，精致阴影，悬浮效果 */
        .close-btn {
            position: absolute;
            top: 14px;
            right: 14px;
            width: 36px;
            height: 36px;
            background: rgba(30, 30, 40, 0.85);
            backdrop-filter: blur(6px);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all 0.2s ease;
            border: none;
            box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
            z-index: 20;
            font-size: 20px;
            font-weight: 500;
            color: white;
            line-height: 1;
            padding: 0;
            font-family: system-ui, 'Segoe UI', monospace;
        }

        .close-btn:hover {
            background: #e74c3c;
            transform: scale(1.05);
            box-shadow: 0 6px 14px rgba(0, 0, 0, 0.25);
        }

        .close-btn:active {
            transform: scale(0.96);
        }

        /* 优雅缩放弹窗入场 */
        @keyframes floatScale {
            0% {
                opacity: 0;
                transform: scale(0.92) translateY(12px);
            }
            100% {
                opacity: 1;
                transform: scale(1) translateY(0);
            }
        }

        /* 弹窗关闭时动画 (用于隐藏时优雅消失) */
        .modal-overlay.closing {
            opacity: 0;
            visibility: hidden;
            transition: opacity 0.2s ease, visibility 0s linear 0.2s;
        }

        /* 针对超小屏幕（低于620px高度）额外增加自适应内边距，确保滚动手感舒适 */
        @media (max-height: 660px) {
            .modal-overlay {
                align-items: flex-start;
            }
            .popup-card {
                margin: 20px auto;
            }
        }

        /* 如果设备宽度极窄（低于340px），保持弹窗完整，左右留一点边距 */
        @media (max-width: 340px) {
            .popup-card {
                width: 280px;
                height: 560px;
            }
        }

        /* 防止body内容在弹窗显示期间滚动 (增强体验，但弹窗关闭后恢复) */
        body.modal-open {
            overflow: hidden;
        }