/* 手机框架基础样式 */
.phone-mockup { 
    width: 260px; 
    height: 530px; 
    border: 10px solid #1a1a1a; 
    border-radius: 45px; 
    position: relative; 
    background-size: cover; 
    background-position: center; 
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7); 
    overflow: hidden; 
    flex-shrink: 0;
    background-color: #000;
}

/* 顶部传感器区域 */
.dynamic-island { width: 80px; height: 25px; background: #000; border-radius: 20px; position: absolute; top: 8px; left: 50%; transform: translateX(-50%); z-index: 20; }
.punch-hole { width: 10px; height: 10px; background: #111; border-radius: 50%; position: absolute; top: 12px; left: 50%; transform: translateX(-50%); z-index: 20; }

/* 状态栏模拟 */
.status-bar { 
    position: absolute; 
    top: 12px; 
    left: 0; 
    right: 0; 
    padding: 0 20px; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    font-size: 10px; 
    color: white; 
    font-weight: 600; 
    z-index: 15;
}

/* 图标网格：增加顶部 padding 避开传感器和时间 */
.app-grid { 
    display: grid; 
    grid-template-columns: repeat(4, 1fr); 
    gap: 20px 14px; 
    padding: 85px 18px 20px; 
    width: 100%; 
}

.app-item { display: flex; flex-direction: column; align-items: center; }

/* 图标占位符 */
.app-icon-placeholder { 
    width: 46px; 
    height: 46px; 
    background: rgba(255,255,255,0.2); 
    backdrop-filter: blur(10px); 
    margin-bottom: 4px; 
    flex-shrink: 0; 
}

/* 修复预览图样式：使用 contain 而不是 cover */
.preview-img { 
    width: 46px !important;
    height: 46px !important;
    aspect-ratio: 1 / 1 !important; 
    object-fit: contain !important; 
    flex-shrink: 0 !important; 
}

/* 修复：为图标添加背景色，确保在透明图标时也能看到效果 */
/* 统一使用圆角矩形图标 */
.app-icon {
    border-radius: 22.5%;
    background-color: rgba(255, 255, 255, 0.1);
}

/* 底部 Dock 栏模拟 */
.ios-dock {
    position: absolute;
    bottom: 15px;
    left: 10px;
    right: 10px;
    height: 80px;
    background: rgba(255,255,255,0.25);
    backdrop-filter: blur(15px);
    border-radius: 30px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 0 10px;
}

.ios-home-indicator {
    position: absolute;
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: rgba(255,255,255,0.8);
    border-radius: 2px;
}

.app-label { 
    color: white; 
    font-size: 10px; 
    text-shadow: 0 1px 2px rgba(0,0,0,0.5); 
    margin-top: 4px; 
    font-weight: 400; 
}

.bg-ios { 
    background-image: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%); 
}

.bg-android { 
    background-image: url('https://images.unsplash.com/photo-1618005182384-a83a8bd57fbe?auto=format&fit=crop&q=80&w=400'); 
}

.spinner {
    width: 24px; 
    height: 24px; 
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%; 
    border-top-color: #fff; 
    animation: spin 1s ease-in-out infinite; 
    margin-right: 8px;
}

@keyframes spin { 
    to { transform: rotate(360deg); } 
}

/* 修复：为搜索预览和标签页预览图标增加尺寸 */
#prev-search, #prev-tab {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    padding: 2px;
    /* 增加尺寸以便更清晰可见 */
    width: 24px !important;
    height: 24px !important;
    object-fit: contain !important;
}

/* 修复：为搜索预览图标容器增加尺寸 */
.search-icon-container {
    width: 30px !important;
    height: 30px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* 修复：为标签页预览图标容器调整布局 */
.tab-preview-container {
    display: flex !important;
    align-items: center !important;
}

/* 为 ICO 预览添加背景色和圆角 */
#prev-ico-16, #prev-ico-32, #prev-ico-48 {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    padding: 2px;
    object-fit: contain !important;
}

/* 修复：增加 ICO 预览图标尺寸，使其更清晰 */
#prev-ico-16 {
    width: 32px !important;
    height: 32px !important;
}

#prev-ico-32 {
    width: 48px !important;
    height: 48px !important;
}

#prev-ico-48 {
    width: 64px !important;
    height: 64px !important;
}

/* SVG 预览样式 */
.svg-preview-container {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.svg-preview-container:hover {
    background-color: rgba(255, 255, 255, 0.15);
    transform: scale(1.05);
}

.svg-preview {
    width: 64px !important;
    height: 64px !important;
    object-fit: contain !important;
    border-radius: 8px;
    background-color: rgba(255, 255, 255, 0.1);
    padding: 4px;
    transition: all 0.3s ease;
}

.svg-preview:hover {
    transform: scale(1.1);
}

.svg-info {
    min-width: 120px;
}

.svg-info div {
    margin-bottom: 6px;
}

/* SVG 缩放动画 */
@keyframes svgScale {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.svg-preview.animated {
    animation: svgScale 2s ease-in-out infinite;
}