:root {
    --simhub-vh: 100vh;
    --page-bg: linear-gradient(180deg, #d9ecff 0%, #edf5ff 42%, #f7fbff 100%);
    --card-bg: rgba(255, 255, 255, 0.96);
    --card-border: rgba(134, 174, 220, 0.46);
    --text-main: #133054;
    --text-sub: #5b7390;
    --primary: #2f7dff;
    --primary-soft: #eaf3ff;
    --shadow: 0 14px 34px rgba(91, 133, 186, 0.16);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text-main);
    background: var(--page-bg);
    font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

.simhub-page {
    max-width: 420px;
    margin: 0 auto;
    padding: 16px 12px 28px;
}

.simhub-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.simhub-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.simhub-logo {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    object-fit: cover;
    box-shadow: var(--shadow);
}

.simhub-title {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.1;
}

.simhub-subtitle,
.simhub-meta {
    color: var(--text-sub);
    font-size: 12px;
}

.simhub-home-link,
.domain-btn,
.enter-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, #2f7dff, #5aa2ff);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    padding: 10px 16px;
    box-shadow: 0 10px 18px rgba(47, 125, 255, 0.22);
}

.simhub-home-link {
    flex: 0 0 auto;
}

.simhub-main {
    display: grid;
    gap: 14px;
    min-width: 0;
}

.simhub-games {
    display: grid;
    gap: 14px;
}

.simhub-player-page {
    height: var(--simhub-vh);
    overflow: hidden;
    background: #eaf2ff;
}

.card,
.simhub-category-tabs {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 22px;
    box-shadow: var(--shadow);
}

.card {
    padding: 14px;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
}

.simhub-search-card {
    padding: 12px;
}

.simhub-search-box {
    display: flex;
    align-items: center;
    gap: 8px;
}

.simhub-search-input {
    width: 100%;
    min-width: 0;
    height: 42px;
    padding: 0 14px;
    border: 1px solid rgba(122, 167, 224, 0.28);
    border-radius: 14px;
    outline: 0;
    background: #f7fbff;
    color: var(--text-main);
    font-size: 14px;
}

.simhub-search-input:focus {
    border-color: rgba(47, 125, 255, 0.48);
    box-shadow: 0 0 0 3px rgba(47, 125, 255, 0.08);
}

.simhub-search-clear {
    flex: 0 0 auto;
    height: 42px;
    padding: 0 14px;
    border: 0;
    border-radius: 14px;
    background: #eaf3ff;
    color: var(--primary);
    font-size: 13px;
    font-weight: 700;
}

.simhub-search-empty {
    margin-top: 10px;
    color: var(--text-sub);
    font-size: 12px;
    text-align: center;
}

.simhub-notice {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
}

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 28px;
    margin-right: 4px;
    border-radius: 999px;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    background: linear-gradient(135deg, #ff8d54, #ff5c61);
}

.notice-slider {
    position: relative;
    flex: 1 1 auto;
    min-width: 0;
    height: 24px;
    overflow: hidden;
}

.notice-item {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    min-width: 0;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.35s ease, transform 0.35s ease;
    pointer-events: none;
    color: inherit;
    text-decoration: none;
}

.notice-item.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.notice-item-title {
    min-width: 0;
    color: var(--text-main);
    font-size: 12px;
    font-weight: 600;
    line-height: 24px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notice-text {
    display: none;
}

.section-head,
.platform-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}

.section-head h1,
.section-head h2,
.platform-title {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
}

.section-head span,
.platform-subtitle {
    color: var(--text-sub);
    font-size: 12px;
}

.section-more-link {
    color: var(--primary);
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
}

