/* =========================================================
   KiiChain — 全站响应式
   ========================================================= */

/* 显示/隐藏辅助类 */
.show-mobile { display: none; }
.hide-mobile { display: initial; }

/* =========================================================
   1. 大屏适配（≤1100px）
   ========================================================= */
@media (max-width: 1100px) {
    .container { padding: 0 20px; }
    .header-inner { padding: 0 20px; }
    .header-left { gap: 24px; }
    .nav-link { padding: 8px 10px; font-size: 13px; }

    .features-grid { grid-template-columns: repeat(2, 1fr); }
    .dev-grid { grid-template-columns: repeat(2, 1fr); }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }

    .hero-title { font-size: clamp(34px, 5vw, 56px); }
    .hero-sub { font-size: 17px; }
}

/* =========================================================
   2. 平板 / 手机（≤900px）
   ========================================================= */
@media (max-width: 900px) {
    /* 显示/隐藏 */
    .show-mobile { display: inline !important; }
    .hide-mobile { display: none !important; }

    /* Header 移动端（详见 style.css） */
    .header-nav { display: none !important; }
    .hamburger { display: flex !important; }

    /* Hybrid */
    .hybrid-inner { grid-template-columns: 1fr; gap: 40px; }
    .hybrid-visual { order: -1; }
    .hybrid-orb { width: 220px; height: 220px; }
    .hybrid-title, .hybrid-desc { text-align: center; }
    .hybrid-text { text-align: center; }
    .hybrid-text .btn { display: inline-flex; }

    /* Ecosystem */
    .ecosystem-grid { grid-template-columns: 1fr; }

    /* Community */
    .community-inner { grid-template-columns: 1fr; gap: 40px; }
    .community-text .section-title,
    .community-text .section-sub { text-align: center; }
    .community-actions { justify-content: center; }

    /* Footer */
    .footer-top { grid-template-columns: 1fr; gap: 40px; }
    .footer-cols { grid-template-columns: repeat(3, 1fr); }

    /* Section */
    .section { padding: 80px 0; }
}

/* =========================================================
   3. 手机横屏 / 小平板（≤768px）
   ========================================================= */
@media (max-width: 768px) {
    .container { padding: 0 16px; }
    .header-inner { padding: 0 14px; }
    .header-logo img { height: 26px; }

    /* Section */
    .section { padding: 60px 0; }
    .section-header { margin-bottom: 36px; }
    .section-title { font-size: clamp(24px, 5vw, 30px); }
    .section-sub { font-size: 15px; }

    /* Hero */
    .hero-section { padding: calc(var(--header-h) + 50px) 0 40px; min-height: auto; }
    .hero-title { font-size: 34px; margin-bottom: 18px; }
    .hero-sub { font-size: 16px; margin-bottom: 26px; }
    .hero-actions { flex-direction: column; align-items: stretch; }
    .hero-actions .btn { width: 100%; }

    /* Ticker */
    .ticker-track { gap: 32px; animation-duration: 40s; }
    .ticker-name { display: none; }

    /* Features */
    .features-grid { grid-template-columns: 1fr; gap: 14px; }
    .feature-card { padding: 22px 20px; }

    /* Stats */
    .stats-grid { grid-template-columns: 1fr 1fr; gap: 14px; }
    .stat-value { font-size: 38px; }
    .stat-card { padding: 22px 14px; }
    .otc-block { padding: 24px; }

    /* Ecosystem */
    .ecosystem-card { padding: 24px; }
    .ecosystem-name { font-size: 19px; }

    /* Dev */
    .dev-grid { grid-template-columns: 1fr; gap: 14px; }
    .dev-card { padding: 22px; }

    /* Community */
    .community-card { padding: 24px; }

    /* CTA */
    .cta-box { padding: 36px 22px; }
    .cta-box h2 { font-size: 22px; }

    /* Footer */
    .footer-cols { grid-template-columns: repeat(3, 1fr); gap: 20px 12px; }
    .footer-bottom { flex-direction: column; text-align: center; gap: 14px; }
    .footer-legal { justify-content: center; flex-wrap: wrap; }

    /* Modal */
    .modal-content { padding: 24px; }

    /* FAQ */
    .faq-question { padding: 16px 20px; font-size: 14px; }
    .faq-answer { padding: 0 20px; }
    .faq-item.open .faq-answer { padding: 0 20px 16px; }

    /* Staking */
    .staking-grid { grid-template-columns: 1fr; }

    /* Page Hero */
    .page-hero { padding: calc(var(--header-h) + 50px) 0 30px; }
    .page-hero::before { width: 90%; height: 240px; filter: blur(60px); }

    /* 表格 → 卡片式 */
    .table-wrap {
        margin: 0 -16px;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }
    .table-wrap thead { display: none; }
    .table-wrap tbody tr {
        display: block;
        border-bottom: 1px solid var(--border);
        padding: 12px 16px;
    }
    .table-wrap tbody tr:last-child { border-bottom: none; }
    .table-wrap tbody td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 12px;
        padding: 6px 0;
        border: none;
        font-size: 13px;
        text-align: right;
    }
    .table-wrap tbody td::before {
        content: attr(data-label);
        color: var(--text-muted);
        font-size: 12px;
        font-weight: 500;
        text-align: left;
        flex-shrink: 0;
    }
}

