@media (max-width: 767.98px) {
    html, body {
        height: auto;
        overflow: visible;
    }

    main.d-flex {
        flex-direction: column;
        height: auto;
    }

    .sidebar {
        width: 100% !important;
        height: auto;
        min-height: auto !important;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }

    .main-content {
        height: auto;
        overflow: visible;
    }

    .top-bar {
        position: sticky;
        top: 0;
    }

    .b-example-vr {
        display: none;
    }

    .mobile-full-width {
        max-width: 100% !important; /* 覆盖行内的 140px */
        width: 100% !important;
        height: auto !important;
        border-radius: 12px !important; /* 手机上大圆角更好看 */
    }

    /* 2. 移除手机上的侧边边框，改为居中对齐 */
    .custom-mobile-border {
        border-left: none !important;
        padding-left: 0 !important;
        display: block !important; /* 手机端撑开容器 */
    }

    /* 3. 让文字在手机端居中，且宽度占满 */
    .custom-mobile-text {
        max-width: 100% !important;
        text-align: center !important;
        margin: 1rem 0 !important;
        font-size: 0.9rem;
    }

    .custom-avatar-container {
        /* 使用 !important 覆盖内联样式 */
        border-left: none !important;
        padding-left: 0 !important; /* 手机端通常不需要左侧内边距 */
    }
}


/* --- Sophisticated Thin-Frame Phone Mockup (320px - Gap Fixed) --- */
.cool-phone-frame {
    width: 100%;
    max-width: 320px;
    aspect-ratio: 320 / 718;

    background: #2c1e14;
    /* 窄边框设定 */
    border: 8px solid #3d2b1d;
    border-radius: 48px;

    position: relative;
    /* 核心修复 1：确保容器不会因为内部元素溢出而产生额外间隙 */
    overflow: hidden;
    margin: 0 auto;
    display: flex; /* 使用 flex 确保内部容器完全填充 */

    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* 屏幕内部容器 */
.phone-screen {
    width: 100%;
    height: 100%;
    background: #000;
    /* 核心修复 2：如果 padding 导致了间隙，确保 box-sizing 是 border-box */
    box-sizing: border-box;
    padding: 0; /* 先归零检查，如果需要防遮挡可改回 2px */
    border-radius: 40px;
    overflow: hidden;
    position: relative;
    display: flex;
}

/* GIF 样式 */
.android-gif {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* 核心修复 3：消除 inline 元素的底边间隙 */
    display: block;
    border: none;
    margin: 0;
}

/* 摄像头和指示条位置微调 */

.phone-home-bar {
    width: 30%;
    height: 4px;
    background: #d4af37;
    opacity: 0.3;
    border-radius: 10px;
    position: absolute;
    bottom: 8px;
    left: 35%;
    z-index: 10;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .cool-phone-frame {
        max-width: 250px;
        border-width: 6px;
        border-radius: 38px;
    }
}