:root {
    --bg: #f4f6fb;
    --panel: #ffffff;
    --text: #1f2737;
    --muted: #7d879a;
    --primary: #111111;
    --accent: #f97316;
    --line: #e8ebf2;
}

* {
    box-sizing: border-box;
}

.hidden {
    display: none !important;
}

body {
    margin: 0;
    background: linear-gradient(180deg, #f8faff 0%, var(--bg) 35%, #eef2f9 100%);
    color: var(--text);
    font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
}

.app-shell {
    max-width: 420px;
    min-height: 100vh;
    margin: 0 auto;
    background: var(--bg);
    padding-bottom: 74px;
}

.top-panel {
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(6px);
    border-bottom: 1px solid var(--line);
    padding: 10px 12px 8px;
}

.top-panel.hidden {
    display: none;
}

.search-row input {
    width: 100%;
    border: 1px solid #d8dde8;
    border-radius: 999px;
    padding: 10px 14px;
    font-size: 14px;
    outline: none;
    background: #fff;
}

.channel-row {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    white-space: nowrap;
    padding: 10px 0 6px;
}

.channel-row button {
    border: 0;
    background: none;
    padding: 0;
    color: #4f5768;
    font-size: 15px;
    font-weight: 500;
}

.channel-row button.active {
    color: #111;
    font-weight: 700;
}

.filter-row {
    display: flex;
    gap: 12px;
    border-top: 1px solid var(--line);
    padding-top: 8px;
}

.filter-row button {
    border: 0;
    background: none;
    color: #40495c;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    padding: 0;
}

.dot {
    width: 13px;
    height: 13px;
    border-radius: 4px;
    background: linear-gradient(135deg, #ff9839, #ff5f4a);
}

.page-container {
    padding: 10px;
}

.page {
    display: none;
}

.page.active {
    display: block;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.home-status {
    font-size: 13px;
    color: var(--muted);
    padding: 10px 2px 8px;
}

.home-status.error {
    color: #d14343;
}

.home-status.hidden {
    display: none;
}

.logo-reserve-panel {
    position: fixed;
    left: 50%;
    bottom: calc(66px + env(safe-area-inset-bottom));
    transform: translate(-50%, 16px);
    width: min(404px, calc(100% - 16px));
    max-height: 60vh;
    background: linear-gradient(180deg, #ffffff 0%, #f6f8ff 100%);
    border: 1px solid #dfe5f2;
    border-radius: 16px;
    box-shadow: 0 18px 36px rgba(26, 45, 82, 0.24);
    padding: 10px;
    opacity: 0;
    pointer-events: none;
    transition: transform 0.24s ease, opacity 0.24s ease;
    z-index: 30;
}

.logo-reserve-panel.open {
    transform: translate(-50%, 0);
    opacity: 1;
    pointer-events: auto;
}

.logo-reserve-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}

.logo-reserve-head h3 {
    margin: 0;
    font-size: 15px;
    color: #111827;
}

.logo-reserve-head button {
    border: 1px solid #d7dff0;
    border-radius: 999px;
    background: #fff;
    color: #42506a;
    font-size: 12px;
    padding: 4px 10px;
}

.logo-reserve-status {
    font-size: 12px;
    color: #67748f;
    margin-bottom: 8px;
}

.logo-reserve-status.error {
    color: #d14343;
}

.logo-reserve-cards {
    display: grid;
    gap: 8px;
    max-height: calc(60vh - 70px);
    overflow-y: auto;
    padding-right: 2px;
}

.logo-reserve-card {
    border: 1px solid #e3e8f4;
    border-radius: 12px;
    background: #fff;
    padding: 8px;
    display: grid;
    grid-template-columns: 56px 1fr auto;
    gap: 8px;
    align-items: center;
}

.logo-reserve-card img {
    width: 56px;
    height: 76px;
    border-radius: 8px;
    object-fit: cover;
    background: #dfe4ee;
}

.logo-reserve-meta h4 {
    margin: 0 0 3px;
    font-size: 13px;
    line-height: 1.35;
    color: #111827;
}

.logo-reserve-meta p {
    margin: 0;
    font-size: 11px;
    line-height: 1.45;
    color: #53607a;
}

.logo-reserve-risk {
    display: inline-block;
    margin-top: 4px;
    padding: 2px 7px;
    border-radius: 999px;
    font-size: 11px;
    background: #fff4e6;
    color: #d97706;
}

.logo-reserve-risk.low {
    background: #ecfdf3;
    color: #059669;
}

.logo-reserve-risk.high {
    background: #fee2e2;
    color: #dc2626;
}

.logo-reserve-enter {
    border: 0;
    border-radius: 8px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #fff;
    font-size: 12px;
    padding: 8px 9px;
    text-decoration: none;
    white-space: nowrap;
}

.video-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 14px rgba(10, 24, 46, 0.08);
}

.video-card-link {
    color: inherit;
    text-decoration: none;
    display: block;
}

.video-card img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    display: block;
    background: #dfe4ee;
}

.video-card h3 {
    margin: 7px 7px 2px;
    font-size: 12px;
    line-height: 1.3;
    height: 31px;
    overflow: hidden;
}

.video-card p {
    margin: 0 7px 8px;
    color: #f97316;
    font-size: 11px;
}

.section-title {
    font-size: 20px;
    font-weight: 700;
    margin: 6px 2px 12px;
}

.list-panel,
.earn-cards,
.mine-list,
.profile-card {
    background: var(--panel);
    border-radius: 12px;
    box-shadow: 0 4px 14px rgba(10, 24, 46, 0.08);
}

.list-item {
    display: flex;
    justify-content: space-between;
    padding: 14px;
    border-bottom: 1px solid var(--line);
    font-size: 14px;
}

.list-item:last-child {
    border-bottom: 0;
}

.list-item em {
    font-style: normal;
    color: var(--muted);
}

.earn-cards {
    padding: 12px;
    display: grid;
    gap: 10px;
}

.earn-cards article {
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 10px 12px;
    background: linear-gradient(135deg, #fff 0%, #fff5e7 100%);
}

.earn-cards h3 {
    margin: 0 0 6px;
    font-size: 15px;
}

.earn-cards p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

.wallet-panel {
    margin-top: 12px;
    background: linear-gradient(160deg, #ffffff 0%, #eef5ff 100%);
    border-radius: 16px;
    padding: 14px;
    box-shadow: 0 6px 18px rgba(10, 24, 46, 0.09);
    border: 1px solid rgba(130, 160, 210, 0.16);
}

.wallet-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}

.wallet-top h3 {
    margin: 0 0 4px;
    font-size: 16px;
}

.wallet-top p {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.5;
}

.wallet-top strong {
    font-size: 13px;
    color: #1d4ed8;
    white-space: nowrap;
}

.wallet-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.wallet-btn {
    border: 1px solid #c8d6f5;
    border-radius: 12px;
    padding: 12px 0;
    background: #fff;
    color: #1f2937;
    font-size: 15px;
    font-weight: 700;
}

.wallet-btn.primary {
    color: #fff;
    border-color: transparent;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
}

.profile-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
}

.profile-info {
    width: 100%;
    text-align: left;
}

.mine-name-row {
    margin: 0 0 6px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 22px;
    line-height: 1.1;
    font-weight: 700;
}

.mine-vip-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 24px;
    padding: 0 10px;
    border-radius: 999px;
    border: 1px solid rgba(255, 219, 165, 0.35);
    background: linear-gradient(135deg, rgba(236, 180, 95, 0.25), rgba(195, 124, 42, 0.2));
    color: #f7deb0;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.mine-name-label {
    font-size: 22px;
    color: #b8a58d;
    font-weight: 600;
}

