/* style.css - 龙城学伴项目最终版样式表 */

/* --- 0. 变量与基础重置 --- */
:root {
    /* 颜色和字体变量 */
    --companion-blue: #AD3C31; /* App 主色调 (深红色/栗色) */
    --apple-gray: #f5f5f7;      /* 浅灰背景 */
    --apple-dark-gray: #1d1d1f; /* 深黑文字/页脚背景 */
    --apple-text-color: #1d1d1f;
    --apple-light-text-color: #6e6e73; /* 次级文本颜色 */
    --max-width: 1024px;
    --navbar-height: 44px;
    
    /* 字体使用系统无衬线字体 */
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}



/* 基础样式和抗锯齿优化 */
body {
    margin: 0;
    padding: 0;
    color: var(--apple-text-color);
    background-color: #fff;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased; /* 提高字体渲染质量 */
    min-height: 300vh; /* 确保页面有足够的滚动空间来测试动画 */
}

/* 布局辅助 */
.content-module, .hero-section {
    max-width: 100%;
    margin: 0 auto;
    padding: 80px 20px;
    text-align: center;
}
h1, h2, h3, p { margin: 0; padding: 0; }
img { display: block; max-width: 100%; height: auto; } /* 确保图片是块级元素且响应式 */

/* 链接基础样式 */
a {
    text-decoration: none; /* 移除下划线 */
    color: var(--companion-blue);
    transition: color 0.3s ease, opacity 0.3s ease;
}

/* --- 1. 顶部导航栏 (Navbar) --- */
.navbar {
    background-color: transparent; 
    backdrop-filter: blur(10px); 
    position: sticky;
    top: 0;
    z-index: 1000;
    height: var(--navbar-height);
    display: flex;
    justify-content: center;
    transition: background-color 0.3s ease;
}
.navbar.scrolled {
    background-color: rgba(255, 255, 255, 0.9);
    box-shadow: 0 1px 5px rgba(0,0,0,0.05);
}

.nav-content {
    display: flex;
    max-width: var(--max-width);
    width: 100%;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}
.nav-item {
    color: var(--apple-text-color);
    font-size: 14px;
    padding: 0 12px;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}
.nav-item.app-logo {
    font-size: 16px;
    font-weight: 600;
}
.logo {
    width: 80px; 
    height: 80px; 
    border-radius: 18px; /* App Icon 圆角 */
    margin: 0 auto 10px;
}

/* --- 2. 英雄区 (Hero Section) --- */
.hero-companion {
    background-color: var(--apple-gray);
    min-height: 80vh;
    padding-top: 100px;
    padding-bottom: 0; 
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative; /* 设备的定位基准 */
    overflow: hidden; /* 隐藏动画初始状态时可能露出的部分 */
}
.hero-content {
    max-width: 800px;
    z-index: 10;
}
.hero-content h1 {
    font-size: 58px;
    line-height: 1.1;
    font-weight: 700;
    margin-bottom: 20px;
}
.description {
    font-size: 24px;
    line-height: 1.33;
    color: var(--apple-light-text-color);
    margin-bottom: 30px;
}
.cta-link {
    font-size: 17px;
    padding: 10px 20px;
    border-radius: 9999px;
    font-weight: 500;
    transition: background-color 0.2s ease;
    display: inline-block;
}
.cta-main { 
    background-color: var(--companion-blue);
    color: #fff;
}

/* --- 3. 设备展示容器 (Device Showcase) --- */
.device-showcase {
    position: relative; 
    width: 100%;
    max-width: 1400px; 
    height: 70vh; 
    margin: 50px auto 0;
    z-index: 5; 
}

/* 3.1. 所有设备截图基础样式 */
/* style.css - 核心修改部分 */

/* 2. 所有设备截图基础样式 */
.device-screenshot {
    position: absolute;
    /* transition: none; <--- 这行可以保留，但不再影响显示 */
    will-change: transform, opacity; 
    
    /* 核心修改：移除 opacity: 0 和 scale 初始值 */
    opacity: 1; /* 默认完全可见 */
    transform: translate(-50%, -50%); /* 确保居中定位 */
    scale: 1; /* 默认最终尺寸 */
}

/* 3.2. 精确定位和堆叠顺序 (Z-Index) */

/* 1. Vision Pro (VP) - 左侧前层 */
.device-1 { 
width: 70%;
    z-index: 20;
    top: 75%; 
    left: 5%; 
    /* 移除 opacity: 0 和 scale: 0.8 */
    transform: translate(-50%, -50%); 
}

/* 2. MacBook Pro (Mac) - 中心、最大、底层 (保持不变) */
.device-2 { 
    width: 100%;
    z-index: 10; 
    top: 55%;
    left: 50%;
    transform: translate(-50%, -50%); 
    opacity: 1; 
}

/* 3. iPad - 右侧中后层 */
.device-3 { 
    width: 70%;
    z-index: 30;
    top: 60%;
    right: -60%; 
    /* 移除 opacity: 0 和 scale: 0.8 */
    transform: translate(-50%, -50%); 
}

/* 4. Apple Watch (Watch) - 右侧中前层 */
.device-4 { 
    width: 15%;
    z-index: 60;
    top: 80%; 
    right: -32%;
    /* 移除 opacity: 0 和 scale: 0.8 */
    transform: translate(-50%, -50%); 
}

/* 5. iPhone - 右侧最前层 */
.device-5 { 
    width: 20%;
    z-index: 50;
    top: 70%; 
    right: -50%; 
    /* 移除 opacity: 0 和 scale: 0.8 */
    transform: translate(-50%, -50%); 
}

