/* --- 全局重置 --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", Arial, sans-serif;
}

.container {
    position: relative;
    max-width: 640px;
    min-height: 100vh;
    margin: 0 auto;
    background: url('images/bg.jpg') no-repeat top center;
    background-color: #ed793e;
    background-size: cover;
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* --- 装饰背景（漂浮金币效果） --- */
.bg-decor {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.coin {
    position: absolute;
    width: 20px;
    height: 20px;
    background: radial-gradient(circle at 30% 30%, #ffddc2, #ffc49b);
    border-radius: 50%;
    opacity: 0.6;
    animation: floatUp 10s infinite linear;
}

@keyframes floatUp {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }

    20% {
        opacity: 0.8;
    }

    100% {
        transform: translateY(-10vh) rotate(360deg);
        opacity: 0;
    }
}

/* --- 头部标题 --- */
.header {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    margin: 25px auto 10px;
}

.header img {
    width: 100%;
}

.header .title-sub {
    width: 76%;
}

.header .title-main {
    width: 84%;
}


/* --- 转盘主体容器 --- */
.lottery-container {
    position: relative;
    width: 340px;
    height: 436px;
    z-index: 10;
    background: url('images/wheel.png') no-repeat center center;
    background-size: cover;
    display: flex;
    justify-content: center;
    margin-top: -10px;
    margin-bottom: 15px;
}

.lottery-box {
    position: relative;
    width: 270px;
    height: 270px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin-top: 35px;
}

/* --- 内部转盘 (旋转部分) --- */
.wheel {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-color: #fff;
    position: relative;
    overflow: hidden;
    transition: transform 4s cubic-bezier(0.2, 0.8, 0.3, 1);
}

/* 使用 CSS Conic Gradient 绘制扇形 (8个扇区) */
.wheel-bg {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: conic-gradient(#F8E0CA 0% 12.5%,
            #ffffff 12.5% 25%,
            #F8E0CA 25% 37.5%,
            #ffffff 37.5% 50%,
            #F8E0CA 50% 62.5%,
            #ffffff 62.5% 75%,
            #F8E0CA 75% 87.5%,
            #ffffff 87.5% 100%);
}

/* 奖品文字 */
.prize-list {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.prize-item {
    position: absolute;
    top: 0;
    left: 50%;
    width: 0;
    height: 50%;
    transform-origin: bottom center;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 20px;
}

.prize-name {
    font-size: 14px;
    color: #932F1D;
    font-weight: bold;
    white-space: nowrap;
}

.prize-icon {
    font-size: 24px;
    margin-top: 5px;
}

.prize-icon img {
    width: 44px;
}

.prize-gift {
    margin-top: 5px;
}

.prize-gift img {
    width: 44px;
}

/* --- 抽奖指针 --- */
.pointer {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 105px;
    background: url("images/pointer.png") no-repeat center center;
    background-size: cover;
    z-index: 20;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

.pointer-box {
    width: 65px;
    height: 65px;
    border-radius: 50%;
}

/* --- 按钮动效 --- */
.pointer:active {
    transform: translate(-50%, -50%) scale(0.95);
}

.pulse {
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 78, 80, 0.7);
    }

    70% {
        box-shadow: 0 0 0 15px rgba(255, 78, 80, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(255, 78, 80, 0);
    }
}


.main-container {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 11;
}

/* --- 播报条样式 --- */
.broadcast-container {
    width: 62%;
    height: 36px;
    display: flex;
    align-items: center;
    padding: 0 15px;
    border-radius: 0 18px 18px 0;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid #FFE1CE;
    overflow: hidden;
}

.broadcast-icon {
    margin-right: 10px;
    font-size: 1rem;
}

.broadcast-window {
    flex: 1;
    height: 100%;
    overflow: hidden;
    position: relative;
}

.broadcast-list {
    list-style: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    animation: scrollUp 20s linear infinite;
}

.broadcast-item {
    height: 36px;
    line-height: 36px;
    font-size: 0.8rem;
    color: rgba(0, 0, 0, 0.8);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.highlight {
    color: #E95A2E;
    font-weight: bold;
    margin-left: 5px;
}

@keyframes scrollUp {
    0% {
        transform: translateY(0);
    }

    100% {
        transform: translateY(-50%);
    }
}

.lottery-count-box {
    width: 90%;
    margin: 0 auto 10px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(243, 200, 128, 0.3);
    border-radius: 8px;
    text-align: center;
    color: #E95A2E;
    font-weight: bold;
    font-size: 0.95rem;
}

/* --- 中奖记录样式 --- */
.record-container {
    width: 360px;
    height: 225px;
    margin: -70px auto 20px;
    background: url(images/record-bg.png) no-repeat center center;
    background-size: cover;
    z-index: 99;
}

.record-title {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px 0 10px;
}

.record-title span {
    font-size: 18px;
    color: #CA884C;
    font-weight: bold;
    margin: 0 10px;
}

.title-line {
    width: 80px;
    height: 14px;
    background: url(images/ileft.png) no-repeat center center;
    background-size: cover;
    position: relative;
}

.title-line:last-child {
    background: url(images/iright.png) no-repeat center center;
    background-size: cover;
}

.record-list {
    max-height: 100px;
    padding: 10px 20px;
}

.record-item {
    background: #fff;
    border-radius: 12px;
    padding: 6px 12px;
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.record-img {
    width: 50px;
    height: 50px;
    margin-right: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.record-img img {
    max-width: 100%;
    max-height: 100%;
}

.record-info {
    flex: 1;
}

.record-name {
    font-size: 16px;
    color: #333;
    font-weight: bold;
    margin-bottom: 4px;
}

.record-tip {
    font-size: 12px;
    color: #999;
}

.record-btn {
    border: 1px solid #E95A2E;
    color: #E95A2E;
    padding: 4px 15px;
    border-radius: 15px;
    font-size: 14px;
    cursor: pointer;
    background: transparent;
}

.record-btn:active {
    background: #E95A2E;
    color: #fff;
}

.no-record {
    padding: 40px 0;
    text-align: center;
    color: #F19255;
    font-size: 14px;
}

.no-record img {
    width: 30px;
    height: 30px;
    margin-bottom: 10px;
    opacity: 0.6;
}

.rules-tips {
    color: #fff;
    padding: 8px 15px;
    border-radius: 18px 0 0 18px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    text-align: center;
    background: #ED8F67;
    border: 1px solid #FFDECA;
}

.rules-content {
    text-align: left;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    max-height: 360px;
    overflow-y: auto;
    margin-bottom: 20px;
}

.rules-content p {
    margin-bottom: 8px;
    line-height: 18px;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 10px;
}

th,
td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: center;
}

th {
    font-size: 16px;
    background-color: #f2f2f2;
}

.bg-gray td {
    background-color: #f2f2f2;
}

/* --- 弹窗样式 --- */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 100;
    display: none;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.modal-content {
    width: 80%;
    max-width: 340px;
    background: #fff;
    border-radius: 12px;
    text-align: center;
    padding: 24px 20px;
    position: relative;
    background: linear-gradient(135deg, #fff, #f0f0f0);
}

.modal-title {
    color: #B5773E;
    font-size: 20px;
    font-weight: bold;
    display: flex;
    justify-content: center;
    align-items: center;
    padding-bottom: 15px;
}

.modal-title span {
    font-size: 18px;
    color: #CA884C;
    margin: 0 10px;
}

.modal-btn {
    width: 100%;
    background: linear-gradient(180deg, #FFC368 0%, #FF5715 100%);
    color: #fff;
    border: none;
    padding: 10px 30px;
    border-radius: 20px;
    font-size: 16px;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

#rulesModal .modal-content {
    width: 90%;
}

#resultModal .modal-content {
    margin-top: -1px;
}

#resultModal .modal-content::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    border-radius: 12px;
    z-index: -1;
    background: linear-gradient(180deg, #F5BD9E 0%, #F6ECD6 100%);
}

#resultModal .modal-prize {
    font-size: 16px;
    color: #FF5715;
    font-weight: bold;
}

#resultModal .modal-icon img {
    width: 200px;
    margin: 0 auto;
}

.modal-bg-blink {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: url('images/blink.png') no-repeat center center;
    background-size: contain;
    z-index: -1;
    animation: rotateScale 10s linear infinite;
    pointer-events: none;
}

@keyframes rotateScale {
    0% {
        transform: translate(-50%, -50%) rotate(0deg) scale(0.8);
        opacity: 0.2;
    }

    50% {
        transform: translate(-50%, -50%) rotate(180deg) scale(1.2);
        opacity: 0.3;
    }

    100% {
        transform: translate(-50%, -50%) rotate(360deg) scale(0.8);
        opacity: 0.2;
    }
}

/* 登录弹窗样式 */
.login-modal .input-group {
    margin-bottom: 15px;
}

.login-modal input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    outline: none;
    box-sizing: border-box;
}

.login-modal input:focus {
    border-color: #F3C880;
}

.login-footer {
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
    font-size: 0.9rem;
}

.register-link {
    color: #E95A2E;
    text-decoration: none;
}


@media screen and (min-width: 640px) {
    .bg-decor {
        display: none;
    }

    .lottery-container {
        width: 560px;
        height: 718px;
    }

    .lottery-box {
        width: 450px;
        height: 450px;
        margin-top: 55px;
    }

    .prize-name {
        font-size: 16px;
    }

    .prize-icon img,
    .prize-gift img {
        width: 88px;
    }

    .pointer {
        width: 150px;
        height: 197px;
    }

    .pointer-box {
        width: 125px;
        height: 125px;
    }

    .record-container {
        width: 560px;
        height: 351px;
    }

    #rulesModal .modal-content {
        max-width: 560px;
    }

    .rules-content {
        max-height: 460px;
    }
}

.miniside {
    z-index: 99;
    position: fixed;
    bottom: 10px;
    margin-top: -100px;
    right: 10px;
    width: 56px;
}

.miniside .miniside-btn {
    position: relative;
    width: 56px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: #fff;
    box-shadow: 0 3px 9px rgba(0, 0, 0, .24);
    border-radius: 56px;
    padding: .5rem 0;
    text-decoration: none;
}

.miniside .miniside-btn p {
    font-size: 12px;
    color: rgba(0, 0, 0, .8);
    text-align: center;
    margin: 0;
    padding-top: .3rem;
}

.miniside .ricon {
    width: 38px;
    height: 38px;
    background-image: url(/public/static/fs25/images/miniapp/srv_icon.png);
    background-size: contain;
    background-repeat: no-repeat;
}

@media screen and (min-width: 640px) {
    .miniside {
        right: 50%;
        margin-right: -310px;
    }
}