:root {
    --background: #f1f5f9;
    --surface: #ffffff;
    --surface-strong: #f8fafc;
    --border: #e2e8f0;
    --border-strong: #cbd5f0;
    --brand: #2563eb;
    --brand-soft: rgba(37, 99, 235, 0.12);
    --brand-strong: rgba(37, 99, 235, 0.22);
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --shadow-soft: 0 25px 40px rgba(15, 23, 42, 0.05);
    --shadow-strong: 0 30px 50px rgba(15, 23, 42, 0.08);
    --radius-lg: 20px;
    --radius-md: 12px;
    --radius-sm: 8px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: 'Inter', 'HarmonyOS Sans', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background: var(--background);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    line-height: 1.6;
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
    outline: 3px solid rgba(37, 99, 235, 0.35);
    outline-offset: 2px;
}

button {
    font: inherit;
}

.container {
    width: min(1100px, calc(100% - 32px));
    margin: 0 auto;
}

.site-header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.05);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.1rem 0;
    gap: 1.5rem;
}

.logo {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--brand);
    letter-spacing: 0.02em;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.site-nav a {
    padding: 0.5rem 0.9rem;
    border-radius: 999px;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.site-nav a:hover {
    background: var(--brand-soft);
    color: var(--brand);
    transform: translateY(-1px);
}

.site-nav a[aria-current="page"] {
    background: var(--brand-soft);
    color: var(--brand);
    font-weight: 600;
}

.page {
    flex: 1 0 auto;
    padding: 2.5rem 0 3.5rem;
}

.intro {
    text-align: center;
    margin-bottom: 2.5rem;
}

.eyebrow {
    font-size: 0.8rem;
    letter-spacing: 0.32em;
    color: var(--text-muted);
    margin-bottom: 0.6rem;
}

.intro h1 {
    font-size: clamp(2rem, 4.5vw, 3rem);
    margin: 0.25rem 0 0.75rem;
}

.intro p {
    color: var(--text-secondary);
    max-width: 640px;
    margin: 0 auto;
}

.tools {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.7rem;
    margin-bottom: 2.5rem;
    box-shadow: var(--shadow-soft);
}

.iframe-games {
    background: linear-gradient(180deg, rgba(37, 99, 235, 0.08), rgba(37, 99, 235, 0));
    border: 1px solid rgba(37, 99, 235, 0.16);
    border-radius: calc(var(--radius-lg) + 8px);
    padding: 2.4rem;
    margin-bottom: 3rem;
    box-shadow: 0 35px 60px rgba(37, 99, 235, 0.12);
}

.iframe-games__header {
    text-align: center;
    max-width: 720px;
    margin: 0 auto 2rem;
}

.iframe-games__header h2 {
    margin: 0.35rem 0 0.75rem;
    font-size: clamp(1.85rem, 4vw, 2.35rem);
}

.iframe-games__header p {
    color: var(--text-secondary);
    margin: 0;
}

.iframe-games__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.8rem;
}

.iframe-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(148, 163, 184, 0.35);
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    backdrop-filter: blur(4px);
}

.iframe-card__header {
    padding: 1.4rem 1.6rem 0.9rem;
}

.iframe-card__header h3 {
    margin: 0 0 0.5rem;
    font-size: 1.25rem;
}

.iframe-card__header p {
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.55;
}

.iframe-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    background: #0f172a;
    overflow: hidden;
}

.iframe-wrapper iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.iframe-card__actions {
    padding: 1rem 1.6rem 1.5rem;
    display: flex;
    justify-content: flex-end;
}

.search-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.search-input {
    flex: 1 1 240px;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 0.75rem 1rem;
    background: var(--surface-strong);
    font-size: 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-input:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
    background: #fff;
}

.results-count {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.filter-button {
    border: 1px solid var(--border);
    background: #fff;
    border-radius: 999px;
    padding: 0.45rem 1rem;
    font-size: 0.95rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.filter-button:hover {
    border-color: var(--brand);
    color: var(--brand);
}

.filter-button.is-active {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
    box-shadow: 0 12px 25px rgba(37, 99, 235, 0.3);
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.6rem;
}

.game-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.game-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-strong);
}

.game-card figure {
    margin: 0;
    aspect-ratio: 4 / 3;
    background: #e2e8f0;
    overflow: hidden;
}

.game-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.game-card__body {
    padding: 1.25rem 1.35rem 0.9rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    flex: 1 1 auto;
}

.game-card__body h3 {
    margin: 0;
    font-size: 1.1rem;
}

.game-card__body p {
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.55;
}

.game-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.75rem;
    background: #e0f2fe;
    color: #0369a1;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.snake-hero {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2.2rem;
    box-shadow: var(--shadow-soft);
    margin-bottom: 2.5rem;
}

