:root {
    --lw-brand: #154a30;
    --lw-brand-hover: #1d6340;
    --lw-brand-soft: rgba(21, 74, 48, 0.12);
    --lw-brand-border: rgba(21, 74, 48, 0.22);
    --lw-brand-focus: rgba(21, 74, 48, 0.14);
}

.lucky-wheel-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
    font-family: 'Tahoma', 'Arial', sans-serif;
    direction: rtl;
}

.lucky-wheel-row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
    justify-content: center;
}

.lucky-wheel-column {
    padding: 0 15px;
    box-sizing: border-box;
}

.wheel-column {
    flex: 0 0 100%;
    max-width: 100%;
    transition: all 0.5s ease;
}

.wheel-column.with-prize {
    flex: 0 0 60%;
    max-width: 60%;
}

.prize-result-column {
    flex: 0 0 40%;
    max-width: 40%;
    display: flex;
    align-items: center;
}

.lucky-wheel-wrapper {
    position: relative;
    margin: 0 auto;
    width: 500px;
    height: 500px;
}

.lucky-wheel {
    position: relative;
    width: 100%;
    height: 100%;
}

.wheel-image-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    /* سایه بسیار شدیدتر برای کل گردونه */
    filter: drop-shadow(0px 6px 8px rgba(0, 0, 0, 0.8));
}

.wheel-image {
    width: 100%;
    height: 100%;
    transition: transform 5s cubic-bezier(0.17, 0.67, 0.21, 0.99);
}

/* استایل برای لوگوی وسط گردونه */
.wheel-center-logo {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background-color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
    /* سایه بسیار شدیدتر برای لوگو */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.7);
}

.logo-image {
    width: 80%;
    height: 80%;
    object-fit: contain;
}

.wheel-pointer {
    position: absolute;
    top: 48%;
    left: 96%;
    width: 0;
    height: 0;
    border-left: 15px solid transparent;
    border-right: 15px solid transparent;
    border-top: 30px solid var(--lw-brand);
    transform: translateX(-50%);
    z-index: 3;
    transform: rotate(90deg);
    /* سایه بسیار شدیدتر برای اشاره‌گر */
    filter: drop-shadow(3px 3px 2px rgba(0, 0, 0, 0.8));
}

.prize-result-box {
    background-color: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    /* سایه بسیار شدیدتر برای باکس نتیجه */
    box-shadow: 0 5px 8px rgba(0, 0, 0, 0.6);
    width: 100%;
    text-align: center;
}

.prize-result-box h3 {
    color: var(--lw-brand);
    margin-top: 0;
    font-size: 24px;
}

.prize-message-inline {
    font-size: 18px;
    margin: 15px 0;
    line-height: 1.6;
}

.spin-button {
    margin-top: 20px;
    padding: 10px 20px;
    font-size: 16px;
    background-color: var(--lw-brand);
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
    font-weight: bold;
    /* سایه بسیار شدیدتر برای دکمه */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.7);
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.spin-button:hover {
    background-color: var(--lw-brand-hover);
}

.spin-button:disabled {
    background-color: #95a5a6;
    cursor: not-allowed;
}

.lw-otp-modal__submit {
    margin-top: 0.85rem;
    padding: 10px 20px;
    font-size: 16px;
    background-color: var(--lw-brand);
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    width: 100%;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.25);
}

.lw-otp-modal__submit:hover:not(:disabled) {
    background-color: var(--lw-brand-hover);
}

.lw-otp-modal__submit:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.lucky-wheel-login-message,
.lucky-wheel-message {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    /* سایه بسیار شدیدتر برای پیام‌ها */
    box-shadow: 0 5px 8px rgba(0, 0, 0, 0.6);
    text-align: center;
}

.lucky-wheel-login-button {
    display: inline-block;
    padding: 10px 20px;
    background-color: var(--lw-brand);
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    margin-top: 10px;
    font-weight: bold;
    /* سایه بسیار شدیدتر برای دکمه ورود */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.7);
}

.lucky-wheel-login-button:hover {
    background-color: var(--lw-brand-hover);
    text-decoration: none;
    color: #fff;
}

/* رسپانسیو */
@media (max-width: 992px) {
    .wheel-column.with-prize,
    .prize-result-column {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    .prize-result-column {
        margin-top: 30px;
    }
    
    .lucky-wheel-wrapper {
        width: 400px;
        height: 400px;
    }
    
    .wheel-center-logo {
        width: 80px;
        height: 80px;
    }
}

@media (max-width: 576px) {
    .lucky-wheel-wrapper {
        width: 300px;
        height: 300px;
    }
    
    .wheel-center-logo {
        width: 60px;
        height: 60px;
    }
}

/* ——— مودال OTP ——— */
body.lw-otp-open {
    overflow: hidden;
}

.lw-otp-modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: grid;
    place-items: center;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.22s ease, visibility 0.22s ease;
}

