/* ========== 手机模拟器框架 ========== */
.phone-simulator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

/* 手机边框 */
.phone-frame {
    position: relative;
    width: 375px;
    height: 812px;
    background: #1a1a1a;
    border-radius: 50px;
    padding: 12px;
    box-shadow: 
        0 0 0 2px #333,
        0 25px 50px -12px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset;
}

/* 顶部刘海/灵动岛 */
.phone-notch {
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    width: 150px;
    height: 30px;
    background: #1a1a1a;
    border-radius: 0 0 20px 20px;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.speaker {
    width: 60px;
    height: 6px;
    background: linear-gradient(180deg, #333 0%, #222 100%);
    border-radius: 3px;
}

.camera {
    width: 10px;
    height: 10px;
    background: radial-gradient(circle at 30% 30%, #444, #111);
    border-radius: 50%;
    box-shadow: 0 0 0 1px #333;
}

/* 屏幕区域 */
.phone-screen {
    width: 100%;
    height: 100%;
    background: var(--bg-primary);
    border-radius: 40px;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
}

/* App内容容器 */
.app-container {
    flex: 1;
    overflow-y: auto;
    overflow-x: visible;
    position: relative;
    background: var(--bg-secondary);
    -webkit-overflow-scrolling: touch;
}

/* 底部导航栏 */
.bottom-nav {
    display: flex;
    justify-content: space-around;
    align-items: center;
    height: 84px;
    padding-bottom: 20px;
    background: var(--bg-primary);
    border-top: 1px solid var(--border-light);
    position: relative;
    z-index: 50;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    flex: 1;
    height: 100%;
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
}

.nav-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%) scale(0);
    width: 30px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 0 0 2px 2px;
    transition: transform var(--transition-fast);
}

.nav-item.active::before {
    transform: translateX(-50%) scale(1);
}

.nav-icon {
    width: 24px;
    height: 24px;
    color: var(--text-tertiary);
    transition: all var(--transition-fast);
}

.nav-item.active .nav-icon {
    color: var(--primary-color);
    transform: translateY(-2px);
}

.nav-label {
    font-size: 10px;
    color: var(--text-tertiary);
    transition: all var(--transition-fast);
}

.nav-item.active .nav-label {
    color: var(--primary-color);
    font-weight: 500;
}

.nav-item:active {
    opacity: 0.7;
}

/* Home键 */
.phone-home-button {
    position: absolute;
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 4px;
    background: #444;
    border-radius: 2px;
    transition: all var(--transition-fast);
}

.phone-frame:hover .phone-home-button {
    background: #555;
}

/* 设备信息 */
.device-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: rgba(255, 255, 255, 0.8);
}

.device-name {
    font-size: 16px;
    font-weight: 600;
}

.device-size {
    font-size: 12px;
    opacity: 0.7;
}

/* 状态栏模拟 */
.status-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 20px 0;
    height: 44px;
    background: var(--bg-primary);
    font-size: 14px;
    font-weight: 600;
}

.status-time {
    color: var(--text-primary);
}

.status-icons {
    display: flex;
    align-items: center;
    gap: 4px;
}

.status-icon {
    width: 16px;
    height: 16px;
}

/* 页面切换动画 */
.page {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-secondary);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.page-enter {
    animation: slideInRight 0.3s ease forwards;
}

.page-exit {
    animation: fadeOut 0.3s ease forwards;
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

/* 响应式适配 */
@media (max-width: 480px) {
    body {
        padding: 0;
        background: var(--bg-primary);
    }
    
    .phone-frame {
        width: 100vw;
        height: 100vh;
        border-radius: 0;
        padding: 0;
        box-shadow: none;
    }
    
    .phone-notch,
    .phone-home-button {
        display: none;
    }
    
    .phone-screen {
        border-radius: 0;
    }
    
    .device-info {
        display: none;
    }
}

/* 平板适配 */
@media (min-width: 768px) and (max-width: 1024px) {
    .phone-frame {
        transform: scale(0.9);
    }
}

/* PC端小屏幕适配 */
@media (max-height: 900px) {
    .phone-frame {
        transform: scale(0.85);
    }
    
    .device-info {
        display: none;
    }
}
