/* Lucky wheel */

.lucky-wheel-list-section {
    padding-top: 10px;
}

.wheel-list-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.wheel-list-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 100%;
    color: #111827;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 8px 22px rgba(15, 23, 42, .06);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.wheel-list-card:hover {
    color: #111827;
    text-decoration: none;
    border-color: rgba(47, 143, 91, .42);
    box-shadow: 0 14px 30px rgba(15, 23, 42, .11);
    transform: translateY(-3px);
}

.wheel-list-card__media {
    position: relative;
    overflow: hidden;
    background: #f3f7f4;
}

.wheel-list-card__img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    transition: transform .22s ease, filter .22s ease;
}

.wheel-list-card:hover .wheel-list-card__img {
    transform: scale(1.04);
    filter: saturate(1.04) brightness(.94);
}

.wheel-list-card__code {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    padding: 5px 9px;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    background: #2f8f5b;
    border-radius: 8px;
    box-shadow: 0 8px 18px rgba(15, 23, 42, .16);
}

.wheel-list-card__overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    background: rgba(17, 24, 39, .42);
    opacity: 0;
    transition: opacity .18s ease;
}

.wheel-list-card__overlay i {
    font-size: 24px;
}

.wheel-list-card:hover .wheel-list-card__overlay {
    opacity: 1;
}

.wheel-list-card__panel {
    padding: 14px 14px 0;
}

.wheel-list-card__title {
    margin: 0 0 12px;
    color: #111827;
    font-size: 17px;
    font-weight: 850;
    line-height: 1.32;
    text-transform: uppercase;
}

.wheel-list-card__meta {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.wheel-list-card__meta li {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
    padding: 9px 10px;
    color: #4b5563;
    background: #f8faf9;
    border: 1px solid #edf2ee;
    border-radius: 8px;
}

.wheel-list-card__meta i {
    color: #2f8f5b;
    font-size: 12px;
}

.wheel-list-card__meta span {
    font-weight: 700;
}

.wheel-list-card__meta strong {
    color: #111827;
    font-weight: 850;
    white-space: nowrap;
}

.wheel-list-card__actions {
    margin-top: auto;
    padding: 14px;
}

.wheel-list-card__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    color: #fff;
    font-weight: 850;
    background: #2f8f5b;
    border: 1px solid #2f8f5b;
    border-radius: 8px;
    transition: background .18s ease, border-color .18s ease;
}

.wheel-list-card:hover .wheel-list-card__btn {
    background: #206846;
    border-color: #206846;
}

.lucky-wheel-container {
    margin: 28px 0 34px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 10px 26px rgba(15, 23, 42, .07);
    overflow: hidden;
}

.wheel-page {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(340px, 480px);
    align-items: stretch;
}

.wheel-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    padding: 30px;
}

.wheel-title {
    margin: 0 0 14px;
    color: #111827;
    font-size: clamp(26px, 3vw, 40px);
    font-weight: 900;
    line-height: 1.15;
    text-transform: uppercase;
}

.wheel-description {
    margin: 0 0 18px;
    padding: 15px 16px;
    color: #4b5563;
    font-size: 15px;
    line-height: 1.65;
    background: #f8faf9;
    border: 1px solid #e5efe8;
    border-left: 4px solid #2f8f5b;
    border-radius: 10px;
}

.wheel-description p:last-child {
    margin-bottom: 0;
}

.wheel-price {
    display: inline-flex;
    align-items: baseline;
    gap: 8px;
    width: fit-content;
    padding: 10px 13px;
    color: #4b5563;
    font-size: 15px;
    font-weight: 800;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 10px;
}

.wheel-price span {
    color: #dc2626;
    font-size: 23px;
    font-weight: 950;
}

.wheel-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin-top: 20px;
}

.spin-count {
    display: inline-flex;
    align-items: center;
    height: 48px;
    overflow: hidden;
    background: #fff;
    border: 1px solid #dbe7df;
    border-radius: 10px;
}