.domain-box {
    display: grid;
    justify-items: center;
    gap: 6px;
    border-radius: 18px;
    background: linear-gradient(135deg, #f4f8ff 0%, #e7f0ff 100%);
    padding: 16px 16px 15px;
    margin-bottom: 10px;
    border: 1px solid rgba(122, 167, 224, 0.26);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.domain-box-link {
    color: inherit;
    text-decoration: none;
}

.domain-box-label {
    color: var(--text-sub);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-align: center;
}

.domain-box-text {
    min-width: 0;
    max-width: 100%;
    font-size: 20px;
    font-weight: 800;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
}

.domain-box-tip {
    color: var(--text-sub);
    font-size: 11px;
    font-weight: 600;
    text-align: center;
}

.domain-nav-title {
    margin-top: 2px;
    color: var(--text-sub);
    font-size: 11px;
    font-weight: 600;
    text-align: center;
}

.domain-nav-panel {
    margin-top: 10px;
    padding: 12px;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(247, 251, 255, 0.96) 0%, rgba(237, 245, 255, 0.96) 100%);
    border: 1px solid rgba(122, 167, 224, 0.22);
}

.domain-nav-panel-title {
    margin-bottom: 10px;
    color: var(--text-sub);
    font-size: 12px;
    font-weight: 700;
    text-align: center;
    letter-spacing: 0.04em;
}

.domain-nav-list {
    display: grid;
    gap: 10px;
}

.domain-nav-link {
    display: grid;
    justify-items: center;
    gap: 6px;
    width: 100%;
    padding: 14px 16px 12px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(122, 167, 224, 0.2);
    box-shadow: 0 8px 18px rgba(91, 133, 186, 0.08);
    color: inherit;
    text-decoration: none;
}

.domain-nav-link-label {
    color: var(--text-sub);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-align: center;
}

.domain-nav-link-marquee {
    position: relative;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    white-space: nowrap;
    text-align: center;
}

.domain-nav-link-title {
    display: inline-block;
    min-width: 100%;
    padding-left: 100%;
    font-size: 17px;
    font-weight: 800;
    line-height: 1.3;
    text-align: center;
    background: linear-gradient(90deg, #ff7a18, #ff006e, #6e7bff, #11c5ff, #ff7a18);
    background-size: 240% auto;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: simhub-nav-marquee 9s linear infinite, simhub-marquee-color 5s linear infinite;
}

.domain-nav-link-tip {
    color: var(--text-sub);
    font-size: 11px;
    font-weight: 600;
    text-align: center;
}

@keyframes simhub-nav-marquee {
    0% {
        transform: translate3d(0, 0, 0);
    }
    100% {
        transform: translate3d(-100%, 0, 0);
    }
}

.domain-nav-item-wrap {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
}

.domain-nav-item-content {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
}

.domain-nav-item-content img {
    width: 14px;
    height: 14px;
    border-radius: 4px;
    object-fit: cover;
}

.domain-nav-name {
    color: var(--text-main);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
}

.domain-nav-sep {
    color: var(--primary);
    font-size: 12px;
    font-weight: 700;
}

.domain-nav-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.domain-nav-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(129, 176, 231, 0.22);
    color: var(--primary);
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
}

.domain-card {
    padding: 6px 2px 0;
}

.domain-label {
    margin-bottom: 8px;
    color: var(--text-sub);
    font-size: 12px;
    font-weight: 600;
}

.domain-actions {
    display: flex;
    align-items: center;
    justify-content: center;
}

.domain-copy-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    padding: 0 18px;
    border: 0;
    border-radius: 999px;
    background: #eaf3ff;
    color: var(--primary);
    font-size: 13px;
    font-weight: 700;
}

.featured-grid,
.game-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.featured-item,
.game-card {
    display: block;
    cursor: pointer;
}

