@import url("footer.css");
@import url("theme.css");
@import url("dynamic.css");
@import url("hero.css");
/* @import url("download.css"); Removed: Integrated into hero */

/* Global Design System */
:root {
    --primary-color: #3370FF;
    --text-main: #1D1D1F;
    --text-sub: #86868B;
    --bg-body: #FAFAFA; /* 极浅灰，比纯白更有质感 */
    --card-bg: #FFFFFF;
    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 8px;
    --shadow-sm: 0 4px 12px rgba(0,0,0,0.04);
    --shadow-hover: 0 16px 40px rgba(0,0,0,0.08);
    --transition-base: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    --nav-height: 70px;
}

html {
    scroll-padding-top: 90px; /* Header height + 20px buffer */
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-body);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--text-main);
    -webkit-font-smoothing: antialiased;
    padding-top: var(--nav-height); /* Prevent content jump */
}

.web-content { overflow-x: hidden; }

/* 滚动动画类 (已禁用) */
.reveal-up {
    opacity: 1;
    transform: none;
}

/* =========================================
   Modern Header Redesign
   ========================================= */
.navbar-custom {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--nav-height);
    z-index: 1000;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.8); /* Default state: slightly transparent white */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.navbar-custom.scrolled {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

.navbar-container {
    max-width: 1200px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
}

/* Logo */
.navbar-logo {
    display: flex;
    align-items: center;
    font-size: 20px;
    font-weight: 700;
    color: var(--text-main);
    text-decoration: none;
    letter-spacing: -0.5px;
}
.navbar-logo:hover { color: var(--primary-color); }

/* Center Nav */
.navbar-menu {
    display: flex;
    gap: 40px;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}
.nav-link {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-sub);
    position: relative;
    padding: 8px 0;
    transition: color 0.3s;
}
.nav-link:hover, .nav-link.active {
    color: var(--text-main);
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: all 0.3s;
    transform: translateX(-50%);
    opacity: 0;
}
.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
    opacity: 1;
}

/* Right Actions */
.navbar-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Auth Buttons */
.btn-login {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-main);
    padding: 8px 16px;
    border-radius: 20px;
    transition: background 0.3s;
}
.btn-login:hover { background: rgba(0,0,0,0.05); color: var(--text-main); }

.btn-register {
    font-size: 14px;
    font-weight: 500;
    color: #fff;
    background: var(--text-main);
    padding: 8px 20px;
    border-radius: 20px;
    transition: all 0.3s;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}
.btn-register:hover {
    background: var(--primary-color);
    transform: translateY(-1px);
    box-shadow: 0 6px 15px rgba(51, 112, 255, 0.2);
    color: #fff;
}

/* User Dropdown */
.user-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 4px 10px;
    border-radius: 20px;
    transition: background 0.3s;
}
.user-trigger:hover { background: rgba(0,0,0,0.03); }
.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(0,0,0,0.1);
}
.user-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-main);
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-dropdown { position: relative; }
.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 10px;
    width: 160px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s;
    border: 1px solid rgba(0,0,0,0.05);
}
.user-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.dropdown-menu a {
    display: block;
    padding: 10px 12px;
    font-size: 14px;
    color: var(--text-main);
    border-radius: 8px;
    transition: background 0.2s;
}
.dropdown-menu a:hover {
    background: #F5F5F7;
    color: var(--primary-color);
}
.dropdown-menu i { margin-right: 8px; color: var(--text-sub); }

.mobile-toggle { display: none; font-size: 24px; cursor: pointer; color: var(--text-main); }

/* Mobile Menu Drawer */
.mobile-menu-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1001;
    display: none;
    opacity: 0;
    transition: opacity 0.3s;
}
.mobile-menu-overlay.active { display: block; opacity: 1; }

.mobile-menu-drawer {
    position: fixed;
    top: 0; right: -280px; width: 280px; height: 100%;
    background: #fff;
    z-index: 1002;
    transition: right 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-shadow: -5px 0 20px rgba(0,0,0,0.1);
    padding: 20px;
    box-sizing: border-box;
}
.mobile-menu-drawer.active { right: 0; }

.drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}
.drawer-title { font-size: 18px; font-weight: 700; color: var(--text-main); }
.close-drawer { font-size: 24px; cursor: pointer; color: var(--text-sub); }

.drawer-link {
    display: block;
    padding: 12px 0;
    font-size: 16px;
    color: var(--text-main);
    border-bottom: 1px solid #f5f5f7;
}
.drawer-link:last-child { border-bottom: none; }
.drawer-link.active { color: var(--primary-color); font-weight: 600; }

.drawer-divider { height: 20px; }
.drawer-btn {
    display: block;
    text-align: center;
    margin-bottom: 10px;
}
.drawer-user {
    display: flex;
    align-items: center;
    padding: 10px 0;
    margin-bottom: 10px;
}
.user-avatar-sm { width: 40px; height: 40px; border-radius: 50%; margin-right: 10px; }

