/* ============================================
   Telegram纸飞机官网 - 主样式表 (index.css)
   版本: 2.0 | 设计理念: 轻盈·安全·信赖
   ============================================ */

/* ---------- 自定义属性 (设计令牌) ---------- */
:root {
    --primary-color: #24A1DE;
    --primary-dark: #1a7faf;
    --primary-light: #e8f6fd;
    --dark-color: #1a1a2e;
    --text-color: #4A4A4A;
    --text-muted: #7a7a8a;
    --light-bg: #F4F6F9;
    --card-bg: #ffffff;
    --border-color: #E2E8F0;
    --border-light: #f0f2f5;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 6px 20px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.10);
    --shadow-primary: 0 8px 24px rgba(36, 161, 222, 0.18);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --transition-fast: 0.18s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    --font-stack: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    --content-max-width: 900px;
    --nav-max-width: 1200px;
}

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    font-size: 16px;
}

body {
    font-family: var(--font-stack);
    color: var(--text-color);
    line-height: 1.8;
    background-color: #ffffff;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeSpeed;
}

/* ---------- 可访问性焦点样式 ---------- */
:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 3px;
    border-radius: 4px;
}

/* ---------- 导航栏 ---------- */
header {
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.92);
    z-index: 1000;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--transition-smooth);
}

header.scrolled {
    box-shadow: var(--shadow-md);
}

.nav-container {
    max-width: var(--nav-max-width);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 24px;
    gap: 20px;
}

.logo a {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 9px;
    letter-spacing: -0.3px;
    transition: opacity var(--transition-fast);
    white-space: nowrap;
}

.logo a:hover {
    opacity: 0.82;
}

.logo img {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.nav-links a {
    text-decoration: none;
    color: var(--dark-color);
    font-weight: 500;
    font-size: 15px;
    padding: 8px 16px;
    border-radius: 20px;
    transition: all var(--transition-fast);
    position: relative;
    white-space: nowrap;
}

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

.nav-links a.active {
    color: #ffffff;
    background-color: var(--primary-color);
    font-weight: 600;
    box-shadow: var(--shadow-primary);
}

/* 导航栏移动端适配 */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 10px;
        padding: 10px 16px;
    }

    .nav-links {
        gap: 4px;
        justify-content: center;
    }

    .nav-links a {
        font-size: 13px;
        padding: 6px 12px;
    }

    .logo a {
        font-size: 18px;
    }
}

/* ---------- 面包屑导航 ---------- */
.breadcrumb {
    max-width: var(--nav-max-width);
    margin: 12px auto 0;
    padding: 0 24px;
    font-size: 13px;
    color: #999;
    display: flex;
    align-items: center;
    gap: 6px;
}

.breadcrumb a {
    color: #777;
    text-decoration: none;
    transition: color var(--transition-fast);
}

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

.breadcrumb span {
    color: #555;
    font-weight: 500;
}