/* 5. Mac Studio - 左侧最前层 */
.device-6 { 
    width: 60%;
    z-index: 0;
    top: 70%; 
    left: -20%; 
    /* 移除 opacity: 0 和 scale: 0.8 */
    transform: translate(-50%, -50%); 
}

/* --- 4. 核心内容模块 (Module A/B/C) --- */
.content-module {
    padding: 100px 20px;
}
.content-module h2 {
    font-size: 40px;
    font-weight: 600;
    margin-bottom: 20px;
}
.content-module p {
    font-size: 21px;
    color: var(--apple-light-text-color);
    max-width: 700px;
    margin: 0 auto 30px;
}

.module-a { background-color: #fff; }
.module-background-image { max-width: 900px; margin: 40px auto 0; }

/* 特色网格布局 */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    max-width: var(--max-width);
    margin: 50px auto 0;
}
.feature-card {
    background-color: var(--apple-gray); /* 改为灰色背景，区分背景和卡片 */
    padding: 30px;
    border-radius: 12px;
    text-align: left;
    transition: transform 0.2s ease;
}
.feature-card:hover {
    transform: translateY(-5px); /* 悬停抬升效果 */
}
.feature-card img {
    width: 60px;
    height: 60px;
    margin-bottom: 15px;
}
.feature-card h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 10px;
}

/* --- 5. 友链区域 --- */
.links-list {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 30px;
}
.link-item {
    padding: 10px 20px;
    border: 1px solid var(--apple-light-text-color); /* 边框更清晰 */
    border-radius: 8px;
    color: var(--apple-text-color);
}
.link-item:hover {
    background-color: var(--apple-gray);
    border-color: var(--apple-text-color);
}

/* --- 6. 底部 CTA --- */
.cta-bottom {
    background-color: var(--apple-dark-gray);
    color: #fff;
    padding: 60px 20px;
}
.cta-bottom p {
    font-size: 30px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #fff;
}
.cta-button {
    background-color: #fff;
    color: var(--apple-dark-gray);
}


/* --- 7. 页脚 --- */
.footer {
    background-color: #fff; /* 页脚使用白色背景 */
    padding: 30px 20px;
    font-size: 12px;
    color: var(--apple-light-text-color);
    text-align: center;
    border-top: 1px solid var(--apple-gray);
}


/* --- 8. 响应式设计 (Media Queries) --- */
@media (max-width: 1024px) {
    .device-showcase {
        max-width: 90%;
        height: 60vh;
    }
}

@media (max-width: 768px) {
    .nav-item {
        padding: 0 5px;
        font-size: 11px;
    }
    .hero-content h1 {
        font-size: 40px;
    }
    .description {
        font-size: 18px;
    }
    .content-module h2 {
        font-size: 32px;
    }
    .feature-grid {
        grid-template-columns: 1fr;
    }
    
    /* 缩小设备展示，避免溢出 */
    .device-showcase {
        height: 50vh;
    }
    .device-screenshot {
        /* 统一缩小比例，防止设备在手机屏幕上互相遮挡过多 */
        width: 20%; 
    }
    .device-2 { width: 50%; } /* Mac 保持最大 */
    .device-3 { width: 35%; } /* iPad 缩小 */
}

@media (max-width: 500px) {
    /* 隐藏部分导航项 */
    .nav-content .nav-item:nth-child(n+3):nth-child(-n+5) {
        display: none;
    }
    .nav-item { padding: 0 4px; }
}

/* style.css */

/* 图片画廊容器 */
.image-gallery-row {
    display: flex; /* 启用 Flex 布局，使子元素并排 */
    justify-content: center; /* 水平居中对齐 */
    align-items: flex-start; /* 顶部对齐 */
    gap: 20px; /* 图片之间的间隔 */
    max-width: 1000px; /* 限制整个图片容器的宽度 */
    margin: 40px auto; /* 垂直居中并留出间距 */
    padding: 0 20px;
}

/* 画廊中的单张图片 */
.gallery-image {
    width: 33.33%; /* 每张图片占据容器宽度的 1/3 (忽略 gap) */
    max-width: 300px; /* 限制单张图片的最大宽度 */
    height: auto; /* 保持图片比例 */
}

/* 响应式调整 (手机屏幕下，将图片改为堆叠) */
@media (max-width: 768px) {
    .image-gallery-row {
        flex-direction: column; /* 当屏幕变窄时，将图片改为垂直堆叠 */
        gap: 30px;
    }
    .gallery-image {
        width: 80%; /* 堆叠时，图片占据大部分宽度 */
        max-width: none;
        margin: 0 auto; /* 堆叠时居中 */
    }
}

/* style.css (新增或修改以下部分) */

/* 1. 脚注标记样式 (让星号看起来像上标) */
.footnote-mark {
    font-size: 0.7em; /* 缩小字体 */
    vertical-align: super; /* 垂直对齐为上标 */
    margin-left: 2px; /* 与前文保持一点距离 */
    line-height: 0; /* 避免影响行高 */
    color: var(--apple-light-text-color); /* 颜色略浅 */
}

/* 2. 页面底部脚注区域样式 */
.footnotes-area {
    border-top: 1px solid var(--apple-gray); /* 与页脚内容分隔 */
    padding-top: 15px;
    margin-top: 20px;
    text-align: left; /* 脚注通常左对齐 */
    max-width: var(--max-width);
    margin-left: auto;
    margin-right: auto;
}

/* 3. 单条脚注样式 */
.footnote-item {
    font-size: 12px; /* 字体非常小 */
    color: var(--apple-light-text-color);
    line-height: 1.5;
    margin-bottom: 5px;
}

/* 4. 底部脚注中的标记文本样式 (确保标记和说明文本对齐) */
.footnote-mark-text {
    font-weight: bold;
    margin-right: 5px;
}