/* --- 全局和基础样式 --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f0f2f5;
    color: #333;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 40px;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

/* --- 手机墙网格布局 --- */
#phone-grid-container {
    display: grid;
    /* 
     * 响应式网格：
     * - auto-fill: 自动填充尽可能多的列。
     * - minmax(220px, 1fr): 每列最小宽度220px，最大平分剩余空间。
     */
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 40px; /* 网格间距 */
    justify-items: center; /* 单元格内容水平居中 */
    padding: 0 20px;
}
.description{
    position: absolute;
    top: -30px;
    width: 100%;
    font: 1em sans-serif;
    text-align: center;
    color: #000058;
}
.description span {
    text-decoration: underline;
}
.deviceGroup{
    cursor: pointer;
}
.screenImage{
    width: 100%;
    height: 100%;
    object-fit: cover; /* 保持视频比例，裁剪多余部分 */
}
/* --- 小米手机样式 --- */
.phone {
    /* 设定手机的尺寸和宽高比 (参考小米14: 152.8mm x 71.5mm ≈ 2.14:1) */
    width: 220px;
    height: 428px;
    
    position: relative;
    background-color: #1a1a1a; /* 手机边框颜色 */
    border-radius: 28px; /* 模拟手机外壳圆角 */
    padding: 4px; /* 模拟金属边框和屏幕的间隙 */
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.3),  /* 主阴影，营造悬浮感 */
        0 0 0 1px rgba(255, 255, 255, 0.1) inset; /* 内部高光，增加质感 */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
/* 
.phone:hover {
    transform: translateY(-10px) scale(1.03);
    box-shadow: 0 30px 50px rgba(0, 0, 0, 0.4);
} */

/* 手机屏幕 */
.screen {
    position: absolute;
    top: 4px;
    left: 4px;
    right: 4px;
    bottom: 4px;
    background-color: #000;
    border-radius: 24px; /* 屏幕圆角，比外壳小一点 */
    overflow: hidden; /* 关键：隐藏视频超出圆角的部分 */
    display: flex;
    justify-content: center;
    align-items: center;
}

/* 视频元素样式 */
.screen video {
    width: 100%;
    height: 100%;
    object-fit: cover; /* 关键：让视频填满屏幕，保持比例，裁剪多余部分 */
}

/* 屏幕顶部的挖孔摄像头 */
.camera-cutout {
    position: absolute;
    top: 15px;
    left: 50%;
    transform: translateX(-50%);
    width: 12px;
    height: 12px;
    background-color: #0c0c0c;
    border-radius: 50%;
    z-index: 10; /* 确保在视频上方 */
    /* 给摄像头一个细微的边框，增加真实感 */
    border: 1px solid rgba(255, 255, 255, 0.05);
}