:root {
    --entry-red: #b1171f;
    --entry-red-deep: #7c0d14;
    --entry-gold: #d8c36a;
    --entry-gold-deep: #b29329;
    --entry-panel-gold: #d7bb2f;
    --entry-panel-gold-deep: #c39d12;
    --entry-panel-gold-soft: #eadb8a;
    --entry-bg: #d9d9d9;
    --entry-text: #2f210d;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
    font-family: "Microsoft YaHei", Arial, sans-serif;
    background: linear-gradient(180deg, #8b8b8b 0, var(--entry-bg) 180px, #efefef 100%);
    color: var(--entry-text);
}

.mobile-entry-body {
    min-height: 100vh;
}

.mobile-entry-app {
    width: 100%;
    min-height: 100vh;
}

.mobile-entry-main {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px 14px;
}

.mobile-entry-page-title {
    margin-bottom: 18px;
    font-size: 28px;
    font-weight: 700;
    line-height: 1;
    color: #fff7d0;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.34);
}

.mobile-entry-login-panel,
.mobile-entry-nav-panel {
    width: 100%;
    max-width: 420px;
}

.mobile-entry-login-box {
    width: min(100%, 330px);
    margin: 0 auto;
    padding: 18px 22px 20px;
    border: 2px solid #6b5a12;
    border-radius: 12px;
    background: linear-gradient(180deg, #c8a91c 0, #f5ecb3 46%, #d2af1e 100%);
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.24);
}

.mobile-entry-login-title {
    margin-bottom: 16px;
    text-align: center;
    font-size: 24px;
    font-weight: 700;
    color: #111;
}

.mobile-entry-login-error {
    margin-bottom: 12px;
    padding: 8px 10px;
    border: 1px solid rgba(165, 22, 34, 0.25);
    border-radius: 8px;
    background: rgba(255, 246, 246, 0.92);
    color: #a51622;
    font-size: 12px;
    line-height: 1.5;
}

.mobile-entry-field {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    margin-top: 12px;
    font-size: 14px;
    font-weight: 700;
    color: #1f1f1f;
}

.mobile-entry-field input {
    width: 100%;
    height: 30px;
    border: 2px solid #2f2f2f;
    border-radius: 4px;
    background: #fff;
    padding: 0 8px;
    font-size: 14px;
    outline: none;
}

.mobile-entry-login-actions {
    margin-top: 18px;
    display: flex;
    justify-content: center;
}

.mobile-entry-login-button {
    min-width: 104px;
    height: 34px;
    border: 1px solid #a77800;
    border-radius: 6px;
    background: linear-gradient(180deg, #fff8c9 0, #c59112 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
    color: #2c1b05;
    font-size: 20px;
    font-weight: 700;
    cursor: pointer;
}

.mobile-entry-nav-card {
    padding: 20px 18px;
    border-radius: 18px;
    background: linear-gradient(180deg, var(--entry-panel-gold) 0, var(--entry-panel-gold-deep) 100%);
    box-shadow: 0 18px 40px rgba(110, 83, 6, 0.28);
    color: #2f210d;
}

.mobile-entry-nav-header {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
}

.mobile-entry-logout-button {
    min-width: 68px;
    height: 34px;
    border: 1px solid rgba(120, 90, 10, 0.45);
    border-radius: 999px;
    background: rgba(255, 245, 196, 0.24);
    color: #5a3a00;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.mobile-entry-header-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 86px;
    height: 34px;
    padding: 0 14px;
    border: 1px solid rgba(120, 90, 10, 0.45);
    border-radius: 999px;
    background: rgba(255, 245, 196, 0.24);
    color: #5a3a00;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.mobile-entry-rules-modal {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px 14px;
}

.mobile-entry-rules-modal[hidden] {
    display: none !important;
}

.mobile-entry-rules-mask {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.42);
}

.mobile-entry-rules-dialog {
    position: relative;
    z-index: 1;
    width: min(100%, 420px);
    max-height: calc(100vh - 36px);
    border: 2px solid #6b5a12;
    border-radius: 14px;
    overflow: hidden;
    background: #fffaf0;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
}

.mobile-entry-rules-dialog-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    background: linear-gradient(180deg, #c8a91c 0, #e6d06d 100%);
    color: #3a2500;
    font-size: 16px;
    font-weight: 700;
}

.mobile-entry-rules-close {
    min-width: 58px;
    height: 28px;
    border: 1px solid rgba(120, 90, 10, 0.45);
    border-radius: 999px;
    background: rgba(255, 248, 213, 0.75);
    color: #5a3a00;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.mobile-entry-rules-content {
    margin: 0;
    max-height: calc(100vh - 110px);
    overflow: auto;
    padding: 14px 16px 18px;
    color: #3f1f1f;
    font-size: 13px;
    line-height: 1.75;
    white-space: pre-wrap;
    word-break: break-word;
    font-family: "Microsoft YaHei", Arial, sans-serif;
    background: #fffdf8;
}

.mobile-entry-member-bar {
    margin-top: 14px;
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(255, 247, 218, 0.28);
    font-size: 14px;
}

.mobile-entry-lottery-grid {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 18px;
    margin-top: 22px;
}

.mobile-entry-lottery-card {
    flex: 1 1 0;
    min-width: 0;
    max-width: 150px;
    padding: 0;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.mobile-entry-lottery-card.is-macau {
    color: #0a2f8a;
}

.mobile-entry-lottery-card.is-hongkong {
    color: #8a0d17;
}

.mobile-entry-lottery-ball {
    position: relative;
    width: 108px;
    height: 108px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow:
        inset -18px -22px 26px rgba(0, 0, 0, 0.3),
        inset 10px 10px 16px rgba(255, 255, 255, 0.14),
        inset 0 -10px 18px rgba(0, 0, 0, 0.16),
        0 14px 22px rgba(0, 0, 0, 0.24);
}

.mobile-entry-lottery-ball::before {
    content: "";
    position: absolute;
    top: 14px;
    left: 18px;
    width: 38px;
    height: 24px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.8);
    transform: rotate(-24deg);
    filter: blur(1px);
}

.mobile-entry-lottery-ball::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background:
        radial-gradient(circle at 52% 38%, rgba(255, 255, 255, 0.08) 0, rgba(255, 255, 255, 0.02) 22%, rgba(0, 0, 0, 0) 40%),
        radial-gradient(circle at 50% 120%, rgba(0, 0, 0, 0.4) 0, rgba(0, 0, 0, 0) 52%);
}