.spin-count-btn {
    width: 46px;
    height: 48px;
    color: #2f8f5b;
    font-size: 24px;
    font-weight: 900;
    line-height: 1;
    background: #f3f7f4;
    border: 0;
    cursor: pointer;
    transition: color .18s ease, background .18s ease;
}

.spin-count-btn:hover {
    color: #fff;
    background: #2f8f5b;
}

.spin-count-input {
    width: 58px;
    height: 48px;
    color: #111827;
    font-size: 18px;
    font-weight: 850;
    text-align: center;
    background: #fff;
    border: 0;
    border-left: 1px solid #e5efe8;
    border-right: 1px solid #e5efe8;
    -moz-appearance: textfield;
}

.spin-count-input:focus {
    outline: none;
}

.spin-count-input::-webkit-inner-spin-button,
.spin-count-input::-webkit-outer-spin-button {
    margin: 0;
    -webkit-appearance: none;
}

.wheel-spin-btn,
.wheel-btn--spin {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 48px;
    padding: 12px 24px;
    color: #fff;
    font-size: 16px;
    font-weight: 900;
    background: #2f8f5b;
    border: 1px solid #2f8f5b;
    border-radius: 10px;
    box-shadow: 0 10px 20px rgba(47, 143, 91, .22);
    cursor: pointer;
    transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
}

.wheel-spin-btn:hover,
.wheel-btn--spin:hover {
    color: #fff;
    background: #206846;
    box-shadow: 0 14px 26px rgba(32, 104, 70, .25);
    transform: translateY(-2px);
}

.wheel-spin-btn:disabled,
.wheel-btn--spin:disabled {
    opacity: .68;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.wheel-canvas-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 420px;
    padding: 34px;
    background:
        radial-gradient(circle at 50% 50%, rgba(47, 143, 91, .12), transparent 58%),
        linear-gradient(135deg, #f4fbf6, #eef6fb);
    border-left: 1px solid #e5e7eb;
    overflow: hidden;
}

.wheel-canvas-container::before {
    content: "";
    position: absolute;
    inset: 24px;
    border: 1px dashed rgba(47, 143, 91, .26);
    border-radius: 50%;
    pointer-events: none;
}

.wheel-image,
.wheel-canvas {
    position: relative;
    z-index: 1;
    width: min(100%, 390px);
    aspect-ratio: 1 / 1;
    object-fit: contain;
    transform-origin: center;
    transition: transform 5s cubic-bezier(.2, .8, .3, 1);
    filter: drop-shadow(0 18px 28px rgba(15, 23, 42, .18));
}

.wheel-pointer {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    color: #2f8f5b;
    background: #fff;
    border: 4px solid rgba(47, 143, 91, .18);
    border-radius: 50%;
    box-shadow: 0 12px 24px rgba(15, 23, 42, .18);
    transform: translate(-50%, -50%);
}

.wheel-pointer::before {
    content: "";
    position: absolute;
    top: -26px;
    left: 50%;
    width: 0;
    height: 0;
    border-right: 12px solid transparent;
    border-bottom: 30px solid #fff;
    border-left: 12px solid transparent;
    transform: translateX(-50%);
}

.wheel-pointer i {
    font-size: 24px;
    transform: rotate(-45deg);
}

.history-section,
.rules-section {
    margin: 34px 0;
}

.history-title,
.rules-title {
    margin: 0 0 16px;
    color: #111827;
    font-size: 22px;
    font-weight: 900;
    text-transform: uppercase;
}

.history-table-container,
.rules-content,
.no-history {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 8px 22px rgba(15, 23, 42, .06);
}

.history-table-container {
    overflow-x: auto;
}

.history-table {
    width: 100%;
    min-width: 760px;
    border-collapse: collapse;
}

.history-table th,
.history-table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid #edf2ee;
}

