:root {
    --bg: #ffffff;
    --panel: #ffffff;
    --panel2: #fdecec;
    --text: #17171b;
    --muted: #6b6b70;
    --accent: #da3131;
    --accent2: #da3131;
    --danger: #e02424;
    --success: #2e9e5b;
    --border: rgba(218, 49, 49, .25)
}

* {
    box-sizing: border-box
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, "Noto Sans TC", "Microsoft JhengHei", sans-serif;
    color: var(--text);
    background: radial-gradient(circle at top right, rgba(218, 49, 49, .20), transparent 34%), radial-gradient(circle at bottom left, rgba(218, 49, 49, .10), transparent 30%), var(--bg)
}

a {
    color: inherit
}

.login-body {
    display: grid;
    place-items: center;
    padding: 24px
}

.login-card {
    width: min(440px, 100%);
    padding: 36px;
    background: rgba(255, 255, 255, .97);
    border: 1px solid var(--border);
    border-radius: 24px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, .38)
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--accent), #e85454);
    color: #ffffff;
    font-weight: 900;
    letter-spacing: .08em
}

h1,
h2,
h3,
p {
    margin-top: 0
}

.muted,
.site-subtitle,
.section-heading span {
    color: var(--muted)
}

label {
    display: block;
    margin: 24px 0 8px;
    font-weight: 700
}

input {
    width: 100%;
    padding: 14px 16px;
    color: var(--text);
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 12px;
    outline: none
}

input:focus {
    border-color: var(--accent2)
}

.primary-button,
.game-card button {
    width: 100%;
    margin-top: 16px;
    padding: 14px 18px;
    border: 0;
    border-radius: 12px;
    font-weight: 800
}

.primary-button,
.primary-link {
    color: #ffffff;
    background: var(--accent);
    cursor: pointer
}

.primary-link {
    display: inline-block;
    padding: 12px 16px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 800
}

.security-note {
    margin: 18px 0 0;
    color: var(--muted);
    font-size: 13px
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 18px clamp(18px, 4vw, 56px);
    background: rgba(218, 49, 49, .95);
    border-bottom: 1px solid rgba(255, 255, 255, .25);
    backdrop-filter: blur(16px);
    position: sticky;
    top: 0;
    z-index: 10
}
.topbar,
.topbar * {
    color: #ffffff !important;
}
.topbar .site-subtitle,
.topbar .muted {
    color: rgba(255, 255, 255, .85) !important;
}

.site-title {
    font-weight: 900;
    letter-spacing: .08em
}

.site-subtitle {
    margin-top: 3px;
    font-size: 13px
}

.member-area {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-end
}

.member-area form {
    margin: 0
}

.logout-button,
.back-link {
    padding: 9px 13px;
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    background: transparent;
    text-decoration: none;
    cursor: pointer
}

.status-badge {
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800
}

.status-badge.normal {
    color: var(--success);
    background: rgba(80, 216, 144, .12)
}

.status-badge.locked {
    color: var(--danger);
    background: rgba(218, 49, 49, .12)
}

.page {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 40px 0 72px
}

.page.narrow {
    width: min(820px, calc(100% - 32px))
}

.hero {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 24px;
    min-height: 280px;
    padding: clamp(28px, 5vw, 60px);
    margin-bottom: 24px;
    border: 1px solid var(--border);
    border-radius: 28px;
    background: linear-gradient(135deg, rgba(218, 49, 49, .26), rgba(255, 255, 255, .97)), var(--panel)
}

.hero h1 {
    max-width: 720px;
    font-size: clamp(30px, 5vw, 56px);
    line-height: 1.08
}

.hero p {
    max-width: 720px;
    color: var(--muted);
    font-size: 17px
}

.eyebrow {
    color: var(--accent);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .16em
}

.service-entry {
    display: flex;
    gap: 14px;
    align-items: center;
    min-width: 230px;
    padding: 18px;
    border: 1px solid rgba(218, 49, 49, .35);
    border-radius: 18px;
    background: rgba(218, 49, 49, .10);
    text-decoration: none
}

.service-entry small {
    display: block;
    margin-top: 4px;
    color: var(--muted)
}

.service-icon {
    font-size: 34px
}

.account-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 34px
}

.metric-card {
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--panel)
}

.metric-card span {
    display: block;
    color: var(--muted);
    font-size: 13px;
    margin-bottom: 8px
}

.metric-card strong {
    font-size: 20px
}

.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
    margin: 0 4px 16px
}

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

.game-card {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 16px;
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: var(--panel)
}

.game-card h3 {
    margin-bottom: 6px
}

.game-card p {
    margin-bottom: 0;
    color: var(--muted)
}

.game-icon {
    font-size: 38px
}

