/* ==================== AI导航页面专属样式 ==================== */

/* 基础重置与全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #0f172a;
    color: #fff;
    overflow: hidden; /* 移除滚动条 */
}

/* 页面容器 */
.desktop-container {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transform-style: preserve-3d;
}

/* ==================== 顶部状态栏 ==================== */
.status-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 36px;
    background: rgba(10, 14, 26, 0.95);
    backdrop-filter: blur(12px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    z-index: 1001;
    border-bottom: 1px solid rgba(100, 200, 255, 0.1);
}

.status-left {
    display: flex;
    align-items: center;
    gap: 18px;
}

.status-logo {
    font-size: 14px;
    font-weight: 600;
    color: #64c8ff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-logo span {
    font-size: 18px;
}

.status-time {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    font-family: 'SF Mono', Monaco, monospace;
}

.status-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.status-badge {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    padding: 4px 12px;
    background: rgba(100, 200, 255, 0.12);
    border-radius: 12px;
}

.status-badge a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: color 0.3s ease;
}

.status-badge a:hover {
    color: #64c8ff;
}

.status-copyright {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
}

/* ==================== 桌面背景 ==================== */
.desktop-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('https://images.unsplash.com/photo-1451187580459-43490279c0fa?w=1920&q=80') center/cover no-repeat;
    filter: brightness(0.4) contrast(1.2);
    z-index: 0;
}

.desktop-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg,
        rgba(15, 23, 42, 0.3) 0%,
        rgba(15, 23, 42, 0.6) 50%,
        rgba(15, 23, 42, 0.95) 100%);
    z-index: 1;
    pointer-events: none;
}

.desktop-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(99, 102, 241, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(99, 102, 241, 0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: 2;
    animation: gridMove 20s linear infinite;
    pointer-events: none;
}

.desktop-scanline {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: linear-gradient(90deg, transparent, #6366f1, #818cf8, #6366f1, transparent);
    box-shadow: 0 0 30px #6366f1, 0 0 60px rgba(99, 102, 241, 0.5);
    z-index: 0;
    animation: scanline 3s linear infinite;
    pointer-events: none;
}

.desktop-glow {
    position: fixed;
    top: 10%;
    left: 10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.3) 0%, rgba(99, 102, 241, 0.1) 40%, transparent 70%);
    border-radius: 50%;
    filter: blur(100px);
    animation: glowPulse 8s ease-in-out infinite;
    pointer-events: none;
    z-index: 1;
}

.desktop-glow-2 {
    position: fixed;
    bottom: 10%;
    right: 10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.3) 0%, rgba(16, 185, 129, 0.1) 40%, transparent 70%);
    border-radius: 50%;
    filter: blur(100px);
    animation: glowPulse 8s ease-in-out infinite 4s;
    pointer-events: none;
    z-index: 1;
}

@keyframes gridMove {
    0% { transform: perspective(500px) rotateX(60deg) translateY(0); }
    100% { transform: perspective(500px) rotateX(60deg) translateY(50px); }
}

@keyframes scanline {
    0% { top: -6px; opacity: 1; }
    100% { top: 100%; opacity: 1; }
}

@keyframes glowPulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.3); opacity: 0.8; }
}

/* ==================== 桌面图标区域 ==================== */
.desktop-content {
    flex: 1;
    position: relative;
    z-index: 2;
    padding: 60px 16px 180px; /* 为dock和页码指示器留出空间 */
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: calc(100vh - 36px); /* 确保最小高度 */
    overflow-y: auto; /* 内容区域可以滚动 */
    overflow-x: hidden;
}

.icon-grid-wrapper {
    width: 100%;
    max-width: 1400px;
    position: relative;
    z-index: 2;
}

.icon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 2rem;
    padding: 0;
    width: 100%;
}

/* 翻页按钮 */
.pagination-controls {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    padding: 0 24px;
    z-index: 10;
    pointer-events: none;
}

.page-btn {
    pointer-events: auto;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(15, 20, 35, 0.95);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(100, 200, 255, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0.85;
    box-shadow: 0 4px 20px rgba(100, 200, 255, 0.2), 0 0 30px rgba(100, 200, 255, 0.1);
}

.page-btn:hover {
    opacity: 1;
    background: rgba(100, 200, 255, 0.2);
    border-color: rgba(100, 200, 255, 0.6);
    transform: scale(1.15);
    box-shadow: 0 6px 30px rgba(100, 200, 255, 0.35), 0 0 40px rgba(100, 200, 255, 0.15);
}

.page-btn:active {
    transform: scale(0.95);
}

.page-btn svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: #64c8ff;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.page-btn.disabled {
    opacity: 0.25;
    cursor: not-allowed;
}

.page-btn.disabled:hover {
    opacity: 0.25;
    transform: none;
    background: rgba(15, 20, 35, 0.95);
    border-color: rgba(100, 200, 255, 0.35);
    box-shadow: none;
}

/* 页码指示器 */
.page-indicator {
    position: fixed;
    bottom: 130px; /* 调整位置，避免与dock重叠 */
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
    padding: 8px 16px;
    background: rgba(15, 20, 35, 0.8);
    backdrop-filter: blur(12px);
    border-radius: 20px;
    border: 1px solid rgba(100, 200, 255, 0.15);
}

.page-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(100, 200, 255, 0.4);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid rgba(100, 200, 255, 0.3);
}

.page-dot.active {
    background: #64c8ff;
    transform: scale(1.4);
    border-color: rgba(100, 200, 255, 0.8);
    box-shadow: 0 0 12px rgba(100, 200, 255, 0.5);
}

.page-dot:hover {
    background: rgba(100, 200, 255, 0.7);
    transform: scale(1.2);
}