/* ---------- 英雄区域 ---------- */
.hero {
    text-align: center;
    padding: 70px 20px 50px;
    background: radial-gradient(ellipse 80% 70% at 50% 0%, #f0f8fd, #ffffff);
    position: relative;
    overflow: hidden;
}

/* 装饰性背景圆点 */
.hero::before {
    content: '';
    position: absolute;
    top: -60px;
    right: -80px;
    width: 260px;
    height: 260px;
    background: radial-gradient(circle, rgba(36, 161, 222, 0.06) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -40px;
    left: -60px;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(36, 161, 222, 0.05) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.hero-logo {
    width: 120px;
    height: 120px;
    margin-bottom: 24px;
    filter: drop-shadow(0 8px 20px rgba(36, 161, 222, 0.25));
    animation: gentleFloat 3s ease-in-out infinite;
    position: relative;
    z-index: 2;
}

@keyframes gentleFloat {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-8px);
    }
}

.hero h1 {
    font-size: 40px;
    color: var(--dark-color);
    margin-bottom: 12px;
    font-weight: 800;
    letter-spacing: -0.8px;
    position: relative;
    z-index: 2;
    background: linear-gradient(135deg, #1a1a2e 0%, #24A1DE 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 18px;
    color: #6b7280;
    margin-bottom: 20px;
    position: relative;
    z-index: 2;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.7;
}

@media (max-width: 768px) {
    .hero {
        padding: 40px 16px 30px;
    }
    .hero h1 {
        font-size: 28px;
    }
    .hero-subtitle {
        font-size: 15px;
    }
    .hero-logo {
        width: 90px;
        height: 90px;
    }
}

/* ---------- 设备卡片网格 ---------- */
.device-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    max-width: var(--nav-max-width);
    margin: -20px auto 20px;
    padding: 0 24px;
    position: relative;
    z-index: 10;
}

.device-card {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 28px 20px 24px;
    text-align: center;
    background: var(--card-bg);
    transition: transform var(--transition-bounce), box-shadow var(--transition-smooth), border-color var(--transition-smooth);
    position: relative;
    overflow: hidden;
    cursor: default;
}

/* 卡片顶部装饰条 */
.device-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 20%;
    right: 20%;
    height: 3px;
    background: var(--primary-color);
    border-radius: 0 0 4px 4px;
    opacity: 0;
    transition: opacity var(--transition-smooth), left var(--transition-smooth), right var(--transition-smooth);
}

.device-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: #d0ddf0;
}

.device-card:hover::before {
    opacity: 1;
    left: 10%;
    right: 10%;
}

.device-icon {
    width: 52px;
    height: 52px;
    margin-bottom: 16px;
    transition: transform var(--transition-bounce);
}

.device-card:hover .device-icon {
    transform: scale(1.08);
}

.device-card h3 {
    font-size: 18px;
    margin-bottom: 6px;
    color: var(--dark-color);
    font-weight: 700;
    letter-spacing: -0.2px;
}

.device-card p {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.btn-download {
    display: inline-block;
    background-color: var(--primary-color);
    color: #ffffff;
    padding: 10px 26px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.2px;
    transition: all var(--transition-smooth);
    box-shadow: 0 4px 12px rgba(36, 161, 222, 0.25);
    position: relative;
    overflow: hidden;
}

.btn-download::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, transparent 60%);
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.btn-download:hover {
    background-color: var(--primary-dark);
    box-shadow: 0 8px 22px rgba(36, 161, 222, 0.35);
    transform: translateY(-2px);
}

.btn-download:hover::after {
    opacity: 1;
}

.btn-download:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(36, 161, 222, 0.3);
}

/* ---------- 主要内容区域 ---------- */
.main-content {
    max-width: var(--content-max-width);
    margin: 50px auto 60px;
    padding: 0 24px;
}

.main-content section {
    margin-bottom: 50px;
    padding: 0;
}

.main-content section:last-child {
    margin-bottom: 0;
}

.main-content h2 {
    font-size: 26px;
    color: var(--dark-color);
    margin-bottom: 22px;
    padding-left: 16px;
    border-left: 4px solid var(--primary-color);
    font-weight: 700;
    letter-spacing: -0.4px;
    line-height: 1.4;
    transition: border-color var(--transition-smooth);
}

.main-content section:hover h2 {
    border-left-color: var(--primary-dark);
}

.main-content h3 {
    font-size: 19px;
    color: #1a1a2e;
    margin: 28px 0 12px;
    font-weight: 700;
    letter-spacing: -0.2px;
}

.main-content h3::before {
    content: '●';
    color: var(--primary-color);
    margin-right: 8px;
    font-size: 12px;
    vertical-align: middle;
}

.main-content p {
    margin-bottom: 18px;
    text-align: justify;
    color: #555;
    line-height: 1.9;
}

.main-content ul {
    margin-left: 6px;
    margin-bottom: 22px;
    color: #555;
    list-style: none;
    padding-left: 4px;
}

.main-content li {
    margin-bottom: 10px;
    padding-left: 22px;
    position: relative;
    line-height: 1.7;
}