.game-card button {
    grid-column: 1/-1;
    color: var(--muted);
    background: var(--panel2);
    cursor: not-allowed
}

.floating-service {
    position: fixed;
    right: 22px;
    bottom: 22px;
    padding: 14px 18px;
    border-radius: 999px;
    color: #ffffff;
    background: var(--accent);
    font-weight: 900;
    text-decoration: none;
    box-shadow: 0 16px 36px rgba(0, 0, 0, .35)
}

.alert {
    padding: 14px 16px;
    margin-bottom: 18px;
    border-radius: 12px
}

.alert-error {
    color: #7a1a1a;
    background: rgba(218, 49, 49, .14);
    border: 1px solid rgba(218, 49, 49, .28)
}

.alert-warning {
    color: #7a1a1a;
    background: rgba(218, 49, 49, .12);
    border: 1px solid rgba(218, 49, 49, .28)
}

.support-panel {
    padding: 34px;
    border: 1px solid var(--border);
    border-radius: 24px;
    background: var(--panel)
}

.support-avatar {
    font-size: 48px
}

.empty-state {
    padding: 24px;
    color: var(--muted);
    background: var(--panel2);
    border-radius: 14px
}

.order-list {
    display: grid;
    gap: 12px
}

.order-card {
    display: grid;
    gap: 7px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--panel2)
}

.order-card span {
    color: var(--muted)
}

.section-gap {
    margin-top: 30px
}

@media(max-width:800px) {
    .hero {
        grid-template-columns: 1fr
    }

    .game-grid {
        grid-template-columns: 1fr 1fr
    }

    .account-grid {
        grid-template-columns: 1fr 1fr
    }

    .topbar {
        align-items: flex-start
    }
}

@media(max-width:560px) {

    .game-grid,
    .account-grid {
        grid-template-columns: 1fr
    }

    .topbar {
        flex-direction: column
    }

    .member-area {
        justify-content: flex-start
    }

    .login-card {
        padding: 26px
    }
}


.login-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
    color: var(--muted);
}

.login-divider::before,
.login-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--border);
}

.guest-service-button {
    display: block;
    padding: 14px 18px;
    border: 1px solid rgba(218, 49, 49, .35);
    border-radius: 12px;
    color: var(--accent);
    background: rgba(218, 49, 49, .08);
    text-align: center;
    text-decoration: none;
    font-weight: 800;
}

.guest-service-note {
    margin-top: 12px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
}

.guest-support-panel {
    text-align: center;
}

.guest-badge {
    display: inline-block;
    margin: 6px 0 18px;
    padding: 6px 10px;
    border-radius: 999px;
    color: var(--accent);
    background: rgba(218, 49, 49, .10);
    font-size: 12px;
    font-weight: 800;
}

.guest-open-chat {
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
}

.guest-page.single-chat-view {
    background: #0b1221 !important;
    overflow: hidden !important;
}

.guest-page.single-chat-view .topbar,
.guest-page.single-chat-view .page.narrow,
.guest-page.single-chat-view .support-panel,
.guest-page.single-chat-view .guest-support-panel,
.guest-page.single-chat-view .back-link,
.guest-page.single-chat-view .site-title,
.guest-page.single-chat-view .site-subtitle {
    display: none !important;
}

.guest-page.single-chat-view .woot-widget-holder,
.guest-page.single-chat-view .woot-widget-holder.woot-elements--right {
    position: fixed !important;
    left: 50% !important;
    top: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: min(96vw, 1060px) !important;
    height: min(96vh, 920px) !important;
    max-height: min(96vh, 920px) !important;
    min-height: min(96vh, 920px) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 28px !important;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.45) !important;
    background: rgba(12, 19, 32, 0.96) !important;
    overflow: hidden !important;
}

.guest-page.single-chat-view .woot-widget-holder iframe,
.guest-page.single-chat-view .woot-widget-holder .woot-widget-box {
    width: 100% !important;
    height: 100% !important;
    min-height: min(96vh, 920px) !important;
    border-radius: 24px !important;
}

/* 旧版：仅保留客服气泡尺寸，不盖白底主题 */
.guest-page .woot-widget-holder,
.guest-page .woot-widget-holder.woot-elements--right {
    width: 400px !important;
    height: min(82vh, 760px) !important;
    max-height: 82vh !important;
}

.guest-page .woot-widget-holder iframe,
.guest-page .woot-widget-holder .woot-widget-box {
    width: 100% !important;
    height: 100% !important;
    min-height: min(82vh, 760px) !important;
}

.guest-page .woot-widget-bubble,
.woot-widget-bubble {
    background: #da3131 !important;
}

.guest-page .woot-widget-bubble:hover,
.woot-widget-bubble:hover {
    background: #6a52e6 !important;
}