.snake-hero__content {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.snake-hero__content h1 {
    margin: 0;
}

.snake-hero__content p {
    margin: 0;
    color: var(--text-secondary);
}

.snake-hero__bullets {
    list-style: none;
    padding: 0;
    margin: 0.4rem 0 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 0.5rem 1rem;
    color: var(--text-secondary);
}

.snake-hero__bullets li::before {
    content: "•";
    color: var(--brand);
    margin-right: 0.35rem;
}

.snake-gallery {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.snake-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.snake-card figure {
    position: relative;
    background: linear-gradient(135deg, #38bdf8, #c084fc);
}

.snake-card__thumb img {
    display: block;
}

.snake-card__badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(15, 23, 42, 0.8);
    color: #fff;
    padding: 0.4rem 0.75rem;
    border-radius: 999px;
    font-size: 0.8rem;
    letter-spacing: 0.02em;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.newgame-hero {
    margin: 3rem 0 2.5rem;
    display: grid;
    gap: 1.25rem;
    max-width: 720px;
}

.newgame-hero h1 {
    margin: 0;
    font-size: clamp(2rem, 3vw, 2.6rem);
    line-height: 1.2;
}

.newgame-hero p {
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.7;
}

.newgame-status {
    font-size: 0.95rem;
}

.newgame-list {
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
}

.section-subtitle {
    margin: 0.4rem 0 0;
    color: var(--text-secondary);
    line-height: 1.6;
}

a.game-card {
    text-decoration: none;
    color: inherit;
}

a.game-card:focus-visible {
    outline: 3px solid var(--brand);
    outline-offset: 3px;
}

@media (max-width: 768px) {
    .newgame-hero {
        margin: 2.5rem 0 2rem;
    }
}

.game-card__footer {
    padding: 0 1.35rem 1.35rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.play-button {
    border: none;
    background: var(--brand);
    color: #fff;
    border-radius: 14px;
    padding: 0.6rem 1.2rem;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.play-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(37, 99, 235, 0.35);
    background: #1d4ed8;
}

.play-button:active {
    transform: translateY(0);
    box-shadow: none;
}

.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    border-radius: var(--radius-lg);
    border: 2px dashed var(--border);
    color: var(--text-secondary);
    background: var(--surface);
}

.site-footer {
    background: var(--surface);
    border-top: 1px solid var(--border);
}

.footer-inner {
    padding: 1.75rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    align-items: center;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.92rem;
}

.footer-links {
    display: flex;
    gap: 1.2rem;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-links a:hover {
    color: var(--brand);
}

@media (max-width: 900px) {
    .page {
        padding-top: 2rem;
    }

    .iframe-games {
        padding: 2rem 1.5rem;
    }
}

@media (max-width: 720px) {
    .header-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .site-nav {
        width: 100%;
    }

    .game-card__footer {
        flex-direction: column;
        align-items: stretch;
    }

    .play-button {
        width: 100%;
        text-align: center;
    }

    .iframe-card__actions {
        justify-content: center;
    }
}

.primary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.4rem;
    border-radius: 14px;
    border: none;
    font-weight: 600;
    font-size: 1rem;
    color: #fff;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    cursor: pointer;
    box-shadow: 0 18px 35px rgba(37, 99, 235, 0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button.is-loading {
    cursor: progress;
    pointer-events: none;
    transform: none;
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.2);
}

.primary-button.is-loading::after {
    content: "";
    width: 1.1rem;
    height: 1.1rem;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    animation: spin 0.8s linear infinite;
}

.primary-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 20px 45px rgba(37, 99, 235, 0.35);
}

.primary-button:active {
    transform: translateY(1px);
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.25);
}

.scraper-page {
    background: var(--background);
}

.scraper-intro {
    text-align: center;
    margin-bottom: 2.5rem;
}

.scraper-intro h1 {
    margin-bottom: 1rem;
}

.scraper-intro p {
    margin: 0 auto;
    max-width: 720px;
    color: var(--text-secondary);
}

.scraper-form {
    display: grid;
    gap: 1.4rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    box-shadow: var(--shadow-soft);
    margin-bottom: 1.5rem;
}

.field-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1.2rem;
}

.field-group {
    flex: 1 1 220px;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.field-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 0.02em;
}

.field-input {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0.7rem 0.9rem;
    background: var(--surface-strong);
    font-size: 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.field-input:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
    background: #fff;
}

.scraper-status {
    min-height: 1.5rem;
    margin: 0.5rem 0 1.5rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
    transition: color 0.2s ease;
}

.scraper-status[data-tone="loading"] {
    color: var(--brand);
}

.scraper-status[data-tone="success"] {
    color: #15803d;
}

.scraper-status[data-tone="error"] {
    color: #dc2626;
}

.loading-cell {
    text-align: center;
    color: var(--text-secondary);
    font-style: italic;
}

.table-wrapper {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: auto;
    box-shadow: var(--shadow-soft);
}

.results-table {
    width: 100%;
    min-width: 720px;
    border-collapse: collapse;
}

.results-table th,
.results-table td {
    padding: 0.9rem 1rem;
    border-bottom: 1px solid var(--border);
    text-align: left;
    vertical-align: top;
}

.results-table th {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    background: var(--surface-strong);
}

.results-table tbody tr:last-child td {
    border-bottom: none;
}

.results-table tbody tr:hover {
    background: var(--brand-soft);
}

.project-title {
    font-weight: 600;
    color: var(--brand);
}

.project-author {
    margin: 0.35rem 0 0;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.mono-cell {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    word-break: break-all;
    font-family: 'JetBrains Mono', 'Fira Code', 'SFMono-Regular', Consolas, 'Liberation Mono', monospace;
}

.mono-cell a {
    color: var(--text-secondary);
}

.copy-button {
    border: 1px solid var(--border);
    background: #f8fafc;
    color: var(--text-secondary);
    border-radius: 999px;
    padding: 0.35rem 0.9rem;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.copy-button:hover {
    border-color: var(--brand);
    color: var(--brand);
    background: #fff;
}

.copy-button.is-success {
    border-color: #16a34a;
    color: #15803d;
    background: rgba(22, 163, 74, 0.12);
}

.copy-button.is-error {
    border-color: #dc2626;
    color: #dc2626;
    background: rgba(220, 38, 38, 0.12);
}

.scraper-note {
    margin-top: 1.75rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.7;
}

.scraper-note code {
    background: rgba(15, 23, 42, 0.06);
    padding: 0.15rem 0.4rem;
    border-radius: 6px;
    font-size: 0.85rem;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 720px) {
    .scraper-form {
        padding: 1.4rem;
    }

    .field-row {
        gap: 1rem;
    }

    .field-group {
        flex: 1 1 100%;
    }
}


.site-filters {
    justify-content: center;
    flex-wrap: wrap;
}

.site-list {
    display: grid;
    gap: 1.5rem;
}

.site-card {
    display: grid;
    grid-template-columns: minmax(56px, 72px) 1fr auto;
    gap: 1.5rem;
    align-items: stretch;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-soft);
}

.site-rank {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--brand);
    display: flex;
    align-items: center;
    justify-content: center;
}

.site-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.site-header-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.site-title {
    margin: 0;
    font-size: 1.25rem;
}

.site-domain {
    color: var(--brand);
    font-size: 0.95rem;
    display: inline-block;
    margin-top: 0.25rem;
}

.site-domain:hover {
    text-decoration: underline;
}

.site-visits {
    font-weight: 600;
    color: var(--text-primary);
    background: var(--surface-strong);
    border-radius: var(--radius-sm);
    padding: 0.4rem 0.75rem;
    white-space: nowrap;
}

.site-description {
    margin: 0;
    color: var(--text-secondary);
}

.site-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: flex-start;
}