#mineUserName {
    color: #d7a867;
    letter-spacing: 0.2px;
}

.profile-info p {
    margin: 0;
}

.avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(140deg, #1f2937, #374151);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
}

.mine-list {
    margin: 10px 0 0;
    padding: 0;
    list-style: none;
}

.mine-asset-card {
    margin-top: 10px;
    border-radius: 12px;
    padding: 12px;
    border: 1px solid rgba(212, 161, 93, 0.45);
    background:
        radial-gradient(circle at 70% -40%, rgba(255, 255, 255, 0.35), transparent 55%),
        linear-gradient(135deg, #f1d29b 0%, #e5bc7f 45%, #d9a965 100%);
    color: #5a3a17;
}

.mine-asset-title {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 8px;
}

.mine-asset-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.mine-asset-item {
    border: 1px solid rgba(126, 82, 39, 0.22);
    border-radius: 10px;
    background: rgba(255, 244, 225, 0.5);
    padding: 8px;
}

.mine-asset-item .label {
    display: block;
    font-size: 11px;
    color: rgba(90, 58, 23, 0.82);
    margin-bottom: 3px;
}

.mine-asset-item .value {
    display: block;
    font-size: clamp(12px, 3.2vw, 14px);
    font-weight: 700;
    color: #5a3a17;
    line-height: 1.2;
    word-break: break-all;
}

.mine-vip-card {
    margin-top: 10px;
    border-radius: 12px;
    padding: 12px;
    border: 1px solid rgba(212, 161, 93, 0.45);
    background:
        radial-gradient(circle at 70% -40%, rgba(255, 255, 255, 0.35), transparent 55%),
        linear-gradient(135deg, #f1d29b 0%, #e5bc7f 45%, #d9a965 100%);
    color: #5a3a17;
}

.mine-vip-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.mine-vip-head h3 {
    margin: 0;
    font-size: 26rpx;
    font-weight: 700;
}

.mine-vip-head p {
    margin: 4px 0 0;
    font-size: 12px;
    color: rgba(90, 58, 23, 0.82);
}

.mine-vip-join {
    border: 0;
    height: 30px;
    min-width: 62px;
    padding: 0 14px;
    border-radius: 999px;
    background: linear-gradient(135deg, #6f4a2a, #4f331d);
    color: #fff3db;
    font-size: 13px;
    font-weight: 700;
}

.mine-vip-features {
    margin-top: 10px;
    border-top: 1px solid rgba(126, 82, 39, 0.2);
    padding-top: 8px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    font-size: 12px;
    color: rgba(90, 58, 23, 0.92);
}

.mine-vip-features span {
    white-space: nowrap;
}

.mine-list li {
    padding: 14px;
    border-bottom: 1px solid var(--line);
    font-size: 14px;
}

.mine-list li#mineShelfBtn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    cursor: pointer;
}

.push-stream-control {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 86px;
    justify-content: flex-end;
    cursor: pointer;
    user-select: none;
}

.push-stream-text {
    font-size: 13px;
    color: rgba(255, 235, 200, 0.86);
    white-space: nowrap;
}

.push-stream-control input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.push-stream-slider {
    position: relative;
    width: 42px;
    height: 22px;
    flex: 0 0 42px;
    border-radius: 999px;
    border: 1px solid rgba(255, 219, 165, 0.28);
    background: rgba(255, 255, 255, 0.12);
    transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.push-stream-slider::after {
    content: '';
    position: absolute;
    left: 2px;
    top: 2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.28);
    transition: transform 0.2s ease;
}

.push-stream-control input:checked + .push-stream-slider {
    border-color: rgba(255, 63, 123, 0.76);
    background: linear-gradient(135deg, #ff5a92, #ff2d78);
    box-shadow: 0 0 14px rgba(255, 45, 120, 0.28);
}

.push-stream-control input:checked + .push-stream-slider::after {
    transform: translateX(20px);
}

.mine-list li.hidden {
    display: none;
}

.mine-list li#mineLoginBtn,
.mine-list li#mineLogoutBtn,
.mine-list li#mineInvestBtn,
.mine-list li#mineAuthBtn {
    cursor: pointer;
}

#mineAuthBtn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.mine-auth-status {
    margin-left: auto;
    font-size: 12px;
    color: rgba(255, 235, 200, 0.82);
    white-space: nowrap;
}

.mine-auth-claim-btn {
    border: 1px solid rgba(255, 219, 165, 0.35);
    background: linear-gradient(135deg, #6f4a2a, #4f331d);
    color: #fff3db;
    border-radius: 999px;
    padding: 4px 12px;
    min-width: 96px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.mine-auth-claim-btn:active {
    opacity: 0.85;
}

.mine-auth-claim-btn[disabled],
.mine-auth-claim-btn.claimed {
    opacity: 0.7;
    cursor: not-allowed;
}

.mine-list li#mineLoginBtn {
    color: #1d4ed8;
    font-weight: 600;
}

.mine-list li#mineLogoutBtn {
    color: #ef4444;
}

.mine-list li:last-child {
    border-bottom: 0;
}

.bottom-nav {
    position: fixed;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: min(420px, 100%);
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    background:
        radial-gradient(circle at 50% -120%, rgba(255, 212, 142, 0.2), transparent 55%),
        linear-gradient(180deg, #141414 0%, #090909 100%);
    border-top: 1px solid rgba(255, 219, 165, 0.22);
    box-shadow: 0 -10px 24px rgba(0, 0, 0, 0.34);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
    z-index: 20;
    overflow: visible;
}

.bottom-nav::before {
    content: '';
    position: absolute;
    left: 10px;
    right: 10px;
    top: 0;
    height: 1px;
    background: linear-gradient(90deg, rgba(255, 219, 165, 0), rgba(255, 219, 165, 0.45), rgba(255, 219, 165, 0));
    pointer-events: none;
}

.bottom-logo {
    position: absolute;
    left: 50%;
    top: -10px;
    transform: translateX(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background:
        radial-gradient(circle at 30% 25%, rgba(255, 238, 206, 0.32), transparent 45%),
        linear-gradient(145deg, #2d2519 0%, #15100a 100%);
    border: 1px solid rgba(232, 187, 113, 0.5);
    box-shadow: 0 9px 18px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 216, 153, 0.14) inset;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
    cursor: pointer;
    padding: 0;
    border: 0;
    z-index: 3;
}

.bottom-logo:active {
    transform: translateX(-50%) scale(0.96);
}

.bottom-logo img {
    width: 22px;
    height: 22px;
    display: block;
    filter: sepia(1) saturate(1.7) hue-rotate(352deg) brightness(1.08);
}

.bottom-nav button {
    border: 0;
    background: none;
    color: #96876f;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    font-size: 12px;
    padding: 4px 0;
}

.bottom-nav button[data-target="theater"] {
    transform: translateX(-10px);
}

.bottom-nav button[data-target="earn"] {
    transform: translateX(10px);
}

.bottom-nav .nav-icon {
    width: 21px;
    height: 21px;
    display: block;
    transition: transform 0.22s ease, filter 0.22s ease, opacity 0.22s ease;
    opacity: 0.86;
    filter: grayscale(1) brightness(0.62) contrast(1.05);
}

.bottom-nav button.active {
    color: #f7deb0;
    font-weight: 700;
}

.bottom-nav button.active .nav-icon {
    transform: translateY(-1px) scale(1.06);
    filter: sepia(1) saturate(2.2) hue-rotate(350deg) brightness(1.02) drop-shadow(0 2px 6px rgba(255, 190, 104, 0.35));
    opacity: 1;
}

.app-shell.earn-theme,
.app-shell.mine-theme {
    background:
        radial-gradient(circle at top, rgba(255, 194, 105, 0.1), transparent 30%),
        linear-gradient(180deg, #111111 0%, #080808 40%, #050505 100%);
}

.app-shell.earn-theme .page-container,
.app-shell.mine-theme .page-container {
    background: transparent;
}

.app-shell.earn-theme .bottom-nav,
.app-shell.mine-theme .bottom-nav {
    background:
        radial-gradient(circle at 50% -120%, rgba(255, 212, 142, 0.2), transparent 55%),
        linear-gradient(180deg, #141414 0%, #090909 100%);
    border-top: 1px solid rgba(255, 219, 165, 0.22);
    box-shadow: 0 -10px 24px rgba(0, 0, 0, 0.34);
}

.app-shell.earn-theme .bottom-nav button,
.app-shell.mine-theme .bottom-nav button {
    color: #8f836f;
}

.app-shell.earn-theme .bottom-nav button.active,
.app-shell.mine-theme .bottom-nav button.active {
    color: #f7deb0;
}

.app-shell.earn-theme .bottom-nav button.active .nav-icon,
.app-shell.mine-theme .bottom-nav button.active .nav-icon {
    filter: drop-shadow(0 2px 6px rgba(255, 132, 176, 0.25));
}

.app-shell.mine-theme .page[data-page="mine"] {
    border-radius: 18px;
    border: 1px solid rgba(255, 219, 165, 0.18);
    background:
        radial-gradient(circle at top, rgba(255, 194, 105, 0.1), transparent 28%),
        linear-gradient(180deg, rgba(37, 37, 37, 0.96) 0%, rgba(12, 12, 12, 0.98) 100%);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
    padding: 12px;
}

.app-shell.mine-theme .page[data-page="mine"] .section-title {
    margin: 0 0 12px;
    height: 42px;
    border-radius: 12px;
    border: 1px solid rgba(255, 219, 165, 0.2);
    background: linear-gradient(180deg, rgba(33, 33, 33, 0.96) 0%, rgba(18, 18, 18, 0.98) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    letter-spacing: 1px;
    font-size: 16px;
    font-weight: 700;
}

.app-shell.mine-theme .page[data-page="mine"] .profile-card,
.app-shell.mine-theme .page[data-page="mine"] .mine-asset-card,
.app-shell.mine-theme .page[data-page="mine"] .mine-list {
    background: linear-gradient(180deg, rgba(33, 33, 33, 0.96) 0%, rgba(16, 16, 16, 0.98) 100%);
    border-radius: 14px;
    border: 1px solid rgba(255, 219, 165, 0.18);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.24);
}

.app-shell.mine-theme .page[data-page="mine"] .mine-asset-title {
    color: #f7deb0;
}

.app-shell.mine-theme .page[data-page="mine"] .mine-asset-item {
    border: 1px solid rgba(255, 219, 165, 0.2);
    background: linear-gradient(180deg, rgba(36, 36, 36, 0.9) 0%, rgba(22, 22, 22, 0.95) 100%);
}

.app-shell.mine-theme .page[data-page="mine"] .mine-asset-item .label {
    color: #b8a58d;
}

.app-shell.mine-theme .page[data-page="mine"] .mine-asset-item .value {
    color: #f7deb0;
}

.app-shell.mine-theme .page[data-page="mine"] .avatar {
    background: linear-gradient(140deg, #f5d7a6, #c78d4c);
    color: #4a2c12;
}

.app-shell.mine-theme .page[data-page="mine"] .profile-card h3 {
    color: #ffffff;
}

.app-shell.mine-theme .page[data-page="mine"] .mine-name-label {
    color: #ffffff;
}

.app-shell.mine-theme .page[data-page="mine"] .profile-card p {
    color: #ffffff;
}

.mine-inline-login-btn {
    border: 1px solid rgba(255, 219, 165, 0.38);
    background: linear-gradient(135deg, #ff4f87, #ff2f72);
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    border-radius: 8px;
    padding: 7px 12px;
    cursor: pointer;
    box-shadow: 0 8px 16px rgba(255, 63, 123, 0.22);
}

.mine-inline-login-btn:active {
    transform: translateY(1px);
}

.app-shell.mine-theme .page[data-page="mine"] .mine-list li {
    color: #ffffff;
    border-bottom: 1px solid rgba(255, 219, 165, 0.14);
}

.app-shell.mine-theme .page[data-page="mine"] .mine-list li#mineLoginBtn {
    color: #ffffff;
}

.app-shell.mine-theme .page[data-page="mine"] .mine-list li#mineLogoutBtn {
    color: #ffffff;
}

.page[data-page="earn"] {
    border-radius: 18px;
    border: 1px solid rgba(255, 219, 165, 0.18);
    background:
        radial-gradient(circle at top, rgba(255, 194, 105, 0.1), transparent 28%),
        linear-gradient(180deg, rgba(37, 37, 37, 0.96) 0%, rgba(12, 12, 12, 0.98) 100%);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
    padding: 12px;
}

.page[data-page="earn"] .section-title {
    margin: 0 0 12px;
    height: 42px;
    border-radius: 12px;
    border: 1px solid rgba(255, 219, 165, 0.2);
    background: linear-gradient(180deg, rgba(33, 33, 33, 0.96) 0%, rgba(18, 18, 18, 0.98) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #f7deb0;
    letter-spacing: 1px;
    font-size: 16px;
    font-weight: 700;
}

.page[data-page="earn"] .earn-cards {
    background: transparent;
    box-shadow: none;
    padding: 0;
    gap: 10px;
}

.page[data-page="earn"] .mine-vip-card {
    margin-top: 0;
    margin-bottom: 10px;
}

.page[data-page="earn"] .earn-cards article {
    border: 1px solid rgba(255, 219, 165, 0.14);
    border-radius: 12px;
    padding: 12px;
    background: linear-gradient(180deg, rgba(36, 36, 36, 0.96) 0%, rgba(20, 20, 20, 0.98) 100%);
}

.page[data-page="earn"] .earn-cards h3 {
    color: #f6ead5;
    font-size: 15px;
}

.page[data-page="earn"] .earn-cards p {
    color: #b8a58d;
    font-size: 12px;
}

.page[data-page="earn"] .earn-watch-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.page[data-page="earn"] .earn-watch-text {
    flex: 1;
    min-width: 0;
}

.page[data-page="earn"] .earn-watch-time {
    flex: 0 0 auto;
    min-width: 112px;
    padding: 8px 10px;
    text-align: center;
    color: #ffd78d;
    border-radius: 8px;
    border: 1px solid rgba(255, 219, 165, 0.2);
    background: rgba(255, 219, 165, 0.06);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.page[data-page="earn"] .earn-watch-time:active {
    transform: scale(0.98);
}

.page[data-page="earn"] .earn-watch-time.disabled {
    opacity: 0.7;
    cursor: not-allowed;
    box-shadow: none;
}

.page[data-page="earn"] .wallet-panel {
    margin-top: 12px;
    border-radius: 16px;
    padding: 14px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28);
    border: 1px solid rgba(255, 219, 165, 0.18);
    background: linear-gradient(180deg, rgba(33, 33, 33, 0.96) 0%, rgba(16, 16, 16, 0.98) 100%);
}

.page[data-page="earn"] .wallet-top h3 {
    color: #f6ead5;
}

.page[data-page="earn"] .wallet-top p {
    color: #b8a58d;
}

.page[data-page="earn"] .wallet-top strong {
    color: #d7a867;
}

.page[data-page="earn"] .wallet-btn {
    border: 1px solid rgba(255, 219, 165, 0.18);
    border-radius: 12px;
    padding: 12px 0;
    background: linear-gradient(180deg, #242424 0%, #1d1d1d 100%);
    color: #f6ead5;
    font-size: 15px;
    font-weight: 700;
}

.social-bar {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 16px;
    padding: 16px 12px;
    background: linear-gradient(180deg, rgba(33,33,33,0.96) 0%, rgba(16,16,16,0.98) 100%);
    border-radius: 16px;
    border: 1px solid rgba(255,219,165,0.18);
    box-shadow: 0 12px 30px rgba(0,0,0,0.28);
}

.page[data-page="earn"] .social-bar {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.social-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    color: #f6ead5;
    padding: 12px 8px;
    border-radius: 12px;
    background: linear-gradient(180deg, #242424 0%, #1d1d1d 100%);
    border: 1px solid rgba(255,219,165,0.18);
    transition: opacity .2s;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}
.social-btn:active { opacity: .7; }
.social-btn svg {
    width: 28px;
    height: 28px;
}
#socialFacebook svg { color: #1877f2; }
#socialInstagram svg { color: #e1306c; }
#socialYouTube svg { color: #ff0000; }
#socialTikTok svg { color: #ffffff; }
.social-btn span {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .3px;
}

.page[data-page="earn"] .wallet-btn.primary {
    color: #fff;
    border-color: transparent;
    background: linear-gradient(135deg, #ff4f87, #ff2f72);
    box-shadow: 0 12px 22px rgba(255, 63, 123, 0.24);
}

@media (max-width: 360px) {
    .card-grid {
        gap: 8px;
    }

    .video-card h3 {
        font-size: 11px;
    }
}

.app-shell.mine-theme .page[data-page="mine"] .mine-vip-card {
    border: 1px solid rgba(212, 161, 93, 0.45);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
}

.app-shell.earn-theme .bottom-logo,
.app-shell.mine-theme .bottom-logo {
    background: linear-gradient(135deg, #2a2a2a, #181818);
    border-color: rgba(255, 219, 165, 0.28);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.42);
}

.app-shell.home-theme {
    background:
        radial-gradient(circle at top, rgba(255, 194, 105, 0.1), transparent 30%),
        linear-gradient(180deg, #111111 0%, #080808 40%, #050505 100%);
}

/* ── 浮动客服按钮 ─────────────────────────────── */
.float-kefu-btn {
    display: none;
    position: fixed;
    right: 16px;
    bottom: 90px;
    z-index: 1000;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, #b8860b, #3a2a08);
    box-shadow: 0 4px 16px rgba(96, 70, 18, 0.52);
    color: #fff;
    border: none;
    outline: none;
    padding: 0;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
    transition: box-shadow 0.2s, transform 0.15s;
    touch-action: none;
    -webkit-appearance: none;
    appearance: none;
}

.float-kefu-btn.visible {
    display: flex;
}

.float-kefu-btn svg {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    pointer-events: none;
}

.float-kefu-btn span {
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    pointer-events: none;
}

.float-kefu-btn:active {
    cursor: grabbing;
    transform: scale(0.95);
    box-shadow: 0 2px 8px rgba(86, 62, 15, 0.4);
}
/* ── 客服未读消息徽标 ─────────── */
.kefu-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background: #ff3b30;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    padding: 0 4px;
    line-height: 18px;
    text-align: center;
    pointer-events: none;
    border: 1px solid rgba(255, 255, 255, 0.85);
}
/* ─────────────────────────────────────────────── */

/* ── 聊天窗口遮罩 ──────────────────────────────── */
.chat-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 1099;
}
.chat-overlay.active { display: block; }

/* ── 聊天窗口主体 ──────────────────────────────── */
.chat-window {
    display: none;
    flex-direction: column;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 70vh;
    max-height: 600px;
    background: #1a1a2e;
    border-radius: 18px 18px 0 0;
    z-index: 1100;
    box-shadow: 0 -4px 30px rgba(0,0,0,.5);
    overflow: hidden;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(.32,1.25,.38,1);
}
.chat-window.active {
    display: flex;
    transform: translateY(0);
}
.chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px 12px;
    background: linear-gradient(135deg, #ff4f87, #ff2f72);
    flex-shrink: 0;
}
.chat-title {
    color: #fff;
    font-size: 16px;
    font-weight: 700;
}
.chat-close-btn {
    background: none;
    border: none;
    color: rgba(255,255,255,.85);
    font-size: 18px;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
    -webkit-appearance: none;
    appearance: none;
}
.chat-msg-list {
    flex: 1;
    overflow-y: auto;
    padding: 14px 14px 6px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    -webkit-overflow-scrolling: touch;
}
.chat-welcome {
    text-align: center;
    color: #666;
    font-size: 12px;
    margin-bottom: 4px;
}
/* 气泡消息 */
.chat-bubble {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    max-width: 85%;
}
.chat-bubble.user {
    align-self: flex-end;
    flex-direction: row-reverse;
}
.chat-bubble.admin { align-self: flex-start; }
.chat-bubble-text {
    padding: 9px 13px;
    border-radius: 14px;
    font-size: 14px;
    line-height: 1.5;
    word-break: break-word;
    white-space: pre-wrap;
}
.chat-bubble-text.image {
    padding: 4px;
    background: transparent !important;
}
.chat-bubble-image {
    display: block;
    max-width: 180px;
    max-height: 240px;
    border-radius: 10px;
    object-fit: cover;
    cursor: zoom-in;
    border: 1px solid rgba(255,255,255,.15);
}
.chat-bubble.user .chat-bubble-text {
    background: linear-gradient(135deg, #ff4f87, #ff2f72);
    color: #fff;
    border-bottom-right-radius: 4px;
}
.chat-bubble.admin .chat-bubble-text {
    background: #2a2a42;
    color: #e0e0e0;
    border-bottom-left-radius: 4px;
}
.chat-bubble-time {
    font-size: 10px;
    color: #555;
    flex-shrink: 0;
    margin-bottom: 2px;
}
/* 输入区 */
.chat-input-area {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    padding: 10px 12px;
    background: #111128;
    border-top: 1px solid rgba(255,255,255,.07);
    flex-shrink: 0;
}
.chat-input {
    flex: 1;
    background: #2a2a42;
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 10px;
    color: #e0e0e0;
    font-size: 14px;
    padding: 8px 12px;
    resize: none;
    outline: none;
    max-height: 90px;
    min-height: 36px;
    line-height: 1.5;
    -webkit-appearance: none;
    appearance: none;
    font-family: inherit;
}
.chat-input::placeholder { color: #555; }
.chat-image-btn {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 10px;
    background: #2a2a42;
    color: #d6d8e7;
    font-size: 22px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    flex-shrink: 0;
    -webkit-appearance: none;
    appearance: none;
}
.chat-image-btn:disabled {
    opacity: .5;
    cursor: default;
}
.chat-send-btn {
    background: linear-gradient(135deg, #ff4f87, #ff2f72);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    flex-shrink: 0;
    -webkit-appearance: none;
    appearance: none;
    height: 36px;
}
.chat-send-btn:disabled {
    opacity: 0.5;
    cursor: default;
}
/* ─────────────────────────────────────────────── */

.app-shell.home-theme .top-panel {
    background: rgba(12, 12, 12, 0.94);
    border-bottom: 1px solid rgba(255, 219, 165, 0.14);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.24);
}

.app-shell.home-theme .search-row input {
    border: 1px solid rgba(255, 219, 165, 0.2);
    background: linear-gradient(180deg, rgba(33, 33, 33, 0.96) 0%, rgba(16, 16, 16, 0.98) 100%);
    color: #f6ead5;
}

.app-shell.home-theme .search-row input::placeholder {
    color: #8f836f;
}

.app-shell.home-theme .channel-row button {
    color: #8f836f;
}

.app-shell.home-theme .channel-row button.active {
    color: #f7deb0;
}

.app-shell.home-theme .page[data-page="home"] {
    border-radius: 18px;
    border: 1px solid rgba(255, 219, 165, 0.18);
    background:
        radial-gradient(circle at top, rgba(255, 194, 105, 0.1), transparent 28%),
        linear-gradient(180deg, rgba(37, 37, 37, 0.96) 0%, rgba(12, 12, 12, 0.98) 100%);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
    padding: 12px;
}

.app-shell.home-theme .home-status {
    color: #b8a58d;
}

.app-shell.home-theme .home-status.error {
    color: #fecaca;
}

.app-shell.home-theme .video-card {
    border: 1px solid rgba(255, 219, 165, 0.15);
    background: linear-gradient(180deg, rgba(35, 35, 35, 0.96) 0%, rgba(18, 18, 18, 0.98) 100%);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
}

.app-shell.home-theme .video-card h3 {
    color: #f6ead5;
}

.app-shell.home-theme .video-card p {
    color: #f7deb0;
}

.app-shell.home-theme .bottom-nav {
    background: rgba(12, 12, 12, 0.96);
    border-top: 1px solid rgba(255, 219, 165, 0.16);
    box-shadow: 0 -10px 24px rgba(0, 0, 0, 0.28);
}

.app-shell.home-theme .bottom-nav button {
    color: #8f836f;
}

.app-shell.home-theme .bottom-nav button.active {
    color: #f7deb0;
}

.app-shell.home-theme .bottom-nav button.active .nav-icon {
    filter: drop-shadow(0 2px 6px rgba(255, 132, 176, 0.25));
}

.app-shell.home-theme .bottom-logo {
    background: linear-gradient(135deg, #2a2a2a, #181818);
    border-color: rgba(255, 219, 165, 0.28);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.42);
}

.app-dialog-mask {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.62);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 99;
    padding: 20px;
}

.app-dialog-mask.show {
    display: flex;
}

.app-dialog {
    width: min(320px, 100%);
    background: linear-gradient(180deg, rgba(33, 33, 33, 0.98) 0%, rgba(16, 16, 16, 0.99) 100%);
    border-radius: 14px;
    border: 1px solid rgba(255, 219, 165, 0.22);
    box-shadow: 0 18px 38px rgba(0, 0, 0, 0.44);
    overflow: hidden;
}

.app-dialog-title {
    padding: 12px 14px 8px;
    font-size: 15px;
    font-weight: 700;
    color: #f7deb0;
}

.app-dialog-msg {
    padding: 0 14px 14px;
    font-size: 13px;
    line-height: 1.6;
    color: #f6ead5;
    white-space: pre-wrap;
    word-break: break-word;
}

.signin-board {
    display: grid;
    gap: 6px;
}

.signin-summary,
.signin-total {
    font-weight: 700;
    color: #f6ead5;
}

.signin-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: #f6ead5;
}

.signin-row strong {
    font-weight: 700;
    color: inherit;
}

.signin-row.active,
.signin-row.active strong,
.signin-total.active {
    color: #ff4f87;
}

.app-dialog-actions {
    padding: 0 14px 14px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.app-dialog-btn {
    border: 0;
    border-radius: 9px;
    background: linear-gradient(135deg, #d7a867, #b8833e);
    color: #2d1707;
    font-size: 13px;
    font-weight: 700;
    padding: 8px 18px;
    cursor: pointer;
    box-shadow: 0 10px 18px rgba(167, 112, 40, 0.3);
}

.app-dialog-btn[disabled] {
    opacity: 0.65;
    cursor: not-allowed;
    box-shadow: none;
}

.app-dialog-btn.cancel {
    background: rgba(82, 82, 82, 0.9);
    color: #f6ead5;
    box-shadow: none;
    border: 1px solid rgba(255, 219, 165, 0.2);
}

.settings-sheet-mask {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: rgba(0, 0, 0, 0.62);
    display: none;
    align-items: flex-end;
    justify-content: center;
    padding: 14px;
}

.settings-sheet-mask.show {
    display: flex;
}

.settings-sheet {
    width: min(420px, 100%);
    border-radius: 16px;
    border: 1px solid rgba(255, 219, 165, 0.24);
    background: linear-gradient(180deg, rgba(33, 33, 33, 0.98) 0%, rgba(16, 16, 16, 0.99) 100%);
    box-shadow: 0 18px 38px rgba(0, 0, 0, 0.44);
    overflow: hidden;
}

.settings-sheet-title {
    padding: 14px 16px 8px;
    font-size: 16px;
    color: #f7deb0;
    font-weight: 700;
}

.settings-sheet-item,
.settings-sheet-cancel {
    width: 100%;
    border: 0;
    border-top: 1px solid rgba(255, 219, 165, 0.15);
    background: transparent;
    color: #f6ead5;
    font-size: 15px;
    padding: 14px 16px;
    text-align: left;
}

.settings-sheet-item:active,
.settings-sheet-cancel:active {
    background: rgba(255, 255, 255, 0.06);
}

.settings-sheet-cancel {
    color: #ff9db7;
}