/* =========================================================
   4. 手机竖屏（≤640px）
   ========================================================= */
@media (max-width: 640px) {
    .header-inner { padding: 0 12px; }
    .header-logo img { height: 24px; }

    .hero-title { font-size: 30px; }
    .hero-glow-1 { width: 400px; height: 400px; }
    .hero-glow-2 { width: 280px; height: 280px; }

    .mobile-menu { padding: 16px 16px 20px; }

    .section { padding: 52px 0; }

    .features-grid { gap: 12px; }
    .stat-value { font-size: 32px; }
    .bridge-chain { padding: 10px 20px; font-size: 13px; }
    .footer-top { gap: 28px; }

    .wallet-opt { padding: 12px 14px; }
    .wallet-icon { font-size: 22px; }
}

/* =========================================================
   5. 小屏手机（≤480px）
   ========================================================= */
@media (max-width: 480px) {
    .container { padding: 0 12px; }

    .hero-title { font-size: 26px; }
    .hero-sub { font-size: 15px; }

    .section-title { font-size: 22px; }
    .section-sub { font-size: 14px; }

    .stats-grid { grid-template-columns: 1fr; gap: 12px; }
    .stat-value { font-size: 30px; }

    .cta-box { padding: 30px 18px; }
    .cta-box h2 { font-size: 20px; }

    .page-hero::before { height: 200px; }
    .faq-question { font-size: 13px; padding: 14px 16px; }
    .dev-tag { font-size: 9px; }
    .dev-name { font-size: 15px; }

    /* 页脚：两列排布 */
    .footer-cols { grid-template-columns: repeat(2, 1fr); }
    .footer-col:last-child {
        grid-column: 1 / -1;
        padding-top: 8px;
        border-top: 1px dashed var(--border);
    }
}

/* =========================================================
   6. 超小屏（≤420px）
   ========================================================= */
@media (max-width: 420px) {
    .hero-title { font-size: 24px; }
    .hero-glow-1 { width: 320px; height: 320px; }
    .hero-glow-2 { width: 220px; height: 220px; }

    .hybrid-orb { width: 180px; height: 180px; }
    .hybrid-core { width: 70px; height: 70px; font-size: 16px; }

    .header-logo img { height: 22px; }
}

/* =========================================================
   7. 大屏优化（≥1600px）
   ========================================================= */
@media (min-width: 1600px) {
    .container { max-width: 1400px; }
    .header-inner { max-width: 1600px; }
}

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

/* =========================================================
   9. 打印样式
   ========================================================= */
@media print {
    .site-header, .site-footer, .btn, .hamburger,
    .mobile-menu, .modal, .hero-glow, .ticker-section,
    .pay-sidebar { display: none !important; }

    body { background: #fff; color: #000; }
    .section { padding: 20px 0; }
    a { color: #000; text-decoration: underline; }
}