/* ========================================
   AtEnv 官网 - 全局样式
   ======================================== */

/* ---------- 基础重置 ---------- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 72px;
}

body {
    font-family: -apple-system, "Segoe UI", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: #1e293b;
    background: #f8fafc;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ---------- 通用标题 ---------- */
.section-title {
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 8px;
    color: #0f172a;
}

.section-desc {
    text-align: center;
    color: #64748b;
    font-size: 1.05rem;
    margin-bottom: 48px;
}

/* ========================================
   导航栏
   ======================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.5);
    height: 64px;
    transition: box-shadow 0.3s;
}

.navbar.scrolled {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.nav-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.2rem;
    font-weight: 700;
    color: #0f172a;
}

.nav-logo-img {
    width: 32px;
    height: 32px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-links a {
    font-size: 0.95rem;
    font-weight: 500;
    color: #475569;
    transition: color 0.2s;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: #3b82f6;
    transition: width 0.25s;
}

.nav-links a:hover {
    color: #1a56db;
}

.nav-links a:hover::after {
    width: 100%;
}

/* ---------- 汉堡菜单按钮 ---------- */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

.hamburger,
.hamburger::before,
.hamburger::after {
    display: block;
    width: 24px;
    height: 2px;
    background: #1e293b;
    border-radius: 2px;
    transition: transform 0.3s, opacity 0.3s;
}

.hamburger {
    position: relative;
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    left: 0;
}

.hamburger::before {
    top: -7px;
}

.hamburger::after {
    top: 7px;
}

.nav-toggle.active .hamburger {
    background: transparent;
}

.nav-toggle.active .hamburger::before {
    top: 0;
    transform: rotate(45deg);
}

.nav-toggle.active .hamburger::after {
    top: 0;
    transform: rotate(-45deg);
}

/* ========================================
   首屏 Hero
   ======================================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 50%, #1a56db 100%);
    padding: 100px 24px 80px;
}

.hero-bg-shapes {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.08;
    background: #fff;
}

.shape-1 {
    width: 600px;
    height: 600px;
    top: -200px;
    right: -150px;
}

.shape-2 {
    width: 400px;
    height: 400px;
    bottom: -100px;
    left: -100px;
}

.shape-3 {
    width: 200px;
    height: 200px;
    top: 50%;
    left: 20%;
}

.hero-content {
    text-align: center;
    position: relative;
    z-index: 1;
    max-width: 720px;
}

.hero-logo {
    width: 80px;
    height: 80px;
    margin-bottom: 24px;
    filter: brightness(0) invert(1);
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
}

.hero-subtitle {
    font-size: 1.4rem;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 500;
    margin-bottom: 16px;
}

.hero-description {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.65);
    line-height: 1.7;
    margin-bottom: 40px;
}

.hero-cta {
    display: inline-block;
    padding: 16px 48px;
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
    background: #3b82f6;
    border-radius: 12px;
    transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.35);
}

.hero-cta:hover {
    background: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.45);
}

/* ========================================
   功能特性
   ======================================== */
.features {
    padding: 96px 0;
    background: #fff;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.feature-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 32px 28px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.06);
    border-color: #bfdbfe;
}

.feature-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    color: #fff;
}

.feature-icon svg {
    width: 24px;
    height: 24px;
}

