/* ========================================
   土洲下载站 - 全站通用样式
   ======================================== */

/* CSS变量定义 */
:root {
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary-color: #64748b;
    --accent-color: #f59e0b;
    --bg-light: #f8fafc;
    --bg-white: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-light: #94a3b8;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --transition: all 0.3s ease;
}

/* 重置样式 */
* {
    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: 16px;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-light);
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul, ol {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
}

input {
    font-family: inherit;
}

/* 容器 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ========================================
   顶部导航栏
   ======================================== */
.header {
    background: var(--bg-white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-top {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    padding: 8px 0;
}

.header-top .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-welcome {
    color: rgba(255,255,255,0.9);
    font-size: 13px;
}

.header-contact {
    display: flex;
    align-items: center;
    gap: 20px;
    color: rgba(255,255,255,0.9);
    font-size: 13px;
}

.header-contact a {
    color: rgba(255,255,255,0.9);
}

.header-contact a:hover {
    color: #fff;
}

.header-main {
    padding: 15px 0;
}

.header-main .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 40px;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-area:hover {
    opacity: 0.9;
}

/* LOGO区域 */
.logo-img {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 1px;
}

.logo-subtitle {
    font-size: 12px;
    color: var(--text-secondary);
}

/* 搜索框 */
.search-box {
    flex: 1;
    max-width: 500px;
    position: relative;
}

.search-box form {
    display: flex;
    gap: 0;
}

.search-box input {
    width: 100%;
    padding: 12px 45px 12px 18px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg) 0 0 var(--radius-lg);
    font-size: 15px;
    transition: var(--transition);
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.search-box button {
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    padding: 0 20px;
    background: var(--primary-color);
    color: white;
    border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
    font-size: 16px;
    transition: var(--transition);
}

.search-box button:hover {
    background: var(--primary-dark);
}

/* 导航 */
.nav {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-color);
}

.nav .container {
    display: flex;
    align-items: center;
    gap: 0;
}

.nav-item {
    padding: 14px 24px;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-primary);
    border-bottom: 3px solid transparent;
    transition: var(--transition);
}

.nav-item:hover,
.nav-item.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.nav-item:first-child {
    padding-left: 0;
}

/* ========================================
   主要内容区域
   ======================================== */
.main-content {
    min-height: calc(100vh - 200px);
    padding: 40px 0;
}

/* ========================================
   英雄区域 (首页Banner)
   ======================================== */
.hero {
    background: linear-gradient(135deg, var(--primary-color), #7c3aed);
    border-radius: var(--radius-lg);
    padding: 60px 40px;
    margin-bottom: 40px;
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 16px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.hero p {
    font-size: 18px;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto 30px;
}

/* ========================================
   产品区域
   ======================================== */
.section-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-title::before {
    content: '';
    width: 5px;
    height: 28px;
    background: linear-gradient(to bottom, var(--primary-color), var(--accent-color));
    border-radius: 3px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.product-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.product-image {
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 72px;
    position: relative;
    overflow: hidden;
    background: #f8fafc;
}

.product-image img {
    width: 120px;
    height: 120px;
    object-fit: contain;
    border-radius: var(--radius-md);
}

.product-card:nth-child(1) .product-image { background: linear-gradient(135deg, #fef3c7, #fde68a); }
.product-card:nth-child(2) .product-image { background: linear-gradient(135deg, #ede9fe, #ddd6fe); }
.product-card:nth-child(3) .product-image { background: linear-gradient(135deg, #cffafe, #a5f3fc); }
.product-card:nth-child(4) .product-image { background: linear-gradient(135deg, #d1fae5, #a7f3d0); }
.product-card:nth-child(5) .product-image { background: linear-gradient(135deg, #fee2e2, #fecaca); }

.product-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--accent-color);
    color: white;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
}

.product-info {
    padding: 20px;
    display: grid;
    grid-template-rows: auto auto 1fr auto auto;
    gap: 8px;
}

.product-name {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.product-desc {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.product-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: var(--text-light);
}

.download-btn {
    display: block;
    width: 100%;
    padding: 12px 20px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    text-align: center;
    border-radius: var(--radius-md);
    font-weight: 600;
    transition: var(--transition);
}

.download-btn:hover {
    background: linear-gradient(135deg, var(--primary-dark), #1e40af);
    color: white;
    transform: scale(1.02);
}

/* ========================================
   特色功能区域
   ======================================== */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    margin-top: 40px;
}

.feature-card {
    background: var(--bg-white);
    padding: 30px;
    border-radius: var(--radius-lg);
    text-align: center;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.feature-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--primary-color), #7c3aed);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    color: white;
    font-size: 28px;
}

.feature-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.feature-desc {
    font-size: 14px;
    color: var(--text-secondary);
}

/* ========================================
   底部
   ======================================== */
.footer {
    background: var(--text-primary);
    color: #94a3b8;
    padding: 40px 0 0;
    margin-top: 60px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-section h4 {
    color: white;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
}

.footer-section p,
.footer-section li {
    font-size: 14px;
    line-height: 1.8;
    color: #94a3b8;
}

.footer-section a:hover {
    color: white;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-bottom {
    padding: 20px 0;
    text-align: center;
    font-size: 14px;
}

.footer-bottom p {
    margin-bottom: 6px;
}

.footer-icp {
    color: #64748b;
    font-size: 13px;
}

.footer-icp a {
    color: #64748b;
}

.footer-icp a:hover {
    color: white;
}

/* ========================================
   响应式设计
   ======================================== */
@media (max-width: 768px) {
    .header-top .container {
        flex-direction: column;
        gap: 8px;
    }

    .header-main .container {
        flex-direction: column;
        gap: 16px;
    }

    .search-box {
        max-width: 100%;
        width: 100%;
    }

    .nav .container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .nav-item {
        white-space: nowrap;
        padding: 14px 16px;
    }

    .hero {
        padding: 40px 20px;
    }

    .hero h1 {
        font-size: 28px;
    }

    .hero p {
        font-size: 16px;
    }

    .section-title {
        font-size: 22px;
    }

    .products-grid {
        grid-template-columns: 1fr;
    }

    .features {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .logo-text {
        display: none;
    }

    .hero h1 {
        font-size: 24px;
    }
}

/* ========================================
   动画效果
   ======================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.product-card,
.feature-card {
    animation: fadeIn 0.5s ease forwards;
}

.product-card:nth-child(1) { animation-delay: 0.1s; }
.product-card:nth-child(2) { animation-delay: 0.2s; }
.product-card:nth-child(3) { animation-delay: 0.3s; }
.product-card:nth-child(4) { animation-delay: 0.4s; }
.product-card:nth-child(5) { animation-delay: 0.5s; }