.history-table th {
    color: #374151;
    font-size: 13px;
    font-weight: 900;
    text-transform: uppercase;
    background: #f8faf9;
}

.history-table tbody tr:hover {
    background: #f8faf9;
}

.history-table tbody tr:last-child td {
    border-bottom: 0;
}

.history-item-reward {
    color: #206846;
    font-weight: 850;
}

.rules-content,
.no-history {
    padding: 20px;
    color: #4b5563;
    font-size: 15px;
    line-height: 1.7;
}

.no-history {
    border-style: dashed;
    text-align: center;
}

.rules-list {
    margin: 0;
    padding-left: 20px;
}

.rules-list li {
    margin-bottom: 10px;
}

.rules-list li:last-child {
    margin-bottom: 0;
}

.result-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(15, 23, 42, .58);
    opacity: 0;
    visibility: hidden;
    transition: opacity .22s ease, visibility .22s ease;
}

.result-modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    position: relative;
    width: min(100%, 500px);
    padding: 34px 28px;
    text-align: center;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, .24);
    opacity: 0;
    transform: translateY(18px);
    transition: transform .24s ease, opacity .24s ease;
}

.result-modal.active .modal-content {
    opacity: 1;
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 34px;
    height: 34px;
    color: #6b7280;
    background: #f3f4f6;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
}

.modal-close:hover {
    color: #fff;
    background: #2f8f5b;
}

.result-icon {
    display: grid;
    place-items: center;
    width: 84px;
    height: 84px;
    margin: 0 auto 16px;
    color: #fff;
    font-size: 34px;
    background: linear-gradient(135deg, #2f8f5b, #2e7daf);
    border-radius: 50%;
    box-shadow: 0 14px 28px rgba(47, 143, 91, .24);
}

.result-title {
    margin: 0 0 8px;
    color: #111827;
    font-size: 26px;
    font-weight: 900;
}

.result-desc {
    margin-bottom: 16px;
    color: #6b7280;
}

.result-reward {
    max-height: 260px;
    margin-bottom: 22px;
    padding: 14px;
    overflow: auto;
    color: #206846;
    font-size: 18px;
    font-weight: 850;
    line-height: 1.55;
    background: #f1f8f4;
    border: 1px solid #d8eadf;
    border-radius: 10px;
}

@media screen and (max-width: 1199px) {
    .wheel-list-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media screen and (max-width: 992px) {
    .wheel-list-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .wheel-page {
        grid-template-columns: 1fr;
    }

    .wheel-canvas-container {
        min-height: 360px;
        border-left: 0;
        border-bottom: 1px solid #e5e7eb;
    }

    .wheel-info {
        order: 2;
        text-align: center;
    }

    .wheel-price,
    .wheel-controls {
        margin-left: auto;
        margin-right: auto;
    }

    .wheel-description {
        text-align: left;
    }
}

@media screen and (max-width: 576px) {
    .wheel-list-grid {
        grid-template-columns: 1fr;
    }

    .lucky-wheel-container {
        margin: 20px 0 28px;
        border-radius: 10px;
    }

    .wheel-info {
        padding: 20px;
    }

    .wheel-description {
        font-size: 14px;
    }

    .wheel-price {
        width: 100%;
        justify-content: center;
        font-size: 14px;
    }

    .wheel-price span {
        font-size: 20px;
    }

    .wheel-controls {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
    }

    .spin-count {
        justify-content: center;
        width: 100%;
    }

    .wheel-spin-btn,
    .wheel-btn--spin {
        width: 100%;
    }

    .wheel-canvas-container {
        min-height: 300px;
        padding: 24px;
    }

    .wheel-image,
    .wheel-canvas {
        width: min(100%, 280px);
    }

    .wheel-pointer {
        width: 52px;
        height: 52px;
    }

    .wheel-pointer::before {
        top: -21px;
        border-right-width: 10px;
        border-bottom-width: 25px;
        border-left-width: 10px;
    }
}
