* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --color-bg: #F6F8FA;
    --color-surface: #FFFFFF;
    --color-surface-soft: #EEF3F6;
    --color-border: #D9E1E7;
    --color-text: #18212B;
    --color-text-dim: #64717D;
    --color-accent-cool: #10A9C2;
    --color-accent-warm: #E7682D;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;
}

body {
    font-family: var(--font-sans);
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    min-height: 100vh;
}

/* 导航栏 */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--color-border);
    box-shadow: 0 1px 8px rgba(24, 33, 43, 0.06);
    z-index: 1000;
}

.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.nav-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 700;
    color: var(--color-text);
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
}

.nav-brand-icon {
    width: 30px;
    height: 30px;
    object-fit: contain;
}

.nav-tabs {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.nav-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    padding: 0 16px;
    background: transparent;
    border: none;
    color: var(--color-text-dim);
    font-size: 16px;
    font-weight: 500;
    line-height: 1;
    cursor: pointer;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
    font-family: var(--font-sans);
    text-decoration: none;
}

.nav-tab:hover {
    background: var(--color-surface);
    color: var(--color-text);
}

.nav-tab.active {
    background: var(--color-surface);
    color: var(--color-accent-cool);
}

.nav-tab-icon {
    width: 40px;
    height: 40px;
    padding: 0;
}

.nav-icon {
    width: 1em;
    height: 1em;
    display: block;
}

/* 页面容器 */
.page {
    display: none;
    min-height: 100vh;
    padding-top: 64px;
}

.page.active {
    display: block;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* 首页 Hero */
.hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
    min-height: calc(100vh - 64px);
    padding: 40px 0;
}

.hero-subtitle {
    font-size: 20px;
    color: var(--color-text-dim);
    margin-bottom: 16px;
    font-weight: 500;
}

.hero-description {
    max-width: 580px;
    margin-bottom: 40px;
    color: var(--color-text-dim);
    font-size: 16px;
    line-height: 1.8;
}

.hero-stats {
    display: flex;
    gap: 48px;
    margin-bottom: 40px;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--color-accent-cool);
    line-height: 1;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 14px;
    color: var(--color-text-dim);
    text-transform: uppercase;
    letter-spacing: 0;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 32px;
    background: var(--color-accent-cool);
    color: var(--color-bg);
    border: none;
    border-radius: var(--radius-md);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: var(--font-sans);
    text-decoration: none;
}

.cta-button:hover {
    background: var(--color-accent-warm);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(16, 169, 194, 0.22);
}

.hero-visual {
    position: relative;
}

.app-preview {
    position: relative;
}

.preview-window {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(24, 33, 43, 0.12);
}

.window-header {
    background: var(--color-surface-soft);
    padding: 12px 16px;
    border-bottom: 1px solid var(--color-border);
}

.window-controls {
    display: flex;
    gap: 8px;
}

.window-controls span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--color-border);
}

.window-content {
    padding: 24px;
    background: #F9FBFC;
    min-height: 300px;
}

.preview-grid {
    display: grid;
    gap: 12px;
}

.preview-item {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s ease;
    color: inherit;
    text-decoration: none;
}

.preview-item:hover {
    border-color: var(--color-accent-cool);
    transform: translateX(4px);
}

.preview-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    color: var(--color-text);
    flex-shrink: 0;
    overflow: hidden;
}

.preview-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.preview-info {
    flex: 1;
    min-width: 0;
}

.preview-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 4px;
}

.preview-desc {
    font-size: 12px;
    color: var(--color-text-dim);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.preview-badge {
    padding: 4px 8px;
    background: rgba(16, 169, 194, 0.08);
    color: var(--color-accent-cool);
    border-radius: 8px;
    font-size: 11px;
    font-weight: 500;
    border: 1px solid rgba(16, 169, 194, 0.22);
    flex-shrink: 0;
}

/* 应用列表 */
.apps-section {
    padding: 80px 0;
    min-height: calc(100vh - 64px);
}

.section-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 48px;
    letter-spacing: 0;
}

.apps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

.app-card {
    display: block;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 32px;
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    width: 100%;
    color: inherit;
    text-align: left;
    font: inherit;
    text-decoration: none;
}