.lw-otp-modal.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.lw-otp-modal__backdrop {
    position: absolute;
    inset: 0;
    border: 0;
    background: rgba(8, 8, 8, 0.62);
    backdrop-filter: blur(4px);
    cursor: pointer;
}

.lw-otp-modal__panel {
    position: relative;
    width: min(100%, 420px);
    border-radius: 16px;
    background: linear-gradient(160deg, #ffffff 0%, #f8f9fa 100%);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
    padding: 1.35rem 1.25rem 1.5rem;
    color: #333;
    text-align: center;
    transform: translateY(16px) scale(0.98);
    transition: transform 0.22s ease;
    border: 1px solid var(--lw-brand-border);
}

.lw-otp-modal.is-open .lw-otp-modal__panel {
    transform: translateY(0) scale(1);
}

.lw-otp-modal__close {
    position: absolute;
    top: 0.85rem;
    left: 0.85rem;
    width: 34px;
    height: 34px;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    background: #fff;
    color: #666;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
}

.lw-otp-modal__badge {
    display: inline-flex;
    margin-bottom: 0.65rem;
    padding: 0.25rem 0.7rem;
    border-radius: 999px;
    background: var(--lw-brand-soft);
    color: var(--lw-brand);
    font-size: 0.78rem;
    font-weight: 700;
}

.lw-otp-modal__lead,
.lw-otp-verification__subtitle {
    margin: 0.45rem 0 0;
    color: #666;
    font-size: 0.9rem;
    line-height: 1.8;
}

.lw-otp-modal h2,
.lw-otp-verification__title {
    margin: 0;
    font-size: 1.2rem;
    color: var(--lw-brand);
}

.lw-otp-modal__form {
    margin-top: 1.1rem;
}

.lw-otp-modal__field {
    display: block;
    padding: 0.2rem 0.75rem;
    border: 1px solid #e0e0e0;
    border-radius: 14px;
    background: #fff;
}

.lw-otp-modal__phone-input {
    display: block;
    width: 100%;
    box-sizing: border-box;
    border: 0;
    background: transparent;
    padding: 0.75rem 0;
    font: inherit;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-align: center;
    direction: ltr;
    outline: none;
}

.lw-otp-modal__phone-input::placeholder {
    text-align: center;
    color: #9aa0a6;
    font-weight: 600;
}

.lw-otp-modal__error {
    margin: 0.65rem 0 0;
    color: #c62828;
    font-size: 0.85rem;
}

.lw-otp-modal__back {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 0.5rem;
    border: 0;
    background: transparent;
    color: #666;
    font: inherit;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
}

.lw-otp-verification__grid {
    display: flex;
    gap: 0.55rem;
    justify-content: center;
    margin: 1.2rem 0 0.9rem;
    position: relative;
}

.lw-otp-autofill-input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.lw-otp-cell {
    width: 46px;
    height: 54px;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    background: #fff;
    color: #333;
    font-size: 1.35rem;
    font-weight: 800;
    text-align: center;
    outline: none;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease,
        color 0.2s ease,
        transform 0.2s ease,
        opacity 0.2s ease;
}

.lw-otp-cell--enter {
    animation: lwOtpCellIn 0.2s ease backwards;
}

@keyframes lwOtpCellIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.lw-otp-cell:focus {
    border-color: var(--lw-brand);
    box-shadow: 0 0 0 3px var(--lw-brand-focus);
}

.lw-otp-cell--filled {
    border-color: var(--lw-brand-border);
}

.lw-otp-cell--verifying {
    border-color: var(--lw-brand-border);
    pointer-events: none;
}

.lw-otp-cell--success {
    border-color: #43a047;
    background: rgba(67, 160, 71, 0.14);
    color: #2e7d32;
    box-shadow: 0 0 0 3px rgba(67, 160, 71, 0.16);
}

.lw-otp-cell--error {
    border-color: #e53935;
    background: rgba(229, 57, 53, 0.12);
    color: #c62828;
}

.lw-otp-shake {
    animation: lwOtpShake 0.45s ease;
}

@keyframes lwOtpShake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-6px); }
    40% { transform: translateX(6px); }
    60% { transform: translateX(-4px); }
    80% { transform: translateX(4px); }
}

.lw-otp-verification__status {
    margin: 0.35rem 0 0;
    color: #666;
    font-size: 0.82rem;
}

.lw-otp-verification__resend {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    color: #666;
    font-size: 0.82rem;
}

.lw-otp-verification__resend-btn {
    border: 0;
    background: transparent;
    color: var(--lw-brand);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.lw-otp-verification__resend-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

@media (max-width: 480px) {
    .lw-otp-modal__panel {
        padding: 1.1rem 0.95rem 1.25rem;
    }

    .lw-otp-cell {
        width: 42px;
        height: 50px;
        font-size: 1.2rem;
    }
}
