/* Voucher Lottery - 前台样式 */

.vl-lottery-container {
    width: 100%;
    max-width: none;
    margin: 40px auto;
    padding: 30px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
}

.vl-lottery-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #ae99ca;
}

.vl-lottery-header h2 {
    color: #8667b0;
    font-size: 28px;
    margin: 0 0 10px 0;
    font-family: 'Work Sans', sans-serif;
}

.vl-lottery-subtitle {
    color: #666;
    font-size: 16px;
    margin: 0;
}

.vl-lottery-rules {
    background: #f8f6fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 25px;
    border-left: 4px solid #ae99ca;
}

.vl-lottery-rules p {
    margin: 0;
    color: #0c0c0c;
    font-size: 15px;
    line-height: 1.8;
}

.vl-lottery-remaining {
    text-align: center;
    margin-bottom: 25px;
    font-size: 16px;
    color: #0c0c0c;
}

.vl-lottery-remaining strong {
    color: #ae99ca;
    font-size: 24px;
    font-weight: 700;
}

.vl-lottery-products h3 {
    color: #8667b0;
    font-size: 20px;
    margin-bottom: 20px;
}

.vl-lottery-products-grid {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.vl-lottery-product-card {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #ae99ca;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.vl-lottery-product-name {
    font-size: 16px;
    font-weight: 600;
    color: #8667b0;
    margin-bottom: 8px;
}

.vl-lottery-product-discount {
    font-size: 18px;
    font-weight: 600;
    color: #ae99ca;
    margin-bottom: 8px;
}

.vl-lottery-product-stock {
    font-size: 14px;
    color: #666;
}

.vl-stock-count {
    color: #ae99ca;
    font-weight: 600;
}

.vl-lottery-action {
    text-align: center;
    margin: 30px 0;
}

.vl-lottery-name-input {
    margin-bottom: 15px;
}

.vl-lottery-container .vl-input {
    width: 100%;
    padding: 14px 28px;
    border: 0.5px solid #dddddd !important;
    border-radius: 4px;
    font-size: 15px;
    color: #0c0c0c;
    background: #fff;
    box-sizing: border-box;
    font-family: 'Work Sans', sans-serif;
}

.vl-lottery-container .vl-input:focus,
.vl-lottery-container .vl-input:active {
    outline: none !important;
    border-color: #ae99ca !important;
    box-shadow: 0 0 0 2px rgba(174, 153, 202, 0.2);
}

/* 移除浏览器默认蓝色边框 */
.vl-lottery-container .vl-input:focus-visible {
    outline: none !important;
}

.vl-lottery-btn {
    width: 100%;
    max-width: none;
    padding: 14px 28px;
    background: #ae99ca !important;
    color: #ffffff !important;
    border: 2px solid #ae99ca !important;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Work Sans', sans-serif;
}

.vl-lottery-btn:hover:not(:disabled) {
    background: #8667b0 !important;
    border-color: #8667b0 !important;
    color: #ffffff !important;
}

/* 中奖记录列表 */
.vl-lottery-records {
    width: 100%;
    max-width: none;
    margin-top: 40px;
    padding: 30px 25px;
    background: #f8f6fa;
    border-radius: 12px;
    border-top: 2px solid #ae99ca;
    border-left: none;
    overflow-x: auto;
}

.vl-lottery-records h3 {
    color: #8667b0;
    font-size: 18px;
    margin: 0 0 20px 0;
    padding-bottom: 15px;
    border-bottom: 1px solid #e7e7e7;
    min-width: 900px;
}

.vl-records-list {
    display: grid;
    gap: 15px;
    min-width: 900px;
}

.vl-record-item {
    display: grid;
    grid-template-columns: auto auto auto auto auto auto;
    align-items: center;
    gap: 20px;
    padding: 12px 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.vl-record-name {
    font-size: 14px;
    font-weight: 600;
    color: #8667b0;
}

.vl-record-ip {
    font-size: 13px;
    color: #999;
    font-family: monospace;
}

.vl-record-product {
    font-size: 15px;
    font-weight: 600;
    color: #8667b0;
}

.vl-record-discount {
    font-size: 14px;
    color: #ae99ca;
    font-weight: 500;
}

.vl-record-status {
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 4px;
    text-align: center;
}

.vl-record-time {
    font-size: 13px;
    color: #999;
}

.vl-record-time {
    font-size: 13px;
    color: #999;
    white-space: nowrap;
}

.vl-status-issued {
    background: #ae99ca;
    color: #fff;
}

.vl-status-used {
    background: #9ACA9E;
    color: #fff;
}

.vl-status-expired {
    background: #E57373;
    color: #fff;
}

.vl-record-time {
    font-size: 13px;
    color: #999;
    min-width: 140px;
}

/* 无记录提示 */
.vl-no-records {
    width: 100%;
    text-align: center;
    padding: 30px;
    color: #999;
    font-size: 15px;
}

.vl-record-download {
    padding: 8px 20px;
    background: #ae99ca;
    color: #fff !important;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
}

.vl-record-download:hover {
    background: #8667b0;
    color: #fff !important;
}

.vl-lottery-btn:disabled {
    background: #ddd !important;
    border-color: #ddd !important;
    cursor: not-allowed;
    opacity: 0.7;
}

.vl-lottery-btn.loading {
    opacity: 0.7;
    pointer-events: none;
}

.vl-lottery-result {
    margin-top: 20px;
    padding: 25px;
    border-radius: 8px;
    text-align: center;
    border: 2px solid #ae99ca;
}

.vl-lottery-result.won {
    background: rgba(174, 153, 202, 0.1);
}

.vl-lottery-result.won h3 {
    color: #8667b0;
    font-size: 22px;
    margin: 0 0 15px 0;
}

.vl-lottery-result.won p {
    color: #666;
    font-size: 16px;
    margin: 10px 0;
}

.vl-lottery-result.won .vl-product-name {
    font-size: 20px;
    font-weight: 600;
    color: #8667b0;
}

.vl-lottery-result.won .vl-discount {
    font-size: 18px;
    font-weight: 600;
    color: #ae99ca;
}

.vl-lottery-result.won .vl-ticket-code {
    font-size: 16px;
    color: #666;
    margin-top: 15px;
    padding: 10px;
    background: #f8f6fa;
    border-radius: 4px;
    display: inline-block;
}

.vl-lottery-result.lost {
    background: #f5f5f5;
    color: #666;
}

.vl-download-btn {
    display: inline-block;
    padding: 12px 30px;
    background: #ae99ca !important;
    color: #ffffff !important;
    border: 2px solid #ae99ca !important;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

.vl-download-btn:hover {
    background: #8667b0 !important;
    border-color: #8667b0 !important;
    color: #ffffff !important;
}

.vl-btn-row {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 20px;
}

.vl-btn-row .vl-lottery-btn,
.vl-btn-row .vl-download-btn,
.vl-btn-row .vl-redeem-btn {
    width: auto;
}

.vl-redeem-btn {
    display: inline-block;
    padding: 12px 30px;
    background: #ffffff !important;
    color: #ae99ca !important;
    border: 2px solid #ae99ca !important;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

.vl-redeem-btn:hover {
    background: #ae99ca !important;
    color: #ffffff !important;
}

.vl-voucher-image-container {
    margin: 20px 0;
    text-align: center;
}

.vl-voucher-image {
    max-width: 100%;
    height: auto;
    border: 2px solid #ae99ca;
    border-radius: 8px;
}

@media (max-width: 768px) {
    .vl-lottery-container {
        margin: 20px 10px;
        padding: 20px;
    }
    
    .vl-lottery-products-grid {
        grid-template-columns: 1fr;
    }
    
    .vl-lottery-btn {
        padding: 12px 20px;
        font-size: 15px;
    }
}

/* 兑奖券信息卡片 */
.vl-voucher-info {
    margin: 20px 0;
    padding: 25px;
    background: #f8f6fa;
    border-radius: 8px;
    border: 2px solid #ae99ca;
    text-align: center;
}

.vl-voucher-info h3 {
    color: #8667b0;
    font-size: 20px;
    margin: 0 0 20px 0;
}

.vl-voucher-image-container {
    margin: 20px 0;
    text-align: center;
}

.vl-voucher-image-preview {
    max-width: 100%;
    height: auto;
    border: 2px solid #ae99ca;
    border-radius: 8px;
}

.vl-voucher-card {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: left;
}

.vl-voucher-product,
.vl-voucher-discount,
.vl-voucher-expire,
.vl-voucher-nickname {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
}

.vl-voucher-product:last-child,
.vl-voucher-discount:last-child,
.vl-voucher-expire:last-child {
    border-bottom: none;
}

.vl-voucher-label {
    color: #666;
    font-size: 14px;
}

.vl-voucher-value {
    color: #0c0c0c;
    font-size: 15px;
}

.vl-notice {
    color: #999;
    font-size: 13px;
    margin-top: 15px;
}

/* ====== 赞助包集合卡片列表 (collections) ====== */

.vl-collections-container {
    width: 100%;
    max-width: none;
    margin: 30px auto;
}

.vl-collections-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 24px;
}

.vl-collections-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.3s;
}

.vl-collections-card:hover {
    box-shadow: 0 4px 30px rgba(0,0,0,0.15);
}

.vl-collections-card-header {
    background: #ae99ca;
    padding: 18px 20px;
    text-align: center;
}

.vl-collections-card-header h3 {
    color: #fff;
    font-size: 18px;
    margin: 0;
    font-weight: 500;
}

.vl-collections-products {
    padding: 16px 20px;
    flex: 1;
}

.vl-collections-product-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
    flex-wrap: wrap;
}

.vl-collections-product-item:last-child {
    border-bottom: none;
}

.vl-collections-product-name {
    flex: 1;
    min-width: 120px;
    color: #0c0c0c;
    font-size: 14px;
}

.vl-collections-product-discount {
    color: #8667b0;
    font-weight: 500;
    font-size: 14px;
    white-space: nowrap;
}

.vl-collections-product-stock {
    color: #999;
    font-size: 12px;
    white-space: nowrap;
}

.vl-collections-remaining {
    text-align: center;
    padding: 10px 20px;
    background: #f8f6fa;
    color: #666;
    font-size: 13px;
}

.vl-collections-remaining strong {
    color: #8667b0;
}

.vl-collections-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-top: 1px solid #f0f0f0;
}

.vl-collections-claim-btn {
    display: inline-block;
    padding: 10px 24px;
    background: #ae99ca;
    color: #fff;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.3s;
}

.vl-collections-claim-btn:hover {
    background: #8667b0;
    color: #fff;
}

.vl-collections-qr {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.vl-collections-qr img {
    display: block;
}

.vl-collections-qr-label {
    color: #999;
    font-size: 11px;
}

/* 响应式 */
@media (max-width: 768px) {
    .vl-collections-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .vl-collections-footer {
        flex-direction: column;
        gap: 12px;
    }
}