.featured-item img,
.game-thumb img {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 16px;
    background: linear-gradient(180deg, #f4f8ff, #dde9fb);
}

.simhub-seq-image {
    opacity: 0.35;
    transition: opacity 0.24s ease;
}

.simhub-seq-image.is-loaded {
    opacity: 1;
}

.featured-item span,
.game-name {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.25;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.simhub-featured {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.featured-platform-outer {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
    box-sizing: border-box;
}

.featured-platform-wrap {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin: 0 0 12px;
    padding-bottom: 4px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.featured-platform-slider.platform-tabs {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    padding: 2px;
    width: max-content;
    min-width: 100%;
    max-width: none;
    white-space: nowrap;
    scroll-snap-type: x proximity;
    box-sizing: border-box;
}

.featured-platform-slider.platform-tabs .platform-tab {
    flex: 0 0 auto;
    padding: 8px 12px;
    font-size: 12px;
    scroll-snap-align: start;
}

.featured-panel {
    display: none;
}

.featured-panel.active {
    display: block;
}

.simhub-category-tabs {
    display: flex;
    gap: 8px;
    padding: 8px;
    overflow-x: auto;
    scrollbar-width: none;
}

.simhub-category-tabs::-webkit-scrollbar,
.platform-tabs::-webkit-scrollbar {
    display: none;
}

.category-tab,
.platform-tab {
    flex: 0 0 auto;
    border: 0;
    border-radius: 999px;
    background: #eef4fb;
    color: var(--text-sub);
    font-size: 13px;
    font-weight: 700;
    padding: 9px 14px;
}

.category-tab.active,
.platform-tab.active {
    color: #fff;
    background: linear-gradient(135deg, #2f7dff, #63a8ff);
}

.category-panel,
.platform-panel {
    display: none;
}

.category-panel.active,
.platform-panel.active {
    display: block;
}

.platform-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin-bottom: 12px;
    overflow: hidden;
}

.platform-tab {
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.platform-title-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}

.platform-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    object-fit: cover;
    background: #edf4ff;
}

.platform-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 700;
    color: var(--primary);
}

.game-thumb {
    position: relative;
    overflow: hidden;
    border-radius: 18px;
    background: #edf4ff;
    padding: 3px;
}

.game-name {
    margin-top: -24px;
    position: relative;
    z-index: 1;
    color: #fff;
    padding: 0 6px 8px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.38);
}

.game-thumb::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 40%;
    background: linear-gradient(180deg, rgba(12, 26, 44, 0) 0%, rgba(12, 26, 44, 0.74) 100%);
}

.empty {
    color: var(--text-sub);
    font-size: 14px;
    text-align: center;
    padding: 22px 10px;
}

.domain-link {
    color: var(--primary);
    font-size: 13px;
    font-weight: 700;
}

.simhub-player-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 58px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid rgba(134, 174, 220, 0.35);
}

.simhub-player-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    min-width: 88px;
    height: 38px;
    padding: 0 14px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, #2f7dff, #5aa2ff);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
}

.simhub-player-btn.home {
    text-decoration: none;
}

.simhub-player-title {
    display: block;
    font-size: 14px;
    font-weight: 800;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-decoration: none;
    background: linear-gradient(90deg, #ff7a18, #ff006e, #6e7bff, #11c5ff, #ff7a18);
    background-size: 240% auto;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: simhub-marquee-color 5s linear infinite;
}

.simhub-player-title-wrap {
    flex: 1 1 auto;
    min-width: 0;
    display: grid;
    gap: 2px;
}

.simhub-player-subtitle {
    color: var(--text-sub);
    font-size: 11px;
    line-height: 1.2;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.simhub-player-frame {
    display: block;
    width: 100%;
    height: calc(var(--simhub-vh) - 58px);
    border: 0;
    background: #fff;
    -webkit-overflow-scrolling: touch;
}

@keyframes simhub-marquee-color {
    0% {
        background-position: 0% center;
    }
    100% {
        background-position: 240% center;
    }
}

@media (min-width: 768px) {
    .simhub-page {
        max-width: 900px;
        padding: 24px 18px 40px;
    }

    .simhub-main {
        gap: 18px;
    }

    .featured-grid,
    .game-grid {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }

    .simhub-player-bar {
        padding: 10px 18px;
    }
}