.site-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.site-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.35rem 0.65rem;
    background: var(--brand-soft);
    color: var(--brand);
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 500;
}

.site-highlights {
    margin: 0;
    padding-left: 1.25rem;
    color: var(--text-secondary);
    display: grid;
    gap: 0.35rem;
}

.site-visit-button {
    align-self: center;
    background: var(--brand);
    color: #ffffff;
    padding: 0.75rem 1.1rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 120px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.site-visit-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 15px 30px rgba(37, 99, 235, 0.18);
}

.site-visit-button:focus-visible {
    outline-color: rgba(37, 99, 235, 0.4);
}

@media (max-width: 900px) {
    .site-card {
        grid-template-columns: auto 1fr;
    }

    .site-visit-button {
        grid-column: 1 / -1;
        width: 100%;
    }
}

@media (max-width: 600px) {
    .site-header-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .site-visits {
        align-self: flex-start;
    }

    .site-rank {
        font-size: 1.5rem;
    }
}

.navigation-hero {
    background: radial-gradient(circle at top left, rgba(37, 99, 235, 0.2), transparent 55%),
                radial-gradient(circle at top right, rgba(16, 185, 129, 0.22), transparent 60%),
                linear-gradient(135deg, #1d4ed8, #0f172a);
    color: #ffffff;
    padding: 2.75rem 2.5rem;
    border-radius: var(--radius-lg);
    box-shadow: 0 28px 45px rgba(15, 23, 42, 0.3);
    text-align: left;
    position: relative;
    overflow: hidden;
    margin-bottom: 2.75rem;
}

.navigation-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at bottom right, rgba(255, 255, 255, 0.18), transparent 65%);
    pointer-events: none;
}

.navigation-hero h1 {
    margin-top: 0.4rem;
    margin-bottom: 0.8rem;
}

.navigation-hero p {
    margin: 0;
    max-width: 620px;
    color: rgba(248, 250, 252, 0.9);
}

.navigation-highlights {
    margin-top: 1.8rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
}

.navigation-highlights span {
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.22);
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    font-size: 0.9rem;
    backdrop-filter: blur(4px);
}

.navigation-tools {
    margin-top: 2.5rem;
}

.navigation-filters {
    justify-content: center;
    gap: 0.75rem;
}

.software-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.software-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    box-shadow: var(--shadow-soft);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    min-height: 260px;
}

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

.software-card__header {
    display: flex;
    align-items: flex-start;
    gap: 0.9rem;
}

.software-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: var(--brand-soft);
    display: grid;
    place-items: center;
    font-size: 1.2rem;
    color: var(--brand);
}

.software-card__title {
    flex: 1;
}

