:root {
    color-scheme: dark;
    --bg: #0b1020;
    --panel: rgba(255, 255, 255, .08);
    --panel-strong: rgba(255, 255, 255, .13);
    --text: #f8fafc;
    --muted: #aab4c3;
    --line: rgba(255, 255, 255, .16);
    --primary: #ff4f45;
    --primary-dark: #df342c;
    --accent: #28d6a1;
    --blue: #71a7ff;
    --max: 1160px;
    --shadow: 0 24px 70px rgba(0, 0, 0, .28);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 12% 12%, rgba(255, 79, 69, .22), transparent 28%),
        radial-gradient(circle at 88% 18%, rgba(40, 214, 161, .16), transparent 28%),
        linear-gradient(180deg, #0b1020 0%, #12182a 48%, #0b1020 100%);
    line-height: 1.7;
}

a { color: inherit; }

.site-header {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 14px max(18px, calc((100vw - var(--max)) / 2));
    background: rgba(11, 16, 32, .82);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(16px);
}

.brand {
    display: inline-flex;
    align-items: center;
    min-width: 0;
    gap: 10px;
    text-decoration: none;
    font-weight: 900;
}
.brand img,
.brand-fallback {
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    border-radius: 8px;
}
.brand img { object-fit: contain; }
.brand-fallback {
    display: inline-grid;
    place-items: center;
    background: linear-gradient(135deg, var(--primary), #ff9f43);
    color: #fff;
}
.brand span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.site-nav {
    display: flex;
    gap: 8px;
    color: var(--muted);
    font-size: 14px;
}
.site-nav a {
    padding: 8px 12px;
    border-radius: 8px;
    text-decoration: none;
}
.site-nav a:hover {
    background: var(--panel);
    color: var(--text);
}

.hero-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) 390px;
    gap: 24px;
    align-items: stretch;
    max-width: var(--max);
    margin: 0 auto;
    padding: clamp(46px, 7vw, 92px) 18px 30px;
}

.hero-copy,
.download-panel,
.stats-strip,
.download-row,
.shot-card,
.detail-grid article,
.empty-box,
.message-card,
.open-browser-box,
.image-preview-dialog {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.hero-copy {
    padding: clamp(28px, 5vw, 52px);
    background:
        linear-gradient(135deg, rgba(255, 79, 69, .16), rgba(113, 167, 255, .10)),
        var(--panel);
}
.eyebrow,
.section-title p {
    margin: 0 0 10px;
    color: var(--accent);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0;
}
.hero-copy h1 {
    margin: 0;
    font-size: clamp(42px, 7vw, 82px);
    line-height: 1.05;
    letter-spacing: 0;
}
.lead {
    margin: 20px 0 0;
    max-width: 760px;
    font-size: clamp(22px, 3vw, 32px);
    line-height: 1.35;
    font-weight: 800;
}
.summary {
    margin: 16px 0 0;
    max-width: 780px;
    color: var(--muted);
}
.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.btn,
.message-card a,
.copy-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 18px;
    border: 1px solid transparent;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 900;
    cursor: pointer;
}
.btn.primary,
.btn.row-btn,
.copy-button {
    background: var(--primary);
    color: #fff;
}
.btn.primary:hover,
.btn.row-btn:hover,
.copy-button:hover { background: var(--primary-dark); }
.btn.ghost,
.message-card a {
    border-color: var(--line);
    background: rgba(255,255,255,.06);
    color: var(--text);
}

.download-panel {
    display: grid;
    grid-template-rows: auto 1fr auto;
    gap: 16px;
    padding: 22px;
}
.panel-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.panel-top span {
    color: var(--muted);
    font-weight: 800;
}
.panel-top strong {
    display: inline-grid;
    place-items: center;
    min-width: 60px;
    height: 60px;
    border-radius: 8px;
    background: rgba(255,255,255,.12);
    color: var(--accent);
    font-size: 30px;
}
.quick-lines {
    display: grid;
    gap: 10px;
}
.quick-lines a,
.line-empty {
    display: grid;
    gap: 4px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255,255,255,.06);
    text-decoration: none;
}
.quick-lines a:hover {
    border-color: rgba(255, 79, 69, .45);
    background: rgba(255,255,255,.10);
}
.quick-lines span {
    color: var(--accent);
    font-size: 13px;
    font-weight: 900;
}
.quick-lines b { color: var(--text); }
.line-empty,
.panel-note {
    color: var(--muted);
}
.panel-note {
    margin: 0;
    font-size: 13px;
}

.stats-strip {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    max-width: var(--max);
    margin: 0 auto;
    overflow: hidden;
}
.stats-strip div {
    display: grid;
    gap: 2px;
    padding: 18px 20px;
    border-right: 1px solid var(--line);
}
.stats-strip div:last-child { border-right: 0; }
.stats-strip strong { font-size: 24px; }
.stats-strip span {
    color: var(--muted);
    font-size: 14px;
}

.section-block {
    max-width: var(--max);
    margin: 0 auto;
    padding: clamp(54px, 7vw, 82px) 18px;
}
.muted-block {
    max-width: none;
    background: rgba(255,255,255,.04);
}
.muted-block > * {
    max-width: var(--max);
    margin-inline: auto;
}
.section-title { margin-bottom: 24px; }
.section-title h2 {
    margin: 0;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.2;
}
.section-title span {
    display: block;
    margin-top: 10px;
    color: var(--muted);
}