.app-card.disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.app-card:focus-visible,
.preview-item:focus-visible,
.nav-tab:focus-visible,
.cta-button:focus-visible,
.action-button:focus-visible,
.back-button:focus-visible {
    outline: 3px solid var(--color-accent-warm);
    outline-offset: 3px;
}

.app-card.disabled:hover {
    transform: none;
    box-shadow: none;
    border-color: var(--color-border);
}

.app-card.disabled::before {
    display: none;
}

.app-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--color-accent-cool), var(--color-accent-warm));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.app-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(24, 33, 43, 0.12);
    border-color: var(--color-accent-cool);
}

.app-card:hover::before {
    transform: scaleX(1);
}

.app-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.app-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
    color: var(--color-text);
    overflow: hidden;
}

.app-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.app-title {
    display: block;
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 8px;
}

.app-description {
    display: block;
    color: var(--color-text-dim);
    margin-bottom: 24px;
    line-height: 1.6;
}

.app-meta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.app-tag {
    padding: 4px 12px;
    background: rgba(16, 169, 194, 0.08);
    color: var(--color-accent-cool);
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    border: 1px solid rgba(16, 169, 194, 0.22);
}

.app-status {
    padding: 4px 12px;
    background: rgba(231, 104, 45, 0.08);
    color: var(--color-accent-warm);
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    border: 1px solid rgba(231, 104, 45, 0.22);
    display: flex;
    align-items: center;
    gap: 6px;
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--color-accent-warm);
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* 应用详情页 */
.detail-section {
    padding: 80px 0;
    min-height: calc(100vh - 64px);
}

.detail-header {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 48px;
}

.detail-icon {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-lg);
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    font-weight: 700;
    color: var(--color-text);
    overflow: hidden;
    flex-shrink: 0;
}

.detail-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.detail-info h1 {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 12px;
}

.detail-info {
    min-width: 0;
}

.detail-info p {
    font-size: 18px;
    color: var(--color-text-dim);
    overflow-wrap: anywhere;
}

.detail-actions {
    display: flex;
    gap: 16px;
    margin-bottom: 48px;
}

.platform-downloads {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.platform-download {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    min-width: 0;
    padding: 24px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
}

.platform-download-info {
    min-width: 0;
}

.platform-download h2 {
    margin-bottom: 4px;
    font-size: 20px;
    line-height: 1.3;
}

.platform-download p {
    margin-bottom: 12px;
    color: var(--color-text-dim);
    font-size: 14px;
}

.platform-asset-name {
    display: block;
    color: var(--color-text-dim);
    font-family: Consolas, 'Courier New', monospace;
    font-size: 12px;
    overflow-wrap: anywhere;
}

.platform-download .action-button {
    flex-shrink: 0;
    justify-content: center;
}

.action-button {
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-sans);
    border: none;
}

.action-button.primary {
    background: var(--color-accent-cool);
    color: var(--color-bg);
}

.action-button.primary:hover {
    background: var(--color-accent-warm);
    transform: translateY(-2px);
}

.action-button:disabled {
    cursor: not-allowed;
    opacity: 0.55;
    transform: none;
}

.action-button.secondary {
    background: var(--color-surface);
    color: var(--color-text);
    border: 1px solid var(--color-border);
}

.action-button.secondary:hover {
    border-color: var(--color-accent-cool);
    color: var(--color-accent-cool);
}

.detail-content {
    display: grid;
    gap: 32px;
}

.detail-block {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 32px;
    min-width: 0;
}

.detail-block h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 16px;
}

.detail-block p,
.detail-block ul,
.detail-block ol {
    color: var(--color-text-dim);
    line-height: 1.8;
}

.detail-block a {
    color: var(--color-accent-cool);
    overflow-wrap: anywhere;
}

.detail-loading {
    padding: 80px 0;
    color: var(--color-text-dim);
    text-align: center;
}

.detail-updated {
    font-size: 12px;
}

.release-body {
    overflow-wrap: anywhere;
}

.release-body h5 {
    margin: 20px 0 8px;
    color: var(--color-text);
    font-size: 15px;
}

.release-body h5:first-child {
    margin-top: 0;
}

.release-body p,
.detail-block .release-body ul,
.detail-block .release-body ol {
    margin-bottom: 12px;
}

