﻿.gril-lottery-panel {
    position: absolute;
    inset: 0;
    box-sizing: border-box;
    background: var(--btn_bg_s);
    overflow: hidden;
    color: #fff;
    z-index: 101;
}

.gril-lottery-close-btn,
.gril-lottery-select-close-btn,
.gril-lottery-record-close-btn {
    position: absolute;
    right: 6px;
    bottom: -14px;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    object-fit: contain;
    cursor: pointer;
    z-index: 20;
}

.gril-lottery-header,
.gril-lottery-select-header,
.gril-lottery-record-header {
    height: 6%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.22);
    border-bottom: 1px solid rgba(255,255,255,0.08);
    color: var(--btn_color_q);
}

.gril-lottery-title,
.gril-lottery-select-title,
.gril-lottery-record-title {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 3px;
}

.gril-lottery-body,
.gril-lottery-select-body,
.gril-lottery-record-body {
    box-sizing: border-box;
    padding: 10px;
    overflow: hidden;
}

.gril-lottery-body {
    height: 94%;
    position: relative;
    box-sizing: border-box;
    padding: 10px;
    overflow: hidden;
}

.gril-lottery-select-body {
    height: 94%;
    position: relative;
}

.gril-lottery-record-body {
    height: calc(94% - 34px);
    position: relative;
}

.gril-lottery-select-btn {
    width: 100%;
    height: 72px;
    border: 0;
    border-radius: 10px;
    padding: 10px 12px;
    background-color: transparent;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 12px;
    box-sizing: border-box;
    margin-top: 20%;
}

    .gril-lottery-select-btn:focus {
        outline: none;
    }

.gril-lottery-select-btn-empty {
    justify-content: center;
}

    .gril-lottery-select-btn-empty .gril-lottery-select-texts {
        display: none;
    }

.gril-lottery-select-icon {
    width: 72px;
    height: 72px;
    border-radius: 10px;
    object-fit: cover;
    /*background: rgba(0,0,0,0.2);*/
    flex: 0 0 auto;
}

.gril-lottery-select-btn-empty .gril-lottery-select-icon {
    margin: 0 auto;
}