.download-list {
    display: grid;
    gap: 12px;
}
.download-row {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr) 132px;
    gap: 16px;
    align-items: center;
    padding: 16px;
    background: rgba(255,255,255,.07);
}
.row-index {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border-radius: 8px;
    background: rgba(113, 167, 255, .16);
    color: var(--blue);
    font-weight: 900;
}
.row-main h3 {
    margin: 0;
    font-size: 20px;
}
.row-main p {
    margin: 4px 0 0;
    color: var(--muted);
}
.row-btn { width: 100%; }

.screenshot-board {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 18px;
}
.shot-card {
    margin: 0;
    overflow: hidden;
    background: rgba(255,255,255,.08);
}
.shot-button {
    position: relative;
    display: block;
    width: 100%;
    min-height: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: rgba(255,255,255,.05);
    cursor: zoom-in;
}
.shot-button img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: contain;
    padding: 10px;
    background:
        linear-gradient(45deg, rgba(255,255,255,.06) 25%, transparent 25%),
        linear-gradient(-45deg, rgba(255,255,255,.06) 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, rgba(255,255,255,.06) 75%),
        linear-gradient(-45deg, transparent 75%, rgba(255,255,255,.06) 75%),
        rgba(255,255,255,.04);
    background-size: 22px 22px;
    background-position: 0 0, 0 11px, 11px -11px, -11px 0;
}
.shot-button span {
    position: absolute;
    right: 12px;
    bottom: 12px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(0, 0, 0, .72);
    color: #fff;
    font-size: 12px;
    font-weight: 900;
}
.shot-card figcaption {
    padding: 12px 14px;
    color: var(--muted);
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}
.detail-grid article,
.empty-box {
    padding: 22px;
    background: rgba(255,255,255,.07);
}
.detail-grid h3,
.empty-box h3 { margin: 0 0 8px; }
.detail-grid p,
.empty-box p {
    margin: 0;
    color: var(--muted);
}

.site-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    justify-content: center;
    padding: 24px 18px;
    border-top: 1px solid var(--line);
    background: rgba(0,0,0,.18);
    color: var(--muted);
    font-size: 14px;
}
.site-footer a { text-decoration: none; }

.simple-page {
    display: grid;
    min-height: 100vh;
    place-items: center;
    padding: 20px;
    background: var(--bg);
}
.message-card {
    width: min(100%, 520px);
    padding: 30px;
    text-align: center;
}
.message-card h1 {
    margin: 0 0 12px;
    font-size: 30px;
}
.message-card p {
    margin: 0 0 20px;
    color: var(--muted);
}
.message-card a,
.copy-button { margin: 6px; }

.open-browser-mask {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 88px 20px 20px;
    background: #fff;
    color: #172033;
}
.open-browser-mask[hidden] { display: none; }
.open-browser-mask .arrow {
    position: fixed;
    top: 14px;
    right: 20px;
    color: #d8342a;
    font-size: 48px;
    font-weight: 900;
}
.open-browser-box {
    width: min(100%, 360px);
    padding: 24px;
    background: #fff;
    color: #172033;
}
.open-browser-box h2 { margin: 0 0 10px; }
.open-browser-box p {
    margin: 0 0 18px;
    color: #667085;
}
.open-browser-box button {
    width: 100%;
    min-height: 42px;
    border: 0;
    border-radius: 8px;
    background: #d8342a;
    color: #fff;
    font-weight: 900;
}

.image-preview {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: grid;
    place-items: center;
    padding: 22px;
}
.image-preview[hidden] { display: none; }
.image-preview-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .84);
    backdrop-filter: blur(6px);
}
.image-preview-dialog {
    position: relative;
    z-index: 1;
    width: min(1120px, 96vw);
    max-height: 92vh;
    margin: 0;
    padding: 18px;
    background: #101827;
}
.image-preview-dialog img {
    display: block;
    width: 100%;
    max-height: calc(92vh - 92px);
    object-fit: contain;
    background: rgba(255,255,255,.04);
}
.image-preview-dialog figcaption {
    padding: 12px 46px 0 2px;
    color: var(--muted);
    font-weight: 800;
}
.image-preview-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 38px;
    height: 38px;
    min-height: 38px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #fff;
    color: #111827;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}

@media (max-width: 860px) {
    .site-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
    }
    .site-nav {
        width: 100%;
        justify-content: space-between;
    }
    .hero-shell {
        grid-template-columns: 1fr;
    }
    .stats-strip {
        grid-template-columns: 1fr;
        margin-inline: 18px;
    }
    .stats-strip div {
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }
    .stats-strip div:last-child { border-bottom: 0; }
    .download-row {
        grid-template-columns: 52px minmax(0, 1fr);
    }
    .row-btn { grid-column: 1 / -1; }
    .detail-grid { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
    .hero-actions .btn { width: 100%; }
    .hero-copy,
    .download-panel { padding: 22px; }
    .screenshot-board { grid-template-columns: 1fr; }
    .image-preview { padding: 12px; }
    .image-preview-dialog {
        width: 100%;
        padding: 12px;
    }
}
