/* === 公共 === */
.zm-lottery{text-align:center;padding:20px;margin:16px 0}
.zm-lottery h4{margin:0 0 15px;font-size:20px}
.zm-lottery .zm-lt-cost{font-size:13px;color:#999;margin:8px 0}
.zm-lottery .zm-lt-btn{display:inline-block;padding:10px 40px;border:none;border-radius:25px;background:linear-gradient(135deg,#e74c3c,#f39c12);color:#fff;font-size:16px;font-weight:600;cursor:pointer;transition:all .3s;margin-top:12px}
.zm-lottery .zm-lt-btn:hover{transform:scale(1.05);box-shadow:0 4px 20px rgba(231,76,60,.4)}
.zm-lottery .zm-lt-btn:disabled{opacity:.6;cursor:not-allowed;transform:none}
.zm-lottery .zm-lt-result{margin-top:16px;padding:12px;border-radius:8px;background:#fff3cd;color:#856404;font-size:15px;display:none}
.zm-lottery .zm-lt-result.show{display:block;animation:zm-fadeIn .5s}
@keyframes zm-fadeIn{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}

/* === 大转盘 === */
.zm-turntable-wrap{position:relative;width:320px;height:320px;padding: 0; margin:0 auto}
.zm-turntable {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 288px;
    height: 288px;
    /* 负 margin 值 = (宽度 + 左右边框) / 2 = (288 + 6×2) / 2 = 150px */
    margin-left: -150px;
    margin-top: -150px;
    border-radius: 50%;
    border: 6px solid #e74c3c;
    box-shadow: 0 0 0 4px #f39c12, 0 0 30px rgba(0,0,0,.2);
    /* transition 仅作用于 transform，旋转时平滑动画 */
    transition: transform 4s cubic-bezier(.17,.67,.12,.99);
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: content-box;   /* 确保宽高不包含 border，方便计算负 margin */
    /* 移除 transform 属性，因为它将专用于旋转 */
}
.zm-turntable canvas{z-index:1;border-radius:50%;display:block}
.zm-turntable-label{position:absolute;font-size:12px;font-weight:600;text-align:center;color:#fff;text-shadow:0 1px 2px rgba(0,0,0,.3);line-height:1.2;max-width:80px;word-break:break-word;z-index:6;pointer-events:none}
.zm-turntable-pointer{position:absolute;top:-8px;left:50%;transform:translateX(-50%);width:0;height:0;border-left:16px solid transparent;border-right:16px solid transparent;border-top:30px solid #e74c3c;z-index:10;filter:drop-shadow(0 2px 4px rgba(0,0,0,.3))}
.zm-turntable-center{position:absolute;top:50%;left:50%;width:60px;height:60px;margin-left:-30px;margin-top:-30px;border-radius:50%;background:linear-gradient(135deg,#e74c3c,#c0392b);color:#fff;font-size:13px;font-weight:700;display:flex;align-items:center;justify-content:center;cursor:pointer;z-index:5;box-shadow:0 2px 10px rgba(0,0,0,.3);transition:transform .2s}
.zm-turntable-center:hover{transform:scale(1.1)}
.zm-turntable.spinning{pointer-events:none}

/* 灯泡装饰 */
/* 灯泡装饰 */
.zm-turntable-wrap::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 294px;        /* 内容区 294px + 左右边框 3px*2 = 300px 外径 */
    height: 294px;
    border-radius: 50%;
    border: 3px dotted #f39c12;
    animation: zm-lights 1s linear infinite;
    pointer-events: none;
    z-index: 2;          /* 位于转盘背景之上，但低于指针 (z-index:10) 和中心按钮 (z-index:5) */
}
@keyframes zm-lights{0%,100%{border-color:#f39c12}50%{border-color:#e74c3c}}

/* === 九宫格 === */
.zm-grid-wrap{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;max-width:340px;margin:0 auto}
.zm-grid-cell{aspect-ratio:1;border:2px solid #eee;border-radius:12px;display:flex;flex-direction:column;align-items:center;justify-content:center;background:#fff;transition:all .3s;cursor:default;padding:8px}
.zm-grid-cell .cell-icon{font-size:28px;margin-bottom:4px}
.zm-grid-cell .cell-name{font-size:12px;color:#333;font-weight:500}
.zm-grid-cell.active{border-color:#e74c3c;background:linear-gradient(135deg,#fff5f5,#ffe0e0);transform:scale(1.05);box-shadow:0 2px 12px rgba(231,76,60,.3)}
.zm-grid-cell.center-btn{background:linear-gradient(135deg,#e74c3c,#f39c12);color:#fff;font-size:16px;font-weight:700;cursor:pointer;border-color:#e74c3c;transition:transform .2s}
.zm-grid-cell.center-btn:hover{transform:scale(1.08)}
.zm-grid-cell.won{background:linear-gradient(135deg,#ffd700,#ffed4e);border-color:#ffd700;animation:zm-won-pulse 1s ease infinite}
@keyframes zm-won-pulse{0%,100%{box-shadow:0 0 0 0 rgba(255,215,0,.4)}50%{box-shadow:0 0 0 10px rgba(255,215,0,0)}}

/* === 抽奖历史 === */
.zm-lottery-history,.zm-lottery-winners{margin-top:16px}
.zm-lottery-history h4,.zm-lottery-winners h4{margin:0 0 16px;font-size:18px;display:flex;align-items:center;gap:8px}
.zm-lottery-history h4 .dashicons,.zm-lottery-winners h4 .dashicons{font-size:20px}
.zm-lt-table{width:100%;border-collapse:collapse;font-size:14px}
.zm-lt-table thead{background:#f5f5f5}
.zm-lt-table th,.zm-lt-table td{padding:10px;text-align:left;border-bottom:1px solid #eee}
.zm-lt-table th{font-weight:600;color:#333}
.zm-lt-table td{color:#666}
.zm-lt-table tbody tr:hover{background:#f9f9f9}
.zm-lt-pagination{display:flex;align-items:center;justify-content:center;gap:12px;margin-top:16px;padding-top:16px;border-top:1px solid #eee}
.zm-lt-pagination button{padding:6px 16px;border:1px solid #ddd;border-radius:4px;background:#fff;color:#333;cursor:pointer;transition:all .3s;font-size:13px}
.zm-lt-pagination button:hover:not(:disabled){background:#e74c3c;color:#fff;border-color:#e74c3c}
.zm-lt-pagination button:disabled{opacity:.5;cursor:not-allowed}
.zm-lt-page-info{font-size:13px;color:#666}

/* === 中奖公告 === */
.zm-lt-winners-scroll{max-height:300px;overflow-y:auto}
.zm-lt-winners-items{list-style:none;margin:0;padding:0}
.zm-lt-winners-items li{padding:12px;border-bottom:1px solid #eee;font-size:14px;color:#666;display:flex;align-items:center;gap:8px;transition:background .3s}
.zm-lt-winners-items li:hover{background:#f9f9f9}
.zm-lt-winners-items li:last-child{border-bottom:none}
.winner-icon{font-size:18px}
.winner-name{font-weight:600;color:#333}
.winner-prize{color:#e74c3c;font-weight:600}
.zm-lt-winners-scroll::-webkit-scrollbar{width:6px}
.zm-lt-winners-scroll::-webkit-scrollbar-track{background:#f1f1f1;border-radius:3px}
.zm-lt-winners-scroll::-webkit-scrollbar-thumb{background:#ccc;border-radius:3px}
.zm-lt-winners-scroll::-webkit-scrollbar-thumb:hover{background:#999}

/* 响应式 */
@media (max-width:768px){
    .zm-lt-table{font-size:12px}
    .zm-lt-table th,.zm-lt-table td{padding:8px 6px}
    .zm-lottery-history h4,.zm-lottery-winners h4{font-size:16px}
    .zm-lt-winners-items li{font-size:13px;padding:10px}
}