/* 1. Hero Section - Integrated Layout */
.hero-section {
    position: relative;
    height: 85vh;
    min-height: 700px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-bottom: 60px;
    margin-top: -70px; /* Offset Header height */
}
.hero-bg {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 0;
}
.hero-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to bottom, rgba(250,250,250,0.3) 0%, rgba(250,250,250,0.8) 80%, rgba(250,250,250,1) 100%);
    pointer-events: none;
}

.hero-content-wrapper {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 1200px;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 60px;
}

.hero-text {
    text-align: center;
    max-width: 800px;
}

.hero-title {
    font-size: 64px;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -1.5px;
    margin-bottom: 24px;
    background: linear-gradient(135deg, #1D1D1F 0%, #434343 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hero-subtitle {
    font-size: 24px;
    color: var(--text-sub);
    font-weight: 400;
    max-width: 600px;
    margin: 0 auto;
}

/* Hero Version List */
.hero-versions {
    width: 100%;
    display: flex;
    justify-content: center;
}
.hero-version-list {
    max-width: 100%;
}

/* Section Common */
.section-header {
    text-align: center;
    margin-bottom: 50px;
    position: relative;
    padding: 0 15px;
}
.section-title-lg {
    font-size: 40px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 10px;
    letter-spacing: -0.5px;
}
.section-desc {
    font-size: 18px;
    color: var(--text-sub);
}

/* 3. Wallpaper - Masonry/Grid Creative */
.wallpaper-section { padding: 40px 0 80px; }
/* 使用 CSS Grid 实现类似 Bento 的布局 */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 240px;
    gap: 20px;
    padding: 0 15px;
}
.bento-item {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
    background: #eee;
}
.bento-item img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}
.bento-item:hover img { transform: scale(1.08); }
/* 定义不同尺寸的卡片 */
.bento-item.large { grid-column: span 2; grid-row: span 2; }
.bento-item.wide { grid-column: span 2; }
.bento-item.tall { grid-row: span 2; }

.bento-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.6), transparent);
    opacity: 0;
    transition: opacity 0.3s;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 20px;
}
.bento-item:hover .bento-overlay { opacity: 1; }
.bento-btn {
    align-self: flex-start;
    background: #fff;
    color: #000;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

/* 4. Dynamic - Immersive Dark */
/* Styles moved to dynamic.css */

/* 5. Theme - Magazine Style */
/* Styles moved to theme.css */

/* Footer Minimal - Removed old footer styles, using footer.css now */

/* Responsive */
@media (max-width: 1024px) {
    .bento-grid { grid-template-columns: repeat(3, 1fr); }
    .hero-title { font-size: 48px; }
}
@media (max-width: 768px) {
    /* 1. Mobile Reset */
    .layui-main { width: 100% !important; padding: 0 20px; box-sizing: border-box; }
    
    /* 2. Hero Section Mobile Fix */
    .hero-section { height: auto; min-height: auto; padding: 140px 0 60px; margin-top: 0; }
    .hero-content-wrapper { gap: 40px; }
    .hero-title { font-size: 36px; line-height: 1.2; margin-bottom: 16px; }
    .hero-subtitle { font-size: 16px; padding: 0 10px; }
    
    .hero-versions {
        justify-content: flex-start; /* Left align for scroll */
        overflow-x: visible; /* Let scroll container handle it */
    }
    .hero-version-list {
        padding: 0 20px 20px; /* Add padding for scroll bounce */
        width: 100%;
        justify-content: flex-start;
    }
    
    /* 4. Section Title Fix */
    .section-title-lg { font-size: 26px; }
    .section-desc { font-size: 14px; }
    .section-header { padding: 0 20px; margin-bottom: 30px; }
    
    /* 5. Bento Grid Mobile Fix (Optimized) */
    .bento-grid { 
        display: grid;
        grid-template-columns: repeat(2, 1fr); 
        grid-auto-rows: 180px; /* Slightly smaller height for mobile */
        gap: 12px; 
        padding: 0 15px;
        grid-auto-flow: dense; /* Crucial: fills gaps */
    }
    
    /* Mobile Layout Strategy:
       - Large & Wide items take full width (span 2 cols)
       - Tall items revert to normal (1x1) to prevent unfillable vertical gaps
       - Normal items are 1x1
    */
    .bento-item.large { 
        grid-column: span 2; 
        grid-row: span 2; 
        height: 372px; /* 180*2 + 12 gap */
    }
    
    .bento-item.wide { 
        grid-column: span 2; 
        grid-row: span 1; 
    }
    
    .bento-item.tall { 
        grid-column: span 1; 
        grid-row: span 1; /* Reset tall items on mobile to prevent gaps */
    }
    
    /* 8. Navbar Mobile Fix */
    .navbar-menu { display: none; }
    .mobile-toggle { display: block; }
    .navbar-actions { display: none; }
}
