/* ============================================
   应用哥下载网 - 品牌样式表
   ============================================ */

/* CSS变量 */
:root {
    --primary: #667eea;
    --primary-dark: #5a6fd6;
    --secondary: #764ba2;
    --accent: #f093fb;
    --gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-light: linear-gradient(135deg, #667eea 0%, #f093fb 100%);
    --text-primary: #333;
    --text-secondary: #666;
    --text-light: #999;
    --border: #e5e5e5;
    --bg-light: #f8f9ff;
    --bg-white: #fff;
    --shadow: 0 4px 20px rgba(102, 126, 234, 0.15);
    --shadow-hover: 0 8px 30px rgba(102, 126, 234, 0.25);
    --radius: 16px;
    --radius-sm: 8px;
    --transition: all 0.3s ease;
    
    /* 字体层级 */
    --h1-size: clamp(32px, 5vw, 48px);
    --h2-size: clamp(24px, 4vw, 36px);
    --h3-size: clamp(20px, 3vw, 28px);
    --body-size: clamp(14px, 2vw, 16px);
    --small-size: 12px;
}

/* 重置样式 */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: var(--body-size);
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-light);
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

/* 容器 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ============================================
   导航栏
   ============================================ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(229, 229, 229, 0.5);
    transition: var(--transition);
}

.navbar.scrolled {
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
}

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

.nav-brand a {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 700;
    color: var(--primary);
}

.logo-icon {
    width: 36px;
    height: 36px;
}

.logo-text {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 5px;
}

.nav-toggle span {
    width: 25px;
    height: 2px;
    background: var(--text-primary);
    margin: 3px 0;
    transition: var(--transition);
    border-radius: 2px;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-menu li a {
    font-size: 15px;
    color: var(--text-secondary);
    font-weight: 500;
    padding: 8px 0;
    position: relative;
}

.nav-menu li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient);
    transition: var(--transition);
    border-radius: 2px;
}

.nav-menu li a:hover,
.nav-menu li a.active {
    color: var(--primary);
}

.nav-menu li a:hover::after,
.nav-menu li a.active::after {
    width: 100%;
}

.nav-admin-btn {
    background: var(--gradient);
    color: white !important;
    padding: 8px 20px !important;
    border-radius: 25px;
    font-size: 14px !important;
}

.nav-admin-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.nav-search form {
    display: flex;
    align-items: center;
    background: var(--bg-light);
    border-radius: 25px;
    overflow: hidden;
    border: 1px solid var(--border);
    transition: var(--transition);
}

.nav-search form:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.nav-search input {
    border: none;
    background: transparent;
    padding: 8px 15px;
    font-size: 14px;
    width: 180px;
    outline: none;
}

.nav-search button {
    background: transparent;
    border: none;
    padding: 8px 15px;
    cursor: pointer;
    color: var(--text-secondary);
    transition: var(--transition);
}

.nav-search button:hover {
    color: var(--primary);
}

/* ============================================
   Hero区域
   ============================================ */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px 20px 80px;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-light);
    opacity: 0.08;
    z-index: 0;
}

.hero-bg::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 50%, rgba(102, 126, 234, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 70% 50%, rgba(240, 147, 251, 0.1) 0%, transparent 50%);
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-30px, -30px); }
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 800px;
}

.hero-logo {
    height: 60px;
    margin-bottom: 30px;
}

.hero h1 {
    font-size: var(--h1-size);
    font-weight: 700;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-desc {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 35px;
    line-height: 1.6;
}

.hero-search {
    max-width: 500px;
    margin: 0 auto 40px;
}

.hero-search form {
    display: flex;
    background: var(--bg-white);
    border-radius: 50px;
    box-shadow: 0 4px 30px rgba(102, 126, 234, 0.15);
    overflow: hidden;
    transition: var(--transition);
}

.hero-search form:focus-within {
    box-shadow: 0 8px 40px rgba(102, 126, 234, 0.25);
}

.hero-search input {
    flex: 1;
    padding: 18px 25px;
    border: none;
    font-size: 16px;
    outline: none;
}

.hero-search button {
    background: var(--gradient);
    color: white;
    border: none;
    padding: 18px 35px;
    font-size: 16px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.hero-search button:hover {
    background: linear-gradient(135deg, #5a6fd6 0%, #6a3fa0 100%);
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 50px;
}

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

.stat-number {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary);
}

.stat-label {
    font-size: 14px;
    color: var(--text-light);
    margin-top: 5px;
}

/* ============================================
   通用标题样式
   ============================================ */
.section-title {
    font-size: var(--h2-size);
    font-weight: 700;
    text-align: center;
    margin-bottom: 15px;
    color: var(--text-primary);
}

.section-desc {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 50px;
    font-size: 16px;
}

.section-more {
    text-align: center;
    margin-top: 40px;
}

/* ============================================
   按钮样式
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 30px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    transition: var(--transition);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--gradient);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
    background: var(--bg-white);
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-secondary:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-3px);
}

/* ============================================
   应用分类
   ============================================ */
.categories {
    padding: 100px 0;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
}

.category-card {
    background: var(--bg-white);
    border-radius: var(--radius);
    padding: 30px 20px;
    text-align: center;
    transition: var(--transition);
    border: 1px solid var(--border);
    cursor: pointer;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary);
}

.cat-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 15px;
    background: var(--gradient-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--primary);
}