.gril-lottery-select-texts {
    min-width: 0;
    flex: 1 1 auto;
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.gril-lottery-select-gril-name {
    font-size: 16px;
    color: #fff4cc;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gril-lottery-select-label {
    margin-top: 4px;
    font-size: 13px;
    color: rgba(255,255,255,0.78);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gril-lottery-select-name {
    margin-left: 6px;
    font-size: 13px;
    color: #6dff8b;
    font-weight: 700;
}

.gril-lottery-board {
    position: relative;
    margin-top: 12px;
    width: 100%;
    aspect-ratio: 1 / 1;
}

.gril-lottery-slot {
    position: absolute;
    width: 24%;
    aspect-ratio: 1 / 1;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid rgba(255,255,255,0.10);
    background: rgba(255,255,255,0.04);
    transition: border-color 0.12s ease, box-shadow 0.12s ease, transform 0.12s ease;
}

.gril-lottery-slot-active {
    border: 4px solid #ffc100;
    box-shadow: 0 0 0 2px rgba(255,212,79,0.24), 0 0 14px rgba(255,212,79,0.55);
    transform: scale(1.03);
}

.gril-lottery-slot-1 {
    left: 0;
    top: 0;
}

.gril-lottery-slot-2 {
    left: 25.3333%;
    top: 0;
}

.gril-lottery-slot-3 {
    left: 50.6666%;
    top: 0;
}

.gril-lottery-slot-4 {
    left: 76%;
    top: 0;
}

.gril-lottery-slot-5 {
    left: 76%;
    top: 25.3333%;
}

.gril-lottery-slot-6 {
    left: 76%;
    top: 50.6666%;
}

.gril-lottery-slot-7 {
    left: 76%;
    top: 76%;
}

.gril-lottery-slot-8 {
    left: 50.6666%;
    top: 76%;
}

.gril-lottery-slot-9 {
    left: 25.3333%;
    top: 76%;
}

.gril-lottery-slot-10 {
    left: 0;
    top: 76%;
}

.gril-lottery-slot-11 {
    left: 0;
    top: 50.6666%;
}

.gril-lottery-slot-12 {
    left: 0;
    top: 25.3333%;
}

.gril-lottery-slot-inner {
    width: 100%;
    height: 100%;
    position: relative;
}

.gril-lottery-slot-icon-wrap {
    width: 100%;
    aspect-ratio: 1 / 1;
    position: relative;
    overflow: hidden;
}

.gril-lottery-slot-icon {
    width: 90%;
    height: 90%;
    display: block;
    object-fit: cover;
    margin-left: 5%;
    margin-top: 5%;
}

.gril-lottery-slot-name {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    min-height: 22px;
    padding: 4px 6px;
    box-sizing: border-box;
    background: rgb(0 0 0 / 49%);
    color: #ffbf63;
    font-size: 12px;
    line-height: 1;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gril-lottery-slot-count {
    position: absolute;
    right: 2px;
    top: 2px;
    min-width: 24px;
    height: 24px;
    padding: 0 8px;
    border-radius: 12px;
    background: rgb(33 31 1 / 71%);
    color: #ffe082;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.gril-lottery-center {
    position: absolute;
    left: 25.3333%;
    top: 25.3333%;
    width: 49.3334%;
    height: 49.3334%;
    border-radius: 12px;
    background: rgb(255 251 0 / 17%);
    border: 1px solid rgb(255 255 255 / 25%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-sizing: border-box;
    padding: 12px;
}

.gril-lottery-cost-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 28px;
    flex-wrap: wrap;
}

.gril-lottery-cost-icon {
    width: 28px;
    height: 28px;
    object-fit: contain;
    border-radius: 6px;
}

.gril-lottery-cost-text {
    font-size: 13px;
    color: #ffd79b;
    white-space: nowrap;
}

.gril-lottery-draw-btn {
    min-width: 120px;
    height: 40px;
    border: 0;
    border-radius: 8px;
    background: #f1ae01;
    color: #231607;
    font-size: 16px;
    font-weight: 700;
}

    .gril-lottery-draw-btn:disabled {
        opacity: 0.65;
    }

.gril-lottery-skip-wrap {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: rgba(255,255,255,0.84);
}

.gril-lottery-footer {
    position: absolute;
    left: 10px;
    bottom: 10px;
    margin-top: 0;
    display: flex;
    justify-content: flex-start;
    z-index: 5;
}

.gril-lottery-record-btn {
    min-width: 100px;
    height: 38px;
    border: 0;
    border-radius: 8px;
    background: rgb(158 146 51 / 52%);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
}

.gril-lottery-busy-mask {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 30;
}

.gril-lottery-busy-text {
    min-width: 120px;
    padding: 10px 14px;
    border-radius: 10px;
    background: rgba(0,0,0,0.72);
    text-align: center;
    font-size: 15px;
    color: #fff4cc;
}

.gril-lottery-select-panel,
.gril-lottery-record-panel {
    position: absolute;
    inset: 0;
    box-sizing: border-box;
    background: var(--btn_bg_s);
    overflow: hidden;
    z-index: 40;
}

.gril-lottery-select-loop,
.gril-lottery-record-loop {
    width: 100%;
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    touch-action: pan-y;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.gril-lottery-select-empty,
.gril-lottery-record-empty {
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    text-align: center;
    color: rgba(255,255,255,0.72);
    font-size: 14px;
    pointer-events: none;
    justify-content: center;
}

.gril-lottery-select-card {
    width: 100%;
    height: 100%;
    border-radius: 10px;
    overflow: hidden;
    /*background: rgba(255,255,255,0.06);*/
}

.gril-lottery-select-card-inner {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.gril-lottery-select-card-icon {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.gril-lottery-select-card-name {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    min-height: 32px;
    padding: 4px 6px;
    box-sizing: border-box;
    background: rgba(0,0,0,0.48);
    color: #fff;
    font-size: 12px;
    line-height: 1.2;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gril-lottery-record-tip {
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.76);
    font-size: 13px;
    background: rgba(0,0,0,0.12);
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.gril-lottery-record-row {
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    border-radius: 8px;
    background: rgba(255,255,255,0.06);
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.gril-lottery-record-icon {
    width: 42px;
    height: 42px;
    border-radius: 8px;
    object-fit: cover;
    flex: 0 0 auto;
}

.gril-lottery-record-text {
    min-width: 0;
    flex: 1 1 auto;
    color: #fff;
    font-size: 13px;
    line-height: 1.5;
}

.gril-lottery-record-time {
    color: rgba(255,255,255,0.68);
    margin-right: 6px;
}

.gril-lottery-record-count {
    color: #ffe082;
    font-weight: 700;
    margin-left: 4px;
}
.gril-lottery-draw-btn.is-disabled {
    opacity: 0.65;
}

/* 追加：美人兑换面板样式（放到 gril_lottery.css 文件末尾） */

.gril-lottery-exchange-panel {
    position: absolute;
    inset: 0;
    box-sizing: border-box;
    background: var(--btn_bg_s);
    overflow: hidden;
    z-index: 45;
    color: #fff;
}

.gril-lottery-exchange-close-btn {
    position: absolute;
    right: 6px;
    bottom: -14px;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    object-fit: contain;
    cursor: pointer;
    z-index: 60;
}

.gril-lottery-exchange-header {
    height: 6%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.22);
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.gril-lottery-exchange-title {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 3px;
}

.gril-lottery-exchange-body {
    box-sizing: border-box;
    padding: 10px;
    height: 94%;
    overflow: hidden;
    position: relative;
}

/* loop 容器，遵循 loop.js 渲染滚动规范 */
.gril-lottery-exchange-loop {
    width: 100%;
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    touch-action: pan-y;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    display: grid;
    /*grid-template-columns: repeat(3, 1fr);*/
    gap: 10px;
    box-sizing: border-box;
    padding: 6px;
}

/* 单个兑换卡片：宽高比通过 loop.js 的 itemWidthRatio/itemHeightRatio 控制，这里规定内部布局 */
.gril-exchange-card {
    width: 100%;
    height: 100%;
    border-radius: 10px;
    overflow: hidden;
    background: rgba(255,255,255,0.1);
    display: flex;
    align-items: stretch;
    justify-content: center;
    box-sizing: border-box;
    padding: 6px;
}

.gril-exchange-card-inner {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    box-sizing: border-box;
}

.gril-exchange-thumb-wrap {
    width: 100%;
    /* 保持正方形缩略图，由外层 loop 控制宽高比，此处用 padding 方案自适应 */
    aspect-ratio: 1 / 1;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gril-exchange-thumb {
    width: 90%;
    height: 90%;
    object-fit: cover;
    display: block;
    border-radius: 6px;
}

.gril-exchange-action {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
}

/* 兑换按钮样式（点击整个 item 时由 loop.js onItemClick 触发） */
.gril-exchange-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 8px;
    background: linear-gradient(180deg, #f1ae01, #d18b01);
    color: #231607;
    font-weight: 700;
    cursor: pointer;
    user-select: none;
}

.gril-exchange-cost-icon {
    width: 22px;
    height: 22px;
    object-fit: contain;
    border-radius: 4px;
}

.gril-exchange-cost-number {
    font-size: 14px;
    line-height: 1;
}

/* 已拥有标识 */
.gril-exchange-have {
    max-height: 36px;
    object-fit: contain;
    opacity: 0.95;
}

/* 空状态覆盖样式 */
.gril-lottery-exchange-empty {
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    text-align: center;
    color: rgba(255,255,255,0.72);
    font-size: 14px;
    pointer-events: none;
    justify-content: center;
}