/* ===========================
   全局样式和变量
   =========================== */
:root {
    --primary-color: #007AFF;
    --secondary-color: #5856D6;
    --text-primary: #1d1d1f;
    --text-secondary: #86868b;
    --background: #ffffff;
    --background-secondary: #f5f5f7;
    --border-color: #d2d2d7;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.15);
    --border-radius: 12px;
    --transition: all 0.3s ease;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-primary);
    background-color: var(--background);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* ===========================
   导航栏
   =========================== */
header {
    background: var(--background);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(20px);
    background: rgba(255, 255, 255, 0.8);
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 600;
}

.logo img {
    height: 32px;
    width: 32px;
    border-radius: 8px;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-secondary);
    transition: var(--transition);
    font-size: 0.95rem;
}

.nav-links a:hover {
    color: var(--primary-color);
}

/* ===========================
   主容器
   =========================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* ===========================
   Hero 区域
   =========================== */
.hero {
    text-align: center;
    padding: 4rem 2rem;
    background: linear-gradient(135deg, var(--background-secondary) 0%, var(--background) 100%);
}

.hero h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* ===========================
   应用卡片网格
   =========================== */
.apps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.app-card {
    background: var(--background);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    text-decoration: none;
    color: var(--text-primary);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    cursor: pointer;
    box-shadow: var(--shadow);
}

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

.app-card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.app-icon {
    width: 80px;
    height: 80px;
    border-radius: 18px;
    object-fit: cover;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

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

.app-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.app-card .category {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.app-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
    margin-top: 0.75rem;
}

/* ===========================
   应用详情页
   =========================== */
.app-detail {
    padding: 2rem 0;
}

.app-header {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.app-detail .app-icon {
    width: 120px;
    height: 120px;
    border-radius: 24px;
    flex-shrink: 0;
}

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

.app-header-info h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.app-header-info .category {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    display: block;
}

.app-header-info .tagline {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.download-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--primary-color);
    color: white;
    padding: 0.875rem 2rem;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    font-size: 1rem;
}

.download-button:hover {
    background: #0051D5;
    transform: scale(1.02);
}

/* ===========================
   截图展示
   =========================== */
.screenshots {
    margin: 3rem 0;
}

.screenshots h2 {
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
}

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

.screenshot {
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.screenshot img {
    width: 100%;
    height: auto;
    display: block;
}

/* ===========================
   功能列表
   =========================== */
.features, .description {
    margin: 3rem 0;
}

.features h2, .description h2 {
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
}

.description p {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.features ul {
    list-style: none;
}

.features li {
    padding: 1rem;
    margin-bottom: 0.75rem;
    background: var(--background-secondary);
    border-radius: 8px;
    font-size: 1rem;
    position: relative;
    padding-left: 2.5rem;
}

.features li:before {
    content: "✓";
    position: absolute;
    left: 1rem;
    color: var(--primary-color);
    font-weight: bold;
    font-size: 1.2rem;
}

/* ===========================
   页脚
   =========================== */
footer {
    background: var(--background-secondary);
    border-top: 1px solid var(--border-color);
    padding: 3rem 2rem;
    margin-top: 4rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.footer-section h3 {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.footer-section ul {
    list-style: none;
}

.footer-section a {
    color: var(--text-secondary);
    text-decoration: none;
    display: block;
    margin-bottom: 0.5rem;
    transition: var(--transition);
    font-size: 0.9rem;
}

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

.footer-bottom {
    max-width: 1200px;
    margin: 2rem auto 0;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* ===========================
   内容页面（隐私政策等）
   =========================== */
.content-page {
    max-width: 800px;
    margin: 2rem auto;
    padding: 2rem;
}

.content-page h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.content-page h2 {
    font-size: 1.75rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.content-page p {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.content-page ul {
    margin-left: 2rem;
    margin-bottom: 1rem;
}

.content-page li {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.contact-info {
    background: var(--background-secondary);
    padding: 2rem;
    border-radius: var(--border-radius);
    margin-top: 2rem;
}

.contact-info h2 {
    margin-top: 0;
}

.contact-info a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.contact-info a:hover {
    text-decoration: underline;
}

/* ===========================
   响应式设计
   =========================== */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .apps-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .app-header {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }

    .app-header-info h1 {
        font-size: 2rem;
    }

    .screenshots-grid {
        grid-template-columns: 1fr;
    }

    nav {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-links {
        gap: 1rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 1rem;
    }

    .hero {
        padding: 2rem 1rem;
    }

    .app-card {
        padding: 1rem;
    }

    .app-icon {
        width: 60px;
        height: 60px;
    }

    .app-detail .app-icon {
        width: 100px;
        height: 100px;
    }
}

/* ===========================
   加载状态
   =========================== */
.loading {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-secondary);
}

.loading:after {
    content: "...";
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0%, 20% {
        content: ".";
    }
    40% {
        content: "..";
    }
    60%, 100% {
        content: "...";
    }
}
/* SEO 和可访问性辅助类 */

/* 屏幕阅读器专用文本（对视力障碍用户友好，也利于SEO） */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* 跳转到主内容链接（键盘导航友好） */
.skip-to-content {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary-color);
    color: white;
    padding: 8px;
    text-decoration: none;
    z-index: 10000;
}

.skip-to-content:focus {
    top: 0;
}

/* 面包屑导航样式 */
nav[aria-label="Breadcrumb"] {
    padding: 1rem 0;
    font-size: 0.9rem;
}

nav[aria-label="Breadcrumb"] a {
    color: var(--primary-color);
    text-decoration: none;
}

nav[aria-label="Breadcrumb"] a:hover {
    text-decoration: underline;
}

/* 技术信息列表样式 */
.tech-info {
    margin: 3rem 0;
}

.tech-info dl {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1rem;
    margin-top: 1rem;
}

.tech-info dt {
    font-weight: 600;
    color: var(--text-primary);
}

.tech-info dd {
    color: var(--text-secondary);
    margin: 0;
}

/* 评分显示 */
.rating {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin: 0.5rem 0;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

/* 图片说明文字 */
figcaption {
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-align: center;
    margin-top: 0.5rem;
}

/* 语义化标签样式优化 */
article {
    background: var(--background);
}

main {
    min-height: 60vh;
}

/* 响应式图片 */
img {
    max-width: 100%;
    height: auto;
}

/* 打印样式（SEO 友好） */
@media print {
    header nav,
    .download-button,
    footer {
        display: none;
    }

    .app-detail {
        max-width: 100%;
    }

    a[href]:after {
        content: " (" attr(href) ")";
    }
}
