/* 主屏幕样式 */
#homescreen {
    background: var(--background-color);
}

.home-wallpaper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    opacity: 0.05;
    z-index: 0;
}

/* 状态栏 */
.status-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: max(env(safe-area-inset-top), 8px) 16px 8px;
    position: relative;
    z-index: 10;
}

.status-left,
.status-right {
    display: flex;
    align-items: center;
    gap: 6px;
}

.status-time {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.status-signal,
.status-battery {
    font-size: 16px;
}

/* 主屏幕内容 */
.home-content {
    position: relative;
    z-index: 1;
    padding: 20px 20px 100px;
    height: calc(100vh - 60px);
    overflow-y: auto;
}

/* 用户信息区域 */
.user-profile-area {
    text-align: center;
    margin-bottom: 32px;
    animation: fadeIn 0.6s ease;
}

.user-avatar-container {
    display: inline-block;
    margin-bottom: 12px;
    cursor: pointer;
    transition: transform 0.2s;
}

.user-avatar-container:active {
    transform: scale(0.95);
}

.user-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.user-signature {
    font-size: 14px;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 8px 16px;
    border-radius: 12px;
    transition: all 0.2s;
    display: inline-block;
}

.user-signature:hover {
    background: var(--surface-color);
}

/* 时间小组件 */
.time-widget {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.9));
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 24px;
    text-align: center;
    box-shadow: var(--shadow-md);
    margin-bottom: 16px;
    animation: slideInUp 0.6s ease;
}

.widget-time {
    font-size: 48px;
    font-weight: 300;
    color: var(--text-primary);
    margin-bottom: 8px;
    letter-spacing: -1px;
}

.widget-date {
    font-size: 16px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* 小组件容器 */
.widgets-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.widget {
    background: var(--surface-color);
    border-radius: 16px;
    padding: 16px;
    box-shadow: var(--shadow-sm);
    animation: slideInUp 0.6s ease;
}

.small-widget {
    display: flex;
    align-items: center;
    gap: 12px;
}

.widget-icon {
    font-size: 28px;
    flex-shrink: 0;
}

.widget-info {
    flex: 1;
    min-width: 0;
}

.widget-label {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.widget-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

/* 应用图标 */
.apps-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    padding: 0 8px;
}

.app-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s;
    animation: slideInUp 0.6s ease;
}

.app-icon:nth-child(1) { animation-delay: 0.1s; }
.app-icon:nth-child(2) { animation-delay: 0.15s; }
.app-icon:nth-child(3) { animation-delay: 0.2s; }
.app-icon:nth-child(4) { animation-delay: 0.25s; }

.app-icon:active {
    transform: scale(0.9);
}

.app-icon-img {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    box-shadow: var(--shadow-md);
    transition: all 0.2s;
}

.app-icon:active .app-icon-img {
    box-shadow: var(--shadow-sm);
}

.app-name {
    font-size: 12px;
    color: var(--text-primary);
    font-weight: 500;
    text-align: center;
}

/* Dock */
.dock {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100px;
    padding: 12px 20px;
    padding-bottom: max(env(safe-area-inset-bottom), 12px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.dock-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--blur-bg);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-top: 0.5px solid var(--border-color);
    z-index: -1;
}

/* 响应式调整 */
@media (max-width: 375px) {
    .app-icon-img {
        width: 56px;
        height: 56px;
        font-size: 28px;
    }
    
    .widget-time {
        font-size: 40px;
    }
}

@media (min-width: 768px) {
    .home-content {
        max-width: 500px;
        margin: 0 auto;
    }
}