.software-name {
    font-size: 1.1rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.software-name:hover {
    color: var(--brand);
}

.software-meta {
    margin: 0.25rem 0 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.software-category {
    align-self: flex-start;
    padding: 0.4rem 0.7rem;
    border-radius: 10px;
    background: var(--surface-strong);
    color: var(--brand);
    font-weight: 600;
    font-size: 0.8rem;
}

.software-desc {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.software-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.software-tag {
    padding: 0.35rem 0.6rem;
    background: var(--surface-strong);
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.software-link {
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--brand);
    font-weight: 600;
}

.software-link::after {
    content: '→';
    font-size: 1rem;
    transition: transform 0.2s ease;
}

.software-link:hover::after {
    transform: translateX(3px);
}

.software-empty {
    grid-column: 1 / -1;
    padding: 2.5rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    text-align: center;
    color: var(--text-secondary);
}

/* 最新游戏追踪页面 */
#latest-games {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.latest-hero {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(14, 116, 144, 0.08));
    border: 1px solid rgba(37, 99, 235, 0.14);
    border-radius: var(--radius-lg);
    padding: 3.5rem;
    box-shadow: var(--shadow-soft);
}

.latest-hero__highlights {
    list-style: none;
    margin: 2rem 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.75rem 1.5rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.latest-controls {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
}

.controls-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.5rem;
}

.controls-header h2 {
    margin: 0;
}

.controls-subtitle {
    margin: 0.35rem 0 0;
    color: var(--text-secondary);
}

.proxy-hint {
    margin: 0;
    padding: 0.875rem 1rem;
    background: rgba(15, 23, 42, 0.04);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.proxy-hint code {
    background: rgba(15, 23, 42, 0.08);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-family: 'Fira Code', monospace;
    font-size: 0.85rem;
}

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

.source-card {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    background: var(--surface-strong);
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.source-card:hover {
    border-color: rgba(37, 99, 235, 0.35);
    box-shadow: 0 18px 30px rgba(15, 23, 42, 0.08);
    transform: translateY(-2px);
}

.source-card--disabled {
    opacity: 0.6;
}

.source-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.source-card__toggle {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    font-weight: 600;
}

.source-card__toggle input {
    width: 1.15rem;
    height: 1.15rem;
}

.source-card__description {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.source-card__field {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.source-card__field input {
    font: inherit;
    padding: 0.6rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.source-card__field input:focus {
    border-color: rgba(37, 99, 235, 0.65);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.source-card__field--inline {
    max-width: 120px;
}

.source-status {
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.25rem 0.55rem;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.05);
    color: var(--text-secondary);
    white-space: nowrap;
}

.source-status[data-status="loading"] {
    background: rgba(37, 99, 235, 0.15);
    color: var(--brand);
}

.source-status[data-status="success"] {
    background: rgba(22, 163, 74, 0.16);
    color: #15803d;
}

.source-status[data-status="error"] {
    background: rgba(220, 38, 38, 0.16);
    color: #b91c1c;
}

.latest-results {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.results-header {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.results-header h2 {
    margin: 0;
}

.results-summary {
    margin: 0;
    color: var(--text-secondary);
}

.results-grid {
    display: grid;
    gap: 1.5rem;
}

.results-block {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    background: var(--surface-strong);
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.results-block__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.results-block__header h3 {
    margin: 0;
}

.results-block__count {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    background: rgba(15, 23, 42, 0.05);
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
}

.results-block__list {
    margin: 0;
    padding-left: 1.2rem;
    display: grid;
    gap: 0.75rem;
}

.results-block__list li {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.results-block__list a {
    color: var(--brand);
    font-weight: 600;
    word-break: break-all;
}

.results-block__list a:hover {
    text-decoration: underline;
}

.results-block__meta {
    font-size: 0.85rem;
    color: var(--text-muted);
}

@media (max-width: 900px) {
    .latest-hero {
        padding: 2.5rem;
    }

    .latest-controls,
    .latest-results {
        padding: 2rem;
    }

    .controls-header {
        flex-direction: column;
        align-items: stretch;
    }

    .controls-header > button {
        align-self: flex-start;
    }
}

@media (max-width: 600px) {
    .latest-hero {
        padding: 1.75rem;
    }

    .latest-hero__highlights {
        grid-template-columns: 1fr;
    }

    .latest-controls,
    .latest-results {
        padding: 1.5rem;
    }
}

@media (max-width: 900px) {
    .navigation-hero {
        padding: 2.25rem 1.75rem;
    }

    .navigation-filters {
        justify-content: flex-start;
    }
}

@media (max-width: 600px) {
    .navigation-highlights {
        flex-direction: column;
        align-items: flex-start;
    }

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

/* Portal Game page */
.portal-page {
    padding-top: 3rem;
}

.portal-hero {
    text-align: center;
    background: linear-gradient(145deg, rgba(37, 99, 235, 0.1), rgba(37, 99, 235, 0));
    border: 1px solid rgba(37, 99, 235, 0.18);
    border-radius: var(--radius-lg);
    padding: clamp(2.2rem, 4vw, 3.5rem);
    box-shadow: var(--shadow-soft);
    margin-bottom: 3rem;
}

.portal-hero h1 {
    margin-bottom: 0.8rem;
}

.portal-hero p {
    max-width: 700px;
    margin: 0 auto;
    color: var(--text-secondary);
}

.portal-featured__grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    gap: 1.8rem;
    margin-bottom: 3rem;
}

.portal-featured__secondary {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.4rem;
}

.portal-card {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--surface);
    border: 1px solid rgba(148, 163, 184, 0.35);
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.portal-card__media {
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.portal-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.portal-card__body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.portal-card__badge {
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    color: var(--brand);
    text-transform: uppercase;
    margin: 0;
}

.portal-card__title {
    margin: 0;
    font-size: 1.35rem;
}

.portal-card__link {
    align-self: flex-start;
    padding: 0.55rem 1.25rem;
    border-radius: 999px;
    background: var(--brand);
    color: #fff;
    font-weight: 600;
    font-size: 0.95rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.portal-card__link:hover {
    transform: translateY(-1px);
    box-shadow: 0 15px 35px rgba(37, 99, 235, 0.22);
}

.portal-card:hover .portal-card__media img {
    transform: scale(1.05);
}

.portal-card--primary .portal-card__title {
    font-size: clamp(1.8rem, 4vw, 2.2rem);
}

.portal-card--secondary .portal-card__title,
.portal-card--compact .portal-card__title {
    font-size: 1.1rem;
}

.portal-library__header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.portal-library__header h2 {
    margin: 0;
}

.portal-status {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.portal-library__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.6rem;
}

.portal-card--compact .portal-card__body {
    padding: 1.1rem 1.25rem 1.3rem;
}

.portal-card--compact .portal-card__title {
    font-size: 1rem;
}

.portal-card--compact .portal-card__badge {
    color: var(--text-muted);
}

@media (max-width: 960px) {
    .portal-featured__grid {
        grid-template-columns: 1fr;
    }

    .portal-featured__secondary {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    }
}

@media (max-width: 640px) {
    .portal-library__header {
        flex-direction: column;
        align-items: flex-start;
    }

    .portal-card__body {
        padding: 1.2rem;
    }
}

/* Home board layout */
.home-board {
    padding-top: 3rem;
    padding-bottom: 3.5rem;
}

.board-intro {
    text-align: center;
    margin-bottom: 3rem;
}

.board-intro h1 {
    margin: 0.4rem 0 0.8rem;
    font-size: clamp(2rem, 4vw, 3rem);
}

.board-intro p {
    max-width: 680px;
    margin: 0 auto;
    color: var(--text-secondary);
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.section-header h2 {
    margin: 0;
    font-size: clamp(1.65rem, 3vw, 2.1rem);
}

.section-header p {
    margin: 0.35rem 0 0;
    color: var(--text-secondary);
}

.section-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--brand);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.4rem 0.8rem;
    border-radius: 999px;
    background: var(--brand-soft);
    transition: background 0.2s ease, transform 0.2s ease;
}

.section-link::after {
    content: "→";
    font-size: 1rem;
    transition: transform 0.2s ease;
}

.section-link:hover {
    transform: translateY(-1px);
    background: var(--brand-strong);
}

.section-link:hover::after {
    transform: translateX(4px);
}

.category-panels {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: calc(var(--radius-lg) + 4px);
    padding: 2.4rem 2.6rem;
    margin-bottom: 3rem;
    box-shadow: var(--shadow-soft);
}

.category-panels__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 1rem;
}

.category-card {
    background: var(--surface-strong);
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: var(--radius-md);
    padding: 1rem 1.1rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-height: 96px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.category-card h3 {
    margin: 0;
    font-size: 1.05rem;
}

.category-card__subtitle {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.category-card:hover {
    transform: translateY(-3px);
    border-color: rgba(37, 99, 235, 0.4);
    box-shadow: 0 18px 30px rgba(15, 23, 42, 0.08);
}

.portal-highlight {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(37, 99, 235, 0));
    border: 1px solid rgba(37, 99, 235, 0.2);
    border-radius: calc(var(--radius-lg) + 8px);
    padding: 2.6rem 2.8rem;
    margin-bottom: 3rem;
    box-shadow: 0 30px 60px rgba(37, 99, 235, 0.15);
}

.portal-highlight__body {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    align-items: flex-start;
}

.portal-highlight__summary {
    flex: 1 1 280px;
}

.portal-highlight__title {
    margin: 0 0 0.5rem;
    font-size: 1.4rem;
    font-weight: 700;
}

.portal-highlight__description {
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.65;
}

.promotion-section {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: calc(var(--radius-lg) + 4px);
    padding: 2.4rem 2.6rem;
    margin-bottom: 3rem;
    box-shadow: var(--shadow-soft);
}

.promotion-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.6rem;
}

.promotion-card {
    background: var(--surface-strong);
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: var(--radius-md);
    padding: 1.4rem 1.5rem 1.6rem;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    min-height: 220px;
}

.promotion-card:hover {
    transform: translateY(-4px);
    border-color: rgba(37, 99, 235, 0.4);
    box-shadow: 0 18px 30px rgba(15, 23, 42, 0.08);
}

.promotion-card h3 {
    margin: 0;
    font-size: 1.2rem;
}

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

.promotion-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.promotion-card__tags li {
    background: var(--brand-soft);
    color: var(--brand);
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.6rem;
}

.promotion-card__link {
    margin-top: auto;
    color: var(--brand);
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.promotion-card__link::after {
    content: "↗";
    font-size: 0.9rem;
    transition: transform 0.2s ease;
}

.promotion-card__link:hover::after {
    transform: translateY(-2px);
}

.platform-section {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: calc(var(--radius-lg) + 4px);
    padding: 2.4rem 2.6rem;
    margin-bottom: 3rem;
    box-shadow: var(--shadow-soft);
}

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

.platform-card {
    background: var(--surface-strong);
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: var(--radius-md);
    padding: 1.4rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.platform-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-soft);
    border-color: rgba(37, 99, 235, 0.35);
}

.platform-card h3 {
    margin: 0;
    font-size: 1.1rem;
}

.platform-card p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.platform-card__link {
    margin-top: auto;
    color: var(--brand);
    font-weight: 600;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    word-break: break-all;
}

.platform-card__link::after {
    content: "↗";
    font-size: 0.9rem;
    transition: transform 0.2s ease;
}

.platform-card__link:hover::after {
    transform: translateY(-2px);
}

.tag-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.12);
    color: var(--brand);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: capitalize;
}

.category-section {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: calc(var(--radius-lg) + 2px);
    padding: 2.2rem 2.4rem;
    margin-bottom: 2.5rem;
    box-shadow: var(--shadow-soft);
}

.category-section__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.85rem;
}

.game-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.55rem 0.85rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface-strong);
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
    text-align: center;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.game-chip:hover {
    background: var(--brand-soft);
    color: var(--brand);
    border-color: rgba(37, 99, 235, 0.45);
    transform: translateY(-2px);
}

@media (max-width: 900px) {
    .category-panels {
        padding: 2rem;
    }

    .category-section {
        padding: 2rem;
    }

    .promotion-section {
        padding: 2rem;
    }

    .platform-section {
        padding: 2rem;
    }
}

@media (max-width: 720px) {
    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .category-panels__grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }

    .category-section__grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }

    .portal-highlight {
        padding: 2.2rem 1.9rem;
    }

    .promotion-section {
        padding: 2rem 1.8rem;
    }

    .platform-section {
        padding: 2rem 1.8rem;
    }

    .platform-grid {
        gap: 1.2rem;
    }
}

@media (max-width: 560px) {
    .board-intro {
        margin-bottom: 2.4rem;
    }

    .category-panels {
        padding: 1.6rem;
    }

    .category-section {
        padding: 1.6rem;
    }

    .portal-highlight__body {
        flex-direction: column;
    }

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

    .promotion-card {
        min-height: auto;
    }

    .platform-section {
        padding: 1.6rem;
    }

    .platform-card {
        padding: 1.15rem 1.2rem;
    }
}

/* 图片下载器页面 */
#image-downloader .download-hero {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.download-hero__tips {
    margin: 0;
    padding-left: 1.25rem;
    color: var(--text-secondary);
    display: grid;
    gap: 0.5rem;
}

.download-controls {
    margin-top: 2.5rem;
    background: var(--surface-strong);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.controls-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.controls-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.download-input {
    width: 100%;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    padding: 1rem 1.1rem;
    font-family: var(--font-sans);
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--surface);
    resize: vertical;
    min-height: 220px;
}

.download-input:focus {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
    border-color: var(--brand);
}

.download-status {
    margin: 0;
    color: var(--text-secondary);
}

.download-results {
    margin-top: 2.5rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
}

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

.download-card {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface-strong);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
}

.download-card__image {
    background: #000;
    aspect-ratio: 16 / 9;
    display: flex;
    align-items: center;
    justify-content: center;
}

.download-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.download-card__body {
    padding: 1.1rem 1.25rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.download-card__body h3 {
    margin: 0;
    font-size: 1.05rem;
    line-height: 1.35;
}

.download-card__filename {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
    word-break: break-all;
}

.download-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.download-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.secondary-button {
    border-radius: var(--radius-md);
    border: 1px solid var(--border-strong);
    padding: 0.6rem 1.2rem;
    background: var(--surface);
    color: var(--text-primary);
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.secondary-button:hover,
.secondary-button:focus-visible {
    background: var(--surface-strong);
    border-color: var(--brand);
}

.download-metadata {
    margin-top: 2.5rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.metadata-header {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.metadata-header h2 {
    margin: 0;
}

.metadata-subtitle {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

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

.metadata-column {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.metadata-column__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.metadata-column__header h3 {
    margin: 0;
    font-size: 1rem;
}

.metadata-textarea {
    width: 100%;
    min-height: 220px;
    padding: 0.85rem 1rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: var(--surface-strong);
    color: var(--text-primary);
    font-size: 0.95rem;
    line-height: 1.5;
    resize: vertical;
}

.metadata-textarea:focus {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
    border-color: var(--brand);
}

.secondary-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.download-report {
    margin-top: 2.5rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.report-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.report-header h2 {
    margin: 0;
    font-size: 1.5rem;
    color: var(--text-primary);
}

.report-table-wrapper {
    overflow-x: auto;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-strong);
    background: #fff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.report-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.report-table thead {
    background: var(--surface-strong);
}

.report-table th,
.report-table td {
    padding: 0.85rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.report-table th {
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.report-table tbody tr:last-child td {
    border-bottom: none;
}

.report-name {
    font-weight: 600;
    color: var(--text-primary);
}

.report-file {
    font-family: "Fira Code", "JetBrains Mono", Consolas, "Courier New", monospace;
    font-size: 0.9rem;
    color: var(--text-secondary);
    word-break: break-all;
}

.report-empty td {
    text-align: center;
    color: var(--text-secondary);
    padding: 2.25rem 1rem;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

@media (max-width: 768px) {
    #image-downloader .download-hero,
    .download-controls,
    .download-results,
    .download-report {
        padding: 1.6rem;
    }

    .download-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

@media (max-width: 560px) {
    .download-report {
        padding: 1.25rem;
    }

    .report-table th,
    .report-table td {
        padding: 0.75rem 0.85rem;
    }

    .controls-header {
        flex-direction: column;
        align-items: stretch;
    }

    .controls-actions {
        justify-content: flex-start;
    }
}

/* 游戏推广页样式 */
.promo-page {
    background: linear-gradient(180deg, rgba(37, 99, 235, 0.08), rgba(37, 99, 235, 0));
}

.promo-hero {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2.5rem;
    background: var(--surface);
    border: 1px solid rgba(37, 99, 235, 0.18);
    border-radius: calc(var(--radius-lg) + 12px);
    padding: 3rem;
    margin-bottom: 3rem;
    box-shadow: 0 40px 60px rgba(37, 99, 235, 0.15);
    position: relative;
    overflow: hidden;
}

.promo-hero__content {
    position: relative;
    z-index: 1;
}

.promo-hero__lead {
    color: var(--text-secondary);
    margin-bottom: 1.6rem;
    max-width: 520px;
}

.promo-hero__actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.promo-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    margin: 0;
}

.promo-stats dt {
    font-size: 2rem;
    font-weight: 700;
    color: var(--brand);
}

.promo-stats dd {
    margin: 0;
    color: var(--text-secondary);
}

.promo-hero__visual {
    position: relative;
    min-height: 260px;
}

.promo-hero__planet {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(37, 99, 235, 0.7), rgba(37, 99, 235, 0.2));
    filter: blur(0.3px);
}

.promo-hero__orbit {
    position: absolute;
    inset: 10%;
    border-radius: 50%;
    border: 2px dashed rgba(37, 99, 235, 0.35);
    animation: promo-orbit 16s linear infinite;
}

.promo-hero__note {
    position: absolute;
    width: 70px;
    height: 70px;
    border-radius: 16px;
    background: linear-gradient(135deg, #1d4ed8, #38bdf8);
    top: 20%;
    right: 15%;
    box-shadow: 0 30px 45px rgba(37, 99, 235, 0.35);
    transform: rotate(12deg);
}

@keyframes promo-orbit {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.promo-section {
    margin-bottom: 3.5rem;
}

.promo-section__header {
    text-align: center;
    max-width: 620px;
    margin: 0 auto 2.2rem;
}

.promo-section__header p {
    color: var(--text-secondary);
    margin: 0.75rem 0 0;
}

.promo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.6rem;
}

.promo-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 1.9rem;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-soft);
}

.promo-card h3 {
    margin-top: 0;
    margin-bottom: 0.9rem;
}

.promo-card p {
    margin: 0;
    color: var(--text-secondary);
}

.promo-highlight {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    background: var(--surface-strong);
    border-radius: calc(var(--radius-lg) + 10px);
    padding: 2.8rem;
    margin-bottom: 3.5rem;
    border: 1px solid rgba(37, 99, 235, 0.18);
}

.promo-list {
    padding-left: 1.1rem;
    margin: 1.5rem 0 2rem;
    color: var(--text-secondary);
}

.promo-list li + li {
    margin-top: 0.7rem;
}

.promo-highlight__panel {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 1.8rem;
    border: 1px solid rgba(37, 99, 235, 0.2);
    box-shadow: var(--shadow-soft);
}

.promo-highlight__panel ul {
    list-style: none;
    margin: 1.2rem 0 0;
    padding: 0;
    display: grid;
    gap: 0.9rem;
}

.promo-highlight__panel li span {
    font-weight: 600;
    color: var(--brand);
    margin-right: 0.4rem;
}

.promo-grid--modes {
    gap: 2rem;
}

.promo-card--mode ul {
    margin: 1.1rem 0 0;
    padding-left: 1.2rem;
    color: var(--text-secondary);
    display: grid;
    gap: 0.5rem;
}

.promo-community {
    background: var(--surface);
    border-radius: calc(var(--radius-lg) + 8px);
    padding: 3rem;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-soft);
    margin-bottom: 3.5rem;
}

.promo-community__content {
    max-width: 620px;
    margin-bottom: 2rem;
}

.promo-testimonials {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.6rem;
}

.promo-testimonial {
    background: var(--surface-strong);
    border-radius: var(--radius-md);
    padding: 1.6rem;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-soft);
    margin: 0;
}

.promo-testimonial blockquote {
    margin: 0 0 1rem;
    color: var(--text-secondary);
    font-style: italic;
}

.promo-testimonial figcaption {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.promo-cta {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.12), rgba(37, 99, 235, 0.08));
    border-radius: calc(var(--radius-lg) + 10px);
    padding: 2.8rem;
    border: 1px solid rgba(37, 99, 235, 0.25);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.promo-cta__content {
    max-width: 560px;
}

.promo-cta__content p {
    margin: 0.8rem 0 0;
    color: var(--text-secondary);
}

.promo-cta__actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

@media (max-width: 720px) {
    .promo-hero {
        padding: 2.2rem;
    }

    .promo-community,
    .promo-highlight,
    .promo-cta {
        padding: 2.2rem;
    }
}


/* Marketing page */
.marketing-page {
    background: radial-gradient(circle at top right, rgba(37, 99, 235, 0.08), transparent 45%), var(--background);
}

.marketing-hero {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2.5rem;
    align-items: center;
    background: var(--surface);
    border-radius: calc(var(--radius-lg) + 8px);
    border: 1px solid rgba(148, 163, 184, 0.28);
    padding: clamp(2rem, 4vw, 3rem);
    box-shadow: var(--shadow-soft);
    margin-bottom: 3rem;
}

.marketing-hero__content h1 {
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: clamp(2.1rem, 5vw, 3rem);
}

.marketing-hero__lead {
    color: var(--text-secondary);
    margin-bottom: 1.8rem;
    font-size: 1.05rem;
}

.marketing-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem;
    margin-bottom: 1.8rem;
}

.marketing-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
    font-weight: 600;
}

.marketing-stats dt {
    font-size: 1.8rem;
    color: var(--brand);
    margin-bottom: 0.4rem;
}

.marketing-stats dd {
    margin: 0;
    color: var(--text-secondary);
    font-weight: 500;
}

.marketing-hero__visual {
    position: relative;
    min-height: 260px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.marketing-orbit {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(37, 99, 235, 0.2);
    animation: marketing-orbit 16s linear infinite;
}

.marketing-orbit--outer {
    width: 240px;
    height: 240px;
}

.marketing-orbit--inner {
    width: 160px;
    height: 160px;
    animation-duration: 12s;
}

.marketing-glow {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.55), rgba(37, 99, 235, 0));
    filter: blur(0.5px);
}

@keyframes marketing-orbit {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.marketing-section {
    background: var(--surface);
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: var(--radius-lg);
    padding: clamp(1.8rem, 3.5vw, 2.6rem);
    box-shadow: var(--shadow-soft);
    margin-bottom: 2.8rem;
}

.marketing-section__header {
    margin-bottom: 1.6rem;
}

.marketing-section__header p {
    margin: 0.5rem 0 0;
    color: var(--text-secondary);
}

.marketing-copy {
    display: grid;
    gap: 1.5rem;
}

.marketing-copy__card {
    background: var(--surface-strong);
    border-radius: var(--radius-md);
    border: 1px solid rgba(148, 163, 184, 0.2);
    padding: 1.4rem 1.6rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.marketing-copy__card h3 {
    margin-top: 0;
    margin-bottom: 0.75rem;
}

.marketing-copy__card p {
    margin: 0;
    color: var(--text-secondary);
}

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

.share-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.85rem 1.1rem;
    border-radius: 999px;
    border: 1px solid rgba(37, 99, 235, 0.25);
    background: rgba(37, 99, 235, 0.08);
    color: var(--brand);
    font-weight: 600;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    cursor: pointer;
}

.share-button:hover {
    background: rgba(37, 99, 235, 0.16);
    transform: translateY(-2px);
    box-shadow: 0 18px 32px rgba(37, 99, 235, 0.2);
}

.share-button--copy {
    border-style: dashed;
}

.share-feedback {
    margin-top: 1rem;
    color: var(--text-secondary);
    min-height: 1.2em;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.share-feedback.is-visible {
    opacity: 1;
}

.marketing-value-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.6rem;
}

.marketing-value__item {
    background: var(--surface-strong);
    border-radius: var(--radius-md);
    border: 1px solid rgba(148, 163, 184, 0.22);
    padding: 1.5rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.marketing-value__item h3 {
    margin-top: 0;
    margin-bottom: 0.75rem;
}

.marketing-value__item p {
    margin: 0;
    color: var(--text-secondary);
}

.marketing-checklist {
    list-style: decimal inside;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 1.4rem;
    counter-reset: checklist;
}

.marketing-checklist li {
    background: var(--surface-strong);
    border-radius: var(--radius-md);
    border: 1px solid rgba(148, 163, 184, 0.22);
    padding: 1.4rem 1.6rem;
}

.marketing-checklist h3 {
    margin: 0 0 0.6rem;
}

.marketing-checklist p {
    margin: 0;
    color: var(--text-secondary);
}

.marketing-resources {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.6rem;
}

.marketing-resource {
    background: var(--surface-strong);
    border-radius: var(--radius-md);
    border: 1px solid rgba(148, 163, 184, 0.22);
    padding: 1.6rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.marketing-resource ul {
    margin: 0;
    padding-left: 1.2rem;
    color: var(--text-secondary);
}

.marketing-resource li + li {
    margin-top: 0.4rem;
}

@media (max-width: 720px) {
    .marketing-hero {
        text-align: center;
    }

    .marketing-hero__actions {
        justify-content: center;
    }

    .marketing-stats {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    }

    .share-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
}
