/* Steam风格配色变量 */
:root {
    --bg-primary: #000000;
    --bg-secondary: #0a0a0a;
    --bg-hover: #1a1a1a;
    --bg-active: #2a2a2a;
    --text-primary: #c7d5e0;
    --text-secondary: #8f98a0;
    --accent: #7D2BA8;
    --border: #1a1a1a;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    overflow: hidden;
    height: 100dvh;
    height: 100vh;
}

.landing-container {
    height: 100dvh;
    height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 8px;
    gap: 8px;
}

/* Logo区 - 紧凑 */
.logo-section {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 8px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 2px;
}

.logo-section i {
    font-size: 24px;
    color: var(--accent);
    flex-shrink: 0;
}

.logo-section h1 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.4;
    word-wrap: break-word;
    word-break: break-word;
}

/* 功能预览 - 网格拼图布局 */
.preview-section {
    flex: 1;
    min-height: 0;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 2px;
    padding: 4px;
    overflow: hidden;
}

.preview-section::-webkit-scrollbar {
    width: 6px;
}

.preview-section::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

.preview-section::-webkit-scrollbar-thumb {
    background: var(--bg-hover);
    border-radius: 3px;
}

.preview-section::-webkit-scrollbar-thumb:hover {
    background: var(--bg-active);
}

.preview-scroll {
    height: 100%;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 4px;
}

.preview-scroll img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 2px;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: border-color 0.2s, transform 0.2s;
}

.preview-scroll img:hover {
    border-color: var(--accent);
    transform: scale(1.02);
    z-index: 1;
}

/* 让某些图片占据2个格子 */
.preview-scroll img:nth-child(1) {
    grid-column: span 2;
}

.preview-scroll img:nth-child(5) {
    grid-column: span 2;
}

.preview-scroll img:nth-child(8) {
    grid-column: span 2;
}

/* 线路选择 - 紧凑 */
.routes-section {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 2px;
    padding: 4px;
    flex-shrink: 0;
    position: fixed;
    bottom: 38px;
    left: 0;
    right: 0;
    z-index: 100;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-top: 1px solid var(--border);
    border-bottom: none;
    border-radius: 2px 2px 0 0;
}

.routes-section h2 {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
    text-align: center;
}

.routes-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 4px;
}

.route-link {
    padding: 6px 8px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 2px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 12px;
    text-align: center;
    transition: background 0.15s, border-color 0.15s;
}

.route-link:hover {
    background: var(--bg-hover);
    border-color: var(--accent);
}

/* 下载区 - 紧凑 */
.download-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}

.download-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px;
    background: var(--bg-active);
    border: 2px solid var(--border);
    border-radius: 2px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: background 0.15s, border-color 0.15s;
}

.download-link:hover {
    background: var(--bg-hover);
}

.download-link.windows:hover {
    border-color: #0078d4;
}

.download-link.android:hover {
    border-color: #3ddc84;
}

.download-link i {
    font-size: 20px;
}

/* 平板适配 */
@media (max-width: 1023px) {
    .preview-scroll {
        grid-template-columns: repeat(4, 1fr);
        grid-template-rows: repeat(3, 1fr);
    }
    
    .preview-scroll img:nth-child(1),
    .preview-scroll img:nth-child(5),
    .preview-scroll img:nth-child(8) {
        grid-column: span 1;
    }
    
    .preview-scroll img:nth-child(3) {
        grid-column: span 2;
    }
    
    .preview-scroll img:nth-child(7) {
        grid-column: span 2;
    }
}

/* 手机适配 */
@media (max-width: 767px) {
    body {
        overflow: hidden;
        position: fixed;
        width: 100%;
    }
    
    .landing-container {
        height: 100vh;
        height: 100dvh;
        display: flex;
        flex-direction: column;
        padding: 3px;
        padding-bottom: 0;
        gap: 3px;
        position: relative;
    }
    
    .logo-section {
        padding: 4px 6px;
        flex-shrink: 0;
    }
    
    .logo-section h1 {
        font-size: 14px;
        line-height: 1.3;
    }
    
    .logo-section i {
        font-size: 16px;
        flex-shrink: 0;
    }
    
    .preview-section {
        flex: 1;
        min-height: 0;
        padding: 2px;
        padding-bottom: 100px;
        overflow-y: auto;
        margin-bottom: 0;
    }
    
    .preview-scroll {
        grid-template-columns: repeat(3, 1fr);
        grid-template-rows: repeat(4, 1fr);
        gap: 2px;
        min-height: 100%;
    }
    
    /* 手机端交错布局：让某些图片占2格 */
    .preview-scroll img:nth-child(1) {
        grid-column: span 2;
    }
    
    .preview-scroll img:nth-child(6) {
        grid-column: span 2;
    }
    
    .preview-scroll img:nth-child(9) {
        grid-column: span 2;
    }
    
    .routes-section {
        padding: 4px;
        flex-shrink: 0;
        position: fixed;
        bottom: 38px;
        left: 0;
        right: 0;
        z-index: 100;
        background: var(--bg-secondary);
        border: 1px solid var(--border);
        border-bottom: none;
        border-radius: 2px 2px 0 0;
    }
    
    .routes-section h2 {
        font-size: 10px;
        margin-bottom: 3px;
    }
    
    .routes-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 2px;
    }
    
    .route-link {
        font-size: 9px;
        padding: 5px 3px;
        background: var(--bg-active);
        border: 2px solid var(--border);
        border-radius: 2px;
    }
    
    .download-section {
        gap: 2px;
        flex-shrink: 0;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 100;
        padding: 4px;
        background: var(--bg-secondary);
    }
    
    .download-link {
        gap: 4px;
        font-size: 10px;
        padding: 6px 4px;
        background: var(--bg-active);
        border: 2px solid var(--border);
        border-radius: 2px;
    }
    
    .download-link i {
        font-size: 18px;
    }
}