body {
    font-family: 'Noto Sans SC', sans-serif;
    background-color: #f3f4f6;
    user-select: none; /* 防止拖拽时选中文本 */
}
.poster-container {
    /* width: 动态计算 */
    min-height: 2800px; /* 高度相应增加，保持比例 */
    background: linear-gradient(180deg, #FFF0F5 0%, #FFE4E1 100%);
    overflow: hidden;
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    padding: 100px; /* 增加内边距 */
    display: flex;
    flex-direction: column;
    transition: width 0.3s ease; /* 添加宽度过渡动画 */
}

/* -------------------
   iPhone 15 Pro Max Style Frame (V6: 物理尺寸比例修正)
   ------------------- */
.iphone-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 76.7/159.9; /* 严格按照 iPhone 15 Pro Max 物理尺寸比例 (约 1:2.08) */
    z-index: 10;
}

/* 边框 (Bezel) - Max 边框视觉上更窄 */
.iphone-bezel {
    position: absolute;
    inset: 0;
    background: transparent;
    border: 7px solid #000; /* 黑边更细 */
    border-radius: 52px; /* Max 的圆角比例 */
    box-shadow: 
        0 0 0 4px #e5e7eb, /* 钛金属外框 */
        0 0 0 5px #d1d5db, 
        0 25px 50px -12px rgba(0,0,0,0.4); /* 移除内发光，保留外部投影 */
    pointer-events: none;
    z-index: 50;
}

/* 屏幕区域 - V7: 消除白边，完美贴合 */
.iphone-screen {
    position: absolute;
    top: 7px; left: 7px; right: 7px; bottom: 7px; /* 与边框厚度一致，无缝衔接 */
    background-color: #000; /* 背景改为黑色，防止任何可能的白边 */
    border-radius: 45px; /* 严格匹配内圆角 (52px - 7px = 45px) */
    overflow: hidden;
    z-index: 10;
    cursor: grab;
    display: flex;
    align-items: center;
    justify-content: center;
}
.iphone-screen:active {
    cursor: grabbing;
}

/* 图片本身 */
.editable-image {
    max-width: none;
    transform-origin: center center;
    will-change: transform;
}

/* 灵动岛 (Island) */
.dynamic-island {
    position: absolute;
    top: 18px;
    left: 50%;
    transform: translateX(-50%);
    width: 24%;
    height: 26px;
    background-color: #000;
    border-radius: 13px;
    z-index: 60;
    pointer-events: none;
}

/* 刘海 (Notch) */
.notch {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40%;
    height: 24px;
    background-color: #000;
    border-bottom-left-radius: 16px;
    border-bottom-right-radius: 16px;
    z-index: 60;
    pointer-events: none;
}

/* 按键 */
.iphone-btn {
    position: absolute;
    background: #2d2d2d;
    border-radius: 4px;
    width: 4px;
    z-index: 5;
}
.btn-silent { top: 100px; left: -4px; height: 30px; }
.btn-vol-up { top: 150px; left: -4px; height: 60px; }
.btn-vol-down { top: 230px; left: -4px; height: 60px; }
.btn-power { top: 180px; right: -4px; height: 90px; }

/* ------------------- */

[contenteditable]:focus {
    outline: 2px dashed #ec4899;
    background: rgba(255,255,255,0.8);
    border-radius: 4px;
    min-width: 100px;
    cursor: text;
}

/* 右侧预览区域 */
.flex-1.bg-gray-200.overflow-auto.flex.justify-center.p-10.relative {
    /* V9: 启用滚动条，并允许内容溢出 */
    overflow: auto !important; 
    align-items: flex-start; /* 从顶部开始排列，而不是居中 */
}

/* V11: 预览缩放比例微调 */
#poster {
    transform: scale(0.25); /* 进一步缩小预览比例 */
    transform-origin: top center;
    margin-bottom: -2200px; /* 抵消 scale 带来的底部空白 */
}