.release-body ul,
.release-body ol {
    padding-left: 24px;
}

.detail-block .release-body ul {
    list-style: disc;
}

.detail-block .release-body ol {
    list-style: decimal;
}

.detail-block .release-body li {
    padding: 4px 0;
}

.detail-block .release-body li::before {
    content: none;
}

.release-body code {
    font-family: Consolas, 'Courier New', monospace;
    font-size: 0.9em;
}

.release-body pre {
    max-width: 100%;
    padding: 12px;
    overflow-x: auto;
    background: var(--color-surface-soft);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    color: var(--color-text-dim);
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.release-list {
    display: grid;
}

.release-entry {
    padding: 28px 0;
    border-top: 1px solid var(--color-border);
}

.release-entry:first-child {
    padding-top: 0;
    border-top: 0;
}

.release-entry:last-child {
    padding-bottom: 0;
}

.release-entry-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    position: relative;
    padding-right: 32px;
    cursor: pointer;
    list-style: none;
}

.release-entry-header::-webkit-details-marker {
    display: none;
}

.release-entry-header::after {
    content: '+';
    position: absolute;
    top: 0;
    right: 0;
    color: var(--color-accent-cool);
    font-size: 22px;
    line-height: 1;
}

.release-entry[open] .release-entry-header {
    margin-bottom: 20px;
}

.release-entry[open] .release-entry-header::after {
    content: '-';
}

.release-entry-header > div {
    min-width: 0;
}

.release-title {
    display: block;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 6px;
}

.release-entry time,
.release-tag {
    color: var(--color-text-dim);
    font-size: 12px;
}

.release-entry time {
    flex-shrink: 0;
}

.release-badge {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 6px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    color: var(--color-text-dim);
    font-size: 11px;
}

.release-badge.latest {
    border-color: rgba(16, 169, 194, 0.35);
    color: var(--color-accent-cool);
}

.detail-error {
    padding: 80px 24px;
    text-align: center;
}

.detail-error h2,
.detail-error p {
    margin-bottom: 16px;
}

.detail-error p {
    color: var(--color-text-dim);
}

.detail-error .action-button {
    margin: 4px;
}

.detail-block ul {
    list-style: none;
    padding-left: 0;
}

.detail-block li {
    padding: 8px 0;
    padding-left: 24px;
    position: relative;
}

.detail-block li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--color-accent-cool);
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.info-item {
    padding: 16px;
    background: var(--color-surface-soft);
    border-radius: var(--radius-md);
}

.info-label {
    font-size: 12px;
    color: var(--color-text-dim);
    text-transform: uppercase;
    letter-spacing: 0;
    margin-bottom: 8px;
}

.info-value {
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text);
}

.back-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: transparent;
    border: 1px solid var(--color-border);
    color: var(--color-text);
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 32px;
    font-family: var(--font-sans);
    text-decoration: none;
}

.back-button:hover {
    border-color: var(--color-accent-cool);
    color: var(--color-accent-cool);
}

@media (max-width: 968px) {
    .hero {
        grid-template-columns: 1fr;
        gap: 48px;
        min-height: auto;
    }

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

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

    .detail-header {
        align-items: flex-start;
    }

    .detail-info h1 {
        font-size: 36px;
    }

    .detail-block {
        padding: 24px;
    }

    .platform-downloads {
        grid-template-columns: 1fr;
    }

    .detail-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .action-button {
        justify-content: center;
        text-align: center;
    }

    .release-entry-header {
        flex-direction: column;
        gap: 8px;
    }
}

@media (max-width: 560px) {
    .nav-container {
        height: 60px;
        padding: 0 16px;
    }

    .nav-brand {
        gap: 6px;
        font-size: 15px;
    }

    .nav-brand-icon {
        width: 26px;
        height: 26px;
    }

    .nav-tabs {
        gap: 2px;
    }

    .nav-tab {
        height: 34px;
        padding: 0 9px;
        font-size: 13px;
    }

    .nav-tab-icon {
        width: 34px;
        height: 34px;
        padding: 0;
    }

    .page {
        padding-top: 60px;
    }

    .container {
        padding: 0 18px;
    }

    .detail-header {
        flex-direction: column;
    }

    .platform-download {
        align-items: stretch;
        flex-direction: column;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