.category-card h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
}

.category-card p {
    font-size: 13px;
    color: var(--text-light);
}

/* ============================================
   应用卡片网格
   ============================================ */
.hot-apps,
.latest-apps {
    padding: 100px 0;
}

.hot-apps {
    background: var(--bg-white);
}

.app-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 25px;
}

.app-card {
    background: var(--bg-white);
    border-radius: var(--radius);
    padding: 25px;
    display: flex;
    align-items: flex-start;
    gap: 20px;
    border: 1px solid var(--border);
    transition: var(--transition);
    cursor: pointer;
}

.app-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary);
}

.app-icon {
    width: 70px;
    height: 70px;
    min-width: 70px;
    background: var(--gradient-light);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: var(--primary);
    overflow: hidden;
}

.app-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.app-info {
    flex: 1;
}

.app-info h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.app-info p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 10px;
    line-height: 1.5;
}

.app-category {
    display: inline-block;
    padding: 3px 12px;
    background: var(--gradient-light);
    border-radius: 15px;
    font-size: 12px;
    color: var(--primary);
    font-weight: 500;
}

.app-action {
    display: flex;
    align-items: center;
}

.btn-download {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 18px;
    background: var(--gradient);
    color: white;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
}

.btn-download:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

/* ============================================
   应用列表
   ============================================ */
.app-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.app-list-item {
    background: var(--bg-white);
    border-radius: var(--radius);
    padding: 20px 25px;
    display: flex;
    align-items: center;
    gap: 20px;
    border: 1px solid var(--border);
    transition: var(--transition);
}

.app-list-item:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow);
    border-color: var(--primary);
}

.app-list-icon {
    width: 60px;
    height: 60px;
    min-width: 60px;
    background: var(--gradient-light);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--primary);
    overflow: hidden;
}

.app-list-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.app-list-info {
    flex: 1;
}

.app-list-info h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 5px;
}

.app-list-info p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.app-list-meta {
    display: flex;
    align-items: center;
    gap: 15px;
}

.app-date {
    font-size: 12px;
    color: var(--text-light);
}

.btn-download-sm {
    width: 45px;
    height: 45px;
    background: var(--gradient);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: var(--transition);
}

.btn-download-sm:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

/* ============================================
   特色介绍
   ============================================ */
.features {
    padding: 100px 0;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.feature-card {
    background: var(--bg-white);
    border-radius: var(--radius);
    padding: 40px 30px;
    text-align: center;
    border: 1px solid var(--border);
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.feature-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 20px;
    background: var(--gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: white;
}

.feature-card h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 15px;
}

.feature-card p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ============================================
   页脚
   ============================================ */
.footer {
    background: #1a1a2e;
    color: #ccc;
    padding: 80px 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-logo {
    height: 40px;
    margin-bottom: 20px;
}

.footer-brand p {
    font-size: 14px;
    line-height: 1.8;
    color: #999;
    margin-bottom: 20px;
}

.footer-social {
    display: flex;
    gap: 15px;
}

.footer-social a {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ccc;
    font-size: 18px;
    transition: var(--transition);
}

.footer-social a:hover {
    background: var(--gradient);
    color: white;
    transform: translateY(-3px);
}

.footer-links h4 {
    color: white;
    font-size: 18px;
    margin-bottom: 20px;
    font-weight: 600;
}

.footer-links ul li {
    margin-bottom: 12px;
}

.footer-links ul li a {
    color: #999;
    font-size: 14px;
    transition: var(--transition);
}

.footer-links ul li a:hover {
    color: var(--primary);
    padding-left: 5px;
}

.footer-contact h4 {
    color: white;
    font-size: 18px;
    margin-bottom: 20px;
    font-weight: 600;
}

.footer-contact p {
    font-size: 14px;
    color: #999;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-contact i {
    color: var(--primary);
    width: 20px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 25px 0;
    text-align: center;
    font-size: 13px;
    color: #666;
}

.footer-bottom a {
    color: #999;
    transition: var(--transition);
}

.footer-bottom a:hover {
    color: var(--primary);
}

/* ============================================
   回到顶部按钮
   ============================================ */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--gradient);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
    z-index: 999;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.4);
}

/* ============================================
   响应式设计
   ============================================ */
@media (max-width: 992px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .hero-stats {
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: var(--bg-white);
        flex-direction: column;
        padding: 20px;
        gap: 15px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: var(--transition);
    }
    
    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .nav-search {
        display: none;
    }
    
    .hero {
        padding: 100px 20px 60px;
        min-height: auto;
    }
    
    .hero-logo {
        height: 45px;
    }
    
    .hero-stats {
        flex-wrap: wrap;
        gap: 20px;
    }
    
    .stat-number {
        font-size: 22px;
    }
    
    .app-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .category-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    }
}

@media (max-width: 480px) {
    .hero-search input {
        padding: 14px 18px;
        font-size: 14px;
    }
    
    .hero-search button {
        padding: 14px 20px;
        font-size: 14px;
    }
    
    .hero-desc {
        font-size: 15px;
    }
    
    .app-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .app-list-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .app-list-meta {
        justify-content: center;
    }
    
    .category-card {
        padding: 20px 15px;
    }
}