/* iPhone 15 外观模拟 */
.phone-frame {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 2rem;
}

.phone-title {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 1rem 1rem 0 0;
    font-weight: 600;
    font-size: 0.875rem;
    text-align: center;
    width: 100%;
    max-width: 375px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.phone-container {
    position: relative;
    width: 375px;
    height: 812px;
    background: #000;
    border-radius: 2.5rem;
    padding: 0.5rem;
    box-shadow: 
        0 0 0 2px #1f2937,
        0 20px 40px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    overflow: hidden;
}

.phone-notch {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 150px;
    height: 30px;
    background: #000;
    border-radius: 0 0 1rem 1rem;
    z-index: 20;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.phone-container iframe {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 2rem;
    background: #fff;
}

/* 响应式布局 */
@media (max-width: 768px) {
    .phone-container {
        width: 320px;
        height: 690px;
    }
    
    .phone-title {
        max-width: 320px;
    }
}

@media (max-width: 480px) {
    .phone-container {
        width: 280px;
        height: 605px;
    }
    
    .phone-title {
        max-width: 280px;
        font-size: 0.75rem;
        padding: 0.5rem 1rem;
    }
}

/* 页面加载动画 */
.phone-frame {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 悬停效果 */
.phone-frame:hover {
    transform: translateY(-5px);
    transition: transform 0.3s ease;
}

.phone-frame:hover .phone-container {
    box-shadow: 
        0 0 0 2px #1f2937,
        0 25px 50px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset;
}

/* 页面内容样式优化 */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* 确保iframe内容正确显示 */
iframe {
    background: #f8f9fa;
}

/* 加载状态 */
.phone-container::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 3px solid #f3f4f6;
    border-top: 3px solid #10b981;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 10;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* 移除加载动画当iframe加载完成 */
iframe[src] {
    opacity: 0;
    transition: opacity 0.3s ease;
}

iframe[src]:not([src=""]) {
    opacity: 1;
}

iframe[src]:not([src=""]) + .phone-container::before {
    display: none;
} 