.app-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    user-select: none;
    position: relative;
    padding: 10px 5px;
}

.app-icon:hover {
    transform: translateY(-8px) scale(1.05);
}

.icon-wrapper {
    width: 70px;
    height: 70px;
    background: linear-gradient(145deg, rgba(100, 200, 255, 0.12), rgba(150, 100, 255, 0.08));
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    box-shadow: 0 4px 20px rgba(100, 200, 255, 0.1);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(100, 200, 255, 0.1);
}

.icon-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 45%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.06) 0%, transparent 100%);
    border-radius: 18px 18px 0 0;
}

.app-icon:hover .icon-wrapper {
    box-shadow: 0 10px 35px rgba(100, 200, 255, 0.22);
    background: linear-gradient(145deg, rgba(100, 200, 255, 0.18), rgba(150, 100, 255, 0.14));
    border-color: rgba(100, 200, 255, 0.25);
}

.icon-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 10px;
    border-radius: 18px;
}

.icon-emoji {
    font-size: 2.2rem;
}

.icon-label {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.82);
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    font-weight: 500;
    transition: color 0.3s ease;
}

.app-icon:hover .icon-label {
    color: #64c8ff;
}

/* ==================== 底部Dock栏 ==================== */
.dock {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    padding: 6px 16px;
    border-radius: 28px;
    background: rgba(15, 20, 35, 0.9);
    backdrop-filter: blur(24px);
    border: 1px solid rgba(100, 200, 255, 0.12);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.45), 0 2px 10px rgba(0, 0, 0, 0.3);
}

.dock::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 50%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, transparent 100%);
    border-radius: 28px 28px 0 0;
}

.dock-items {
    position: relative;
    z-index: 2;
    display: flex;
    gap: 4px;
}

.dock-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 16px;
    border-radius: 18px;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.65);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    min-width: 72px;
    position: relative;
}

.dock-item:hover {
    background: rgba(100, 200, 255, 0.12);
    transform: translateY(-8px);
    color: #64c8ff;
}

.dock-item.active {
    background: rgba(100, 200, 255, 0.18);
    color: #64c8ff;
}

.dock-item.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    width: 6px;
    height: 6px;
    background: #64c8ff;
    border-radius: 50%;
}

.dock-icon {
    font-size: 1.7rem;
    margin-bottom: 4px;
    transition: transform 0.3s ease;
}

.dock-item:hover .dock-icon {
    transform: scale(1.15);
}

.dock-label {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.2px;
}

/* ==================== 响应式适配 ==================== */

/* 大屏幕 */
@media (min-width: 1200px) {
    .icon-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 2.5rem;
    }
    
    .icon-wrapper {
        width: 80px;
        height: 80px;
    }
    
    .icon-emoji {
        font-size: 2.4rem;
    }
}

/* 平板横屏 */
@media (max-width: 1024px) {
    .icon-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 1.8rem;
    }
    
    .icon-wrapper {
        width: 68px;
        height: 68px;
    }
    
    .icon-emoji {
        font-size: 2rem;
    }
}

/* 平板竖屏 */
@media (max-width: 768px) {
    .status-bar {
        height: 32px;
        padding: 0 12px;
    }
    
    .status-logo {
        font-size: 12px;
    }
    
    .status-time, .status-badge, .status-copyright {
        font-size: 10px;
    }
    
    .status-right {
        display: none;
    }
    
    .desktop-content {
        padding: 60px 12px 160px;
    }
    
    .icon-grid {
        grid-template-columns: repeat(auto-fill, minmax(85px, 1fr));
        gap: 1.5rem;
    }
    
    .icon-wrapper {
        width: 60px;
        height: 60px;
    }
    
    .icon-emoji {
        font-size: 1.8rem;
    }
    
    .icon-label {
        font-size: 0.7rem;
    }
    
    /* 移动端翻页按钮 */
    .pagination-controls {
        padding: 0 12px;
    }
    
    .page-btn {
        width: 50px;
        height: 50px;
    }
    
    .page-indicator {
        bottom: 120px;
        padding: 6px 12px;
    }
    
    /* 移动端Dock */
    .dock {
        padding: 4px 10px;
        border-radius: 22px;
    }
    
    .dock-item {
        padding: 6px 10px;
        min-width: 52px;
    }
    
    .dock-icon {
        font-size: 1.3rem;
    }
    
    .dock-label {
        font-size: 9px;
    }
}

/* 手机横屏 */
@media (max-width: 600px) {
    .icon-grid {
        grid-template-columns: repeat(auto-fill, minmax(75px, 1fr));
        gap: 1.2rem;
    }
    
    .icon-wrapper {
        width: 54px;
        height: 54px;
        border-radius: 14px;
    }
    
    .icon-emoji {
        font-size: 1.6rem;
    }
    
    .icon-label {
        font-size: 0.65rem;
    }
    
    .page-btn {
        width: 44px;
        height: 44px;
    }
    
    .page-btn svg {
        width: 18px;
        height: 18px;
    }
}

/* 手机竖屏 */
@media (max-width: 480px) {
    .icon-grid {
        grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
        gap: 1rem;
    }
    
    .icon-wrapper {
        width: 50px;
        height: 50px;
        border-radius: 12px;
    }
    
    .icon-emoji {
        font-size: 1.5rem;
    }
    
    .app-icon {
        padding: 6px 3px;
    }
    
    .page-indicator {
        bottom: 110px;
    }
    
    .page-dot {
        width: 8px;
        height: 8px;
    }
    
    .status-right {
        display: none;
    }
}

/* 移动端隐藏动态元素 */
@media (max-width: 768px) {
    .floating-dot,
    .desktop-lines::before,
    .desktop-lines::after {
        display: none;
    }
    
    .desktop-lines {
        display: none;
    }
}