.main-content li::before {
    content: '';
    position: absolute;
    left: 2px;
    top: 10px;
    width: 6px;
    height: 6px;
    background-color: var(--primary-color);
    border-radius: 50%;
    opacity: 0.7;
}

.main-content a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px dashed var(--primary-color);
    transition: all var(--transition-fast);
}

.main-content a:hover {
    color: var(--primary-dark);
    border-bottom-style: solid;
}

.main-content strong {
    color: #333;
    font-weight: 700;
}

/* 入门三步走卡片 */
.main-content .step-cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 18px;
    margin-top: 18px;
}

.step-card {
    background: #f8fafc;
    border-radius: var(--radius-md);
    padding: 22px 18px;
    text-align: center;
    border: 1px solid var(--border-light);
    transition: all var(--transition-smooth);
}

.step-card:hover {
    background: #ffffff;
    box-shadow: var(--shadow-md);
    border-color: #d0ddf0;
    transform: translateY(-3px);
}

.step-card .step-icon {
    font-size: 36px;
    margin-bottom: 10px;
    display: block;
}

.step-card h4 {
    margin-bottom: 8px;
    color: var(--dark-color);
    font-size: 16px;
    font-weight: 700;
}

.step-card p {
    font-size: 13px;
    color: #888;
    text-align: center;
    margin-bottom: 0;
    line-height: 1.6;
}

@media (max-width: 768px) {
    .main-content {
        margin: 30px auto 40px;
        padding: 0 16px;
    }
    .main-content h2 {
        font-size: 21px;
        padding-left: 12px;
    }
    .main-content h3 {
        font-size: 17px;
    }
    .main-content p {
        text-align: left;
        font-size: 15px;
    }
}

/* ---------- 页脚 ---------- */
footer {
    background-color: var(--dark-color);
    color: #b0b0b8;
    padding: 44px 24px 28px;
    font-size: 14px;
    border-top: 3px solid var(--primary-color);
    margin-top: 20px;
}

.footer-container {
    max-width: var(--nav-max-width);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 36px;
}

.footer-info {
    flex: 1.3;
    min-width: 260px;
}

.footer-info h4,
.footer-links h4 {
    color: #e8e8ec;
    margin-bottom: 14px;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.2px;
    position: relative;
    padding-bottom: 10px;
}

.footer-info h4::after,
.footer-links h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 28px;
    height: 2px;
    background: var(--primary-color);
    border-radius: 2px;
}

.footer-links {
    flex: 1;
    min-width: 180px;
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.footer-links a {
    color: #b0b0b8;
    text-decoration: none;
    font-size: 13px;
    transition: all var(--transition-fast);
    padding: 2px 0;
    display: inline-block;
    width: fit-content;
}

.footer-links a:hover {
    color: #ffffff;
    padding-left: 6px;
}

.copyright {
    width: 100%;
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 12px;
    color: #777;
    letter-spacing: 0.3px;
}

@media (max-width: 768px) {
    footer {
        padding: 30px 16px 20px;
    }
    .footer-container {
        gap: 24px;
    }
    .footer-info {
        min-width: 100%;
    }
    .footer-links {
        min-width: 140px;
    }
}

/* ---------- 全局动画 ---------- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 为设备卡片添加渐进式入场动画 */
.device-card {
    animation: fadeInUp 0.5s ease backwards;
}

.device-card:nth-child(1) {
    animation-delay: 0.05s;
}

.device-card:nth-child(2) {
    animation-delay: 0.12s;
}

.device-card:nth-child(3) {
    animation-delay: 0.19s;
}

.device-card:nth-child(4) {
    animation-delay: 0.26s;
}

/* ---------- 打印样式 ---------- */
@media print {
    header,
    footer,
    .breadcrumb,
    .device-grid,
    .btn-download {
        display: none;
    }
    .main-content {
        max-width: 100%;
    }
    body {
        color: #000;
        background: #fff;
    }
}

/* ---------- 减少动画偏好 ---------- */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    html {
        scroll-behavior: auto;
    }
}