.mobile-entry-lottery-card.is-macau .mobile-entry-lottery-ball {
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(ellipse 56% 42% at 50% 90%, #fffdf8 0, #f6efe6 28%, rgba(246, 239, 230, 0.92) 40%, rgba(246, 239, 230, 0) 54%),
        radial-gradient(circle at 36% 26%, rgba(255, 191, 191, 0.95) 0, rgba(255, 146, 146, 0.72) 14%, rgba(255, 146, 146, 0.12) 24%, rgba(0, 0, 0, 0) 25%),
        radial-gradient(circle at 50% 34%, #ff5f63 0, #e1191f 34%, #be1014 56%, #83070c 100%);
}

.mobile-entry-lottery-card.is-macau .mobile-entry-lottery-ball::before {
    top: 14px;
    left: 20px;
    width: 34px;
    height: 20px;
    background: rgba(255, 255, 255, 0.88);
    transform: rotate(-26deg);
    filter: blur(1.2px);
}

.mobile-entry-lottery-card.is-macau .mobile-entry-lottery-ball::after {
    inset: 0;
    background:
        radial-gradient(circle at 50% 118%, rgba(0, 0, 0, 0.42) 0, rgba(0, 0, 0, 0) 50%),
        radial-gradient(circle at 48% 38%, rgba(255, 255, 255, 0.08) 0, rgba(255, 255, 255, 0.02) 18%, rgba(0, 0, 0, 0) 34%);
}

.mobile-entry-lottery-card.is-hongkong .mobile-entry-lottery-ball {
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(ellipse 56% 42% at 50% 90%, #fffdf8 0, #f6efe6 28%, rgba(246, 239, 230, 0.92) 40%, rgba(246, 239, 230, 0) 54%),
        radial-gradient(circle at 36% 26%, rgba(176, 206, 255, 0.95) 0, rgba(122, 163, 255, 0.72) 14%, rgba(122, 163, 255, 0.12) 24%, rgba(0, 0, 0, 0) 25%),
        radial-gradient(circle at 50% 34%, #4c6fff 0, #1739e8 34%, #1228c8 56%, #10127d 100%);
}

.mobile-entry-lottery-card.is-hongkong .mobile-entry-lottery-ball::before {
    top: 14px;
    left: 20px;
    width: 34px;
    height: 20px;
    background: rgba(255, 255, 255, 0.88);
    transform: rotate(-26deg);
    filter: blur(1.2px);
}

.mobile-entry-lottery-card.is-hongkong .mobile-entry-lottery-ball::after {
    inset: 0;
    background:
        radial-gradient(circle at 50% 118%, rgba(0, 0, 0, 0.42) 0, rgba(0, 0, 0, 0) 50%),
        radial-gradient(circle at 48% 38%, rgba(255, 255, 255, 0.08) 0, rgba(255, 255, 255, 0.02) 18%, rgba(0, 0, 0, 0) 34%);
}

.mobile-entry-lottery-number {
    position: relative;
    z-index: 1;
    width: 40px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(180deg, #fffefb 0, #f4f0e9 100%);
    color: #151515;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 0;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.82),
        0 1px 2px rgba(0, 0, 0, 0.22);
    text-shadow:
        0 1px 0 rgba(255, 255, 255, 0.38);
    transform: translateY(-20px) rotate(-18deg);
}

.mobile-entry-lottery-card.is-macau .mobile-entry-lottery-number {
    transform: translateY(-20px) rotate(14deg);
}

.mobile-entry-lottery-card.is-hongkong .mobile-entry-lottery-number {
    transform: translateY(-20px) rotate(-18deg);
}

.mobile-entry-lottery-desc {
    font-size: 16px;
    line-height: 1.4;
    font-weight: 700;
    text-align: center;
}

.mobile-entry-report-links {
    margin-top: 16px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.mobile-entry-report-links a {
    flex: 1 1 150px;
    min-height: 38px;
    border-radius: 10px;
    background: rgba(126, 80, 8, 0.16);
    color: #5a3200;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
}

@media (max-width: 480px) {
    .mobile-entry-login-box {
        width: 100%;
    }

    .mobile-entry-nav-card {
        padding: 18px 14px;
    }

    .mobile-entry-lottery-grid {
        gap: 14px;
    }

    .mobile-entry-lottery-card {
        max-width: none;
    }

    .mobile-entry-lottery-ball {
        width: 94px;
        height: 94px;
    }

    .mobile-entry-lottery-name {
        font-size: 24px;
    }

    .mobile-entry-lottery-desc {
        font-size: 14px;
    }
}