.nginx-icon   { background: #059669; }
.php-icon     { background: #7c3aed; }
.mysql-icon   { background: #ea580c; }
.redis-icon   { background: #dc2626; }
.runtime-icon { background: #0891b2; }
.tool-icon    { background: #d97706; }
.site-icon    { background: #2563eb; }
.hosts-icon   { background: #4f46e5; }
.dashboard-icon { background: #0284c7; }

.feature-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: #0f172a;
}

.feature-card p {
    font-size: 0.95rem;
    color: #64748b;
    line-height: 1.6;
}

/* ========================================
   应用截图（占位）
   ======================================== */
.screenshots {
    padding: 96px 0;
    background: #f8fafc;
}

.screenshots-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.screenshot-placeholder {
    background: #fff;
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    padding: 64px 24px;
    text-align: center;
    transition: border-color 0.2s;
}

.screenshot-placeholder:hover {
    border-color: #93c5fd;
}

.placeholder-icon {
    color: #94a3b8;
    margin-bottom: 16px;
}

.placeholder-icon svg {
    width: 48px;
    height: 48px;
}

.screenshot-placeholder p {
    font-size: 1rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: 8px;
}

.placeholder-hint {
    font-size: 0.85rem;
    color: #94a3b8;
}

/* ========================================
   下载区域
   ======================================== */
.download {
    padding: 96px 0;
    background: #fff;
}

.download-card {
    max-width: 560px;
    margin: 0 auto;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 40px;
    text-align: center;
}

.download-version {
    margin-bottom: 20px;
}

.version-label {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 600;
    color: #fff;
    background: #3b82f6;
    padding: 4px 12px;
    border-radius: 6px;
    margin-right: 8px;
    vertical-align: middle;
}

.version-number {
    font-size: 1.6rem;
    font-weight: 700;
    color: #0f172a;
    vertical-align: middle;
}

.download-platform {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #64748b;
    font-size: 0.95rem;
    margin-bottom: 32px;
}

.download-platform svg {
    width: 20px;
    height: 20px;
}

.download-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.download-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 12px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.download-btn svg {
    width: 20px;
    height: 20px;
}

.download-btn.primary {
    background: #1a56db;
    color: #fff;
    box-shadow: 0 4px 12px rgba(26, 86, 219, 0.3);
}

.download-btn.primary:hover {
    background: #1e40af;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(26, 86, 219, 0.4);
}

.download-btn.secondary {
    background: #fff;
    color: #1a56db;
    border: 2px solid #1a56db;
}

.download-btn.secondary:hover {
    background: #eff6ff;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(26, 86, 219, 0.15);
}

.download-note {
    font-size: 0.85rem;
    color: #94a3b8;
    margin-top: 8px;
}

/* ========================================
   页脚
   ======================================== */
.footer {
    background: #0f172a;
    color: #cbd5e1;
    padding: 64px 0 32px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 12px;
}

.footer-logo img {
    width: 28px;
    height: 28px;
    filter: brightness(0) invert(1);
}

.footer-info p {
    font-size: 0.9rem;
    color: #94a3b8;
    margin-bottom: 4px;
}

.footer-tech {
    font-size: 0.82rem !important;
    color: #64748b !important;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: flex-end;
}

.footer-links a {
    font-size: 0.9rem;
    color: #94a3b8;
    transition: color 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.footer-links a:hover {
    color: #fff;
}

.footer-github svg {
    width: 18px;
    height: 18px;
}

.footer-bottom {
    padding-top: 32px;
    text-align: center;
}

.footer-bottom p {
    font-size: 0.85rem;
    color: #64748b;
}

/* ========================================
   响应式 - 平板
   ======================================== */
@media (max-width: 1024px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .features-grid {
        grid-template-columns: 1fr;
    }

    .screenshots-grid {
        grid-template-columns: 1fr;
    }

    .hero-title {
        font-size: 2.4rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .hero-description {
        font-size: 1rem;
        br { display: none; }
    }

    .section-title {
        font-size: 1.6rem;
    }

    .download-buttons {
        flex-direction: column;
    }

    .download-btn {
        justify-content: center;
    }

    .footer-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .footer-links {
        align-items: center;
    }

    /* ---------- 导航栏响应式 ---------- */
    .nav-toggle {
        display: block;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 260px;
        height: 100vh;
        background: #fff;
        flex-direction: column;
        gap: 0;
        padding: 80px 32px 32px;
        box-shadow: -4px 0 16px rgba(0, 0, 0, 0.08);
        transition: right 0.3s ease;
        align-items: flex-start;
    }

    .nav-links.open {
        right: 0;
    }

    .nav-links li {
        width: 100%;
    }

    .nav-links a {
        display: block;
        padding: 14px 0;
        font-size: 1.05rem;
        border-bottom: 1px solid #f1f5f9;
    }

    .nav-links a::after {
        display: none;
    }
}
