/*
 * WooCommerce Roulette Game — Premium Light UI
 * Scoped to .wcr-* classes to avoid theme conflicts.
 */

:root {
    --wcr-primary: #1769ff;
    --wcr-primary-dark: #0d4fd8;
    --wcr-primary-soft: #edf4ff;
    --wcr-accent: #6d4aff;
    --wcr-accent-soft: #f2efff;
    --wcr-ink: #101828;
    --wcr-text: #344054;
    --wcr-muted: #667085;
    --wcr-border: #e7ebf2;
    --wcr-surface: #ffffff;
    --wcr-bg: #f7f9fc;
    --wcr-success: #079455;
    --wcr-success-soft: #ecfdf3;
    --wcr-error: #d92d20;
    --wcr-error-soft: #fef3f2;
    --wcr-warning: #f79009;
    --wcr-shadow-sm: 0 1px 3px rgba(16, 24, 40, 0.05), 0 1px 2px rgba(16, 24, 40, 0.04);
    --wcr-shadow-md: 0 14px 40px rgba(16, 24, 40, 0.08);
    --wcr-shadow-lg: 0 24px 70px rgba(16, 24, 40, 0.14);
    --wcr-radius-xl: 28px;
    --wcr-radius-lg: 22px;
    --wcr-radius-md: 16px;
}

.wcr-container,
.wcr-container * {
    box-sizing: border-box;
}

.wcr-container {
    position: relative;
    isolation: isolate;
    max-width: 1240px;
    margin: 0 auto;
    padding: 28px;
    color: var(--wcr-text);
    direction: rtl;
    font-family: "IBM Plex Sans Arabic", "Tajawal", "Cairo", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

.wcr-container::before,
.wcr-container::after {
    content: "";
    position: absolute;
    z-index: -1;
    pointer-events: none;
    border-radius: 999px;
    filter: blur(2px);
}

.wcr-container::before {
    width: 320px;
    height: 320px;
    top: 70px;
    right: -100px;
    background: radial-gradient(circle, rgba(23, 105, 255, 0.10) 0%, rgba(23, 105, 255, 0) 70%);
}

.wcr-container::after {
    width: 280px;
    height: 280px;
    bottom: 70px;
    left: -80px;
    background: radial-gradient(circle, rgba(109, 74, 255, 0.08) 0%, rgba(109, 74, 255, 0) 72%);
}

.wcr-container svg,
.wcr-login-required svg {
    display: block;
    width: 100%;
    height: 100%;
}

/* Hero */
.wcr-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    padding: 34px 36px;
    margin-bottom: 22px;
    overflow: hidden;
    position: relative;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(248, 251, 255, 0.98)),
        var(--wcr-surface);
    border: 1px solid var(--wcr-border);
    border-radius: var(--wcr-radius-xl);
    box-shadow: var(--wcr-shadow-sm);
}

.wcr-hero::after {
    content: "";
    position: absolute;
    width: 240px;
    height: 240px;
    left: -80px;
    top: -90px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(23, 105, 255, 0.11), rgba(23, 105, 255, 0));
    pointer-events: none;
}

.wcr-hero-copy {
    max-width: 680px;
}

.wcr-eyebrow,
.wcr-section-kicker,
.wcr-card-label,
.wcr-modal-kicker {
    color: var(--wcr-primary);
    font-size: 13px;
    line-height: 1.4;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.wcr-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 11px;
    padding: 7px 10px;
    border-radius: 999px;
    background: var(--wcr-primary-soft);
}

.wcr-eyebrow-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--wcr-primary);
    box-shadow: 0 0 0 4px rgba(23, 105, 255, 0.10);
}

.wcr-hero h1 {
    margin: 0 0 9px;
    color: var(--wcr-ink);
    font-size: clamp(28px, 3vw, 42px);
    line-height: 1.3;
    font-weight: 800;
    letter-spacing: -0.025em;
}

.wcr-hero p {
    max-width: 620px;
    margin: 0;
    color: var(--wcr-muted);
    font-size: 16px;
    line-height: 1.9;
}

.wcr-balance-card {
    min-width: 250px;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 17px 18px;
    background: #fff;
    border: 1px solid #e2e8f2;
    border-radius: 20px;
    box-shadow: 0 12px 30px rgba(23, 105, 255, 0.08);
    position: relative;
    z-index: 1;
}

.wcr-balance-icon {
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
    padding: 12px;
    color: var(--wcr-primary);
    background: var(--wcr-primary-soft);
    border-radius: 15px;
}

.wcr-balance-content {
    min-width: 0;
}

.wcr-balance-label {
    display: block;
    margin-bottom: 2px;
    color: var(--wcr-muted);
    font-size: 12px;
    font-weight: 600;
}

.wcr-balance-value-row {
    display: flex;
    align-items: baseline;
    gap: 6px;
    white-space: nowrap;
}

.wcr-balance-value-row strong {
    color: var(--wcr-ink);
    font-size: 29px;
    line-height: 1.2;
    font-weight: 800;
}

.wcr-balance-value-row span {
    color: var(--wcr-primary);
    font-size: 13px;
    font-weight: 700;
}

/* Main game card */
.wcr-game-card,
.wcr-history-section,
.wcr-buy-points {
    background: var(--wcr-surface);
    border: 1px solid var(--wcr-border);
    border-radius: var(--wcr-radius-xl);
    box-shadow: var(--wcr-shadow-sm);
}

.wcr-game-card {
    padding: 28px;
}

.wcr-game-head,
.wcr-card-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.wcr-game-head {
    padding-bottom: 22px;
    border-bottom: 1px solid #edf0f5;
}

.wcr-game-head h2,
.wcr-card-heading h3,
.wcr-buy-points h3 {
    margin: 4px 0 0;
    color: var(--wcr-ink);
    font-weight: 800;
    letter-spacing: -0.02em;
}

.wcr-game-head h2 {
    font-size: 25px;
}

.wcr-game-meta {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    flex-wrap: wrap;
}

.wcr-meta-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 36px;
    padding: 8px 11px;
    color: #475467;
    font-size: 12px;
    font-weight: 700;
    background: #f8fafc;
    border: 1px solid #e9edf3;
    border-radius: 999px;
}

.wcr-meta-pill svg {
    width: 16px;
    height: 16px;
}

.wcr-meta-cost {
    color: var(--wcr-primary);
    background: var(--wcr-primary-soft);
    border-color: #dce8ff;
}

.wcr-game-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(285px, 0.72fr);
    gap: 28px;
    align-items: stretch;
    padding-top: 28px;
}

/* Wheel */
.wcr-wheel-column {
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px 22px 10px;
    border: 1px solid #eef1f6;
    border-radius: 24px;
    background:
        radial-gradient(circle at 50% 44%, rgba(23, 105, 255, 0.09), rgba(23, 105, 255, 0) 46%),
        linear-gradient(180deg, #fbfdff 0%, #f8faff 100%);
    overflow: hidden;
}

.wcr-wheel-stage {
    width: min(100%, 540px);
    aspect-ratio: 1 / 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wcr-wheel-halo {
    position: absolute;
    inset: 8%;
    border-radius: 50%;
    background: #fff;
    border: 1px solid #e4eaf4;
    box-shadow:
        0 0 0 12px rgba(255, 255, 255, 0.8),
        0 24px 50px rgba(23, 105, 255, 0.11);
}

.wcr-wheel-halo::before,
.wcr-wheel-halo::after {
    content: "";
    position: absolute;
    inset: -11px;
    border: 1px dashed rgba(23, 105, 255, 0.15);
    border-radius: 50%;
}

.wcr-wheel-halo::after {
    inset: 7px;
    border-style: solid;
    border-color: rgba(109, 74, 255, 0.09);
}

.wcr-wheel-container {
    position: relative;
    z-index: 2;
    width: 500px;
    height: 500px;
    max-width: 100%;
    max-height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

#wcrCanvas {
    display: block;
    width: 500px;
    height: 500px;
    max-width: 100%;
    max-height: 100%;
    filter: drop-shadow(0 14px 28px rgba(24, 52, 104, 0.14));
}

.wcr-wheel-pointer {
    position: absolute;
    z-index: 10;
    top: 23px;
    left: 50%;
    width: 46px;
    height: 46px;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: #fff;
    border: 1px solid #dfe6f1;
    box-shadow: 0 10px 25px rgba(16, 24, 40, 0.14);
}

.wcr-wheel-pointer span {
    width: 0;
    height: 0;
    border-left: 9px solid transparent;
    border-right: 9px solid transparent;
    border-top: 14px solid var(--wcr-primary);
    transform: translateY(2px);
}

.wcr-spin-button-container {
    width: min(100%, 460px);
    margin-top: 10px;
}

.wcr-spin-btn {
    width: 100%;
    min-height: 68px;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 11px 13px;
    color: #fff;
    text-align: right;
    font: inherit;
    cursor: pointer;
    border: 0;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--wcr-primary) 0%, #2459e8 58%, var(--wcr-accent) 120%);
    box-shadow: 0 13px 30px rgba(23, 105, 255, 0.25);
    transition: transform 180ms ease, box-shadow 180ms ease, opacity 180ms ease;
    position: relative;
    overflow: hidden;
}

.wcr-spin-btn::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg, transparent 25%, rgba(255, 255, 255, 0.16) 45%, transparent 65%);
    transform: translateX(110%);
    transition: transform 500ms ease;
    pointer-events: none;
}

.wcr-spin-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 17px 34px rgba(23, 105, 255, 0.32);
}

.wcr-spin-btn:hover:not(:disabled)::after {
    transform: translateX(-110%);
}

.wcr-spin-btn:active:not(:disabled) {
    transform: translateY(0) scale(0.995);
}

.wcr-spin-btn:focus-visible,
.wcr-btn:focus-visible,
.wcr-modal-close:focus-visible,
.wcr-copy-coupon:focus-visible {
    outline: 3px solid rgba(23, 105, 255, 0.22);
    outline-offset: 3px;
}

.wcr-spin-btn:disabled {
    cursor: not-allowed;
    color: #98a2b3;
    background: #e9edf3;
    box-shadow: none;
}

.wcr-spin-button-icon {
    width: 42px;
    height: 42px;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.16);
}

.wcr-spin-btn:disabled .wcr-spin-button-icon {
    background: rgba(152, 162, 179, 0.10);
}

.wcr-spin-button-copy {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.wcr-spin-button-copy strong {
    color: inherit;
    font-size: 16px;
    line-height: 1.4;
    font-weight: 800;
}

.wcr-spin-button-copy small {
    color: rgba(255, 255, 255, 0.76);
    font-size: 11px;
    line-height: 1.4;
    font-weight: 500;
}

.wcr-spin-btn:disabled .wcr-spin-button-copy small {
    color: #98a2b3;
}

.wcr-spin-button-cost {
    padding: 8px 10px;
    white-space: nowrap;
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.12);
}

.wcr-spin-btn:disabled .wcr-spin-button-cost {
    color: #7a8699;
    border-color: #d7dde6;
    background: #f5f7fa;
}

/* Side information */
.wcr-info-column {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.wcr-status-card,
.wcr-how-card,
.wcr-trust-strip {
    border: 1px solid var(--wcr-border);
    border-radius: 20px;
    background: #fff;
}

.wcr-status-card {
    padding: 18px;
}

.wcr-status-card.is-ready {
    background: linear-gradient(180deg, #f8fffb 0%, #fff 100%);
    border-color: #d5f3e2;
}

.wcr-status-card.is-locked {
    background: linear-gradient(180deg, #fffafa 0%, #fff 100%);
    border-color: #f5d7d4;
}

.wcr-status-top {
    display: flex;
    align-items: center;
    gap: 11px;
}

.wcr-status-icon {
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    padding: 10px;
    color: var(--wcr-success);
    background: var(--wcr-success-soft);
    border-radius: 13px;
}

.is-locked .wcr-status-icon {
    color: var(--wcr-error);
    background: var(--wcr-error-soft);
}

.wcr-status-top span:not(.wcr-status-icon) {
    display: block;
    margin-bottom: 1px;
    color: var(--wcr-muted);
    font-size: 11px;
    font-weight: 600;
}

.wcr-status-top strong {
    display: block;
    color: var(--wcr-ink);
    font-size: 15px;
    font-weight: 800;
}

.wcr-status-card p {
    margin: 13px 0 0;
    color: var(--wcr-muted);
    font-size: 12px;
    line-height: 1.8;
}

.wcr-how-card {
    padding: 18px;
}

.wcr-card-label {
    display: block;
    margin-bottom: 15px;
    color: var(--wcr-ink);
    font-size: 14px;
}

.wcr-how-list {
    display: flex;
    flex-direction: column;
}

.wcr-how-item {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 11px;
    padding: 12px 0;
    position: relative;
}

.wcr-how-item + .wcr-how-item {
    border-top: 1px solid #f0f2f6;
}

.wcr-how-item > span {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--wcr-primary);
    font-size: 10px;
    font-weight: 800;
    background: var(--wcr-primary-soft);
    border-radius: 10px;
}

.wcr-how-item strong,
.wcr-how-item small {
    display: block;
}

.wcr-how-item strong {
    margin-bottom: 2px;
    color: var(--wcr-ink);
    font-size: 13px;
    font-weight: 800;
}

.wcr-how-item small {
    color: var(--wcr-muted);
    font-size: 10.5px;
    line-height: 1.6;
}

.wcr-trust-strip {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 10px;
    margin-top: auto;
    background: #f8fafc;
}

.wcr-trust-strip > div {
    display: flex;
    align-items: center;
    gap: 7px;
    min-height: 42px;
    padding: 8px 9px;
    background: #fff;
    border: 1px solid #edf0f4;
    border-radius: 12px;
}

.wcr-trust-strip span {
    width: 19px;
    height: 19px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--wcr-success);
    font-size: 10px;
    font-weight: 900;
    background: var(--wcr-success-soft);
    border-radius: 50%;
}

.wcr-trust-strip strong {
    color: #475467;
    font-size: 10.5px;
    font-weight: 700;
}

/* Messages */
.wcr-message {
    width: min(100%, 460px);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    margin: 14px auto 0;
    padding: 11px 13px;
    border-radius: 13px;
    font-size: 12px;
    line-height: 1.6;
    font-weight: 600;
}

.wcr-message-icon {
    flex: 0 0 22px;
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 900;
}

.wcr-message.wcr-error {
    color: #b42318;
    background: var(--wcr-error-soft);
    border: 1px solid #fecdca;
}

.wcr-message.wcr-error .wcr-message-icon {
    color: #fff;
    background: var(--wcr-error);
}

.wcr-message.wcr-success {
    color: #067647;
    background: var(--wcr-success-soft);
    border: 1px solid #abefc6;
}

/* Lower cards */
.wcr-lower-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.7fr);
    gap: 22px;
    margin-top: 22px;
}

.wcr-history-section {
    padding: 24px;
    min-width: 0;
}

.wcr-card-heading {
    margin-bottom: 17px;
}

.wcr-card-heading h3,
.wcr-buy-points h3 {
    font-size: 20px;
}

.wcr-history-note {
    padding: 7px 10px;
    color: var(--wcr-muted);
    font-size: 10px;
    font-weight: 700;
    background: #f8fafc;
    border: 1px solid #edf0f4;
    border-radius: 999px;
}

.wcr-history-table {
    overflow-x: auto;
    border: 1px solid #eaedf2;
    border-radius: 16px;
}

.wcr-history-table table {
    width: 100%;
    min-width: 620px;
    margin: 0;
    border: 0;
    border-collapse: collapse;
    background: #fff;
}

.wcr-history-table th,
.wcr-history-table td {
    text-align: right;
    vertical-align: middle;
    border: 0;
}

.wcr-history-table th {
    padding: 12px 15px;
    color: #667085;
    font-size: 10.5px;
    font-weight: 700;
    background: #f8fafc;
    border-bottom: 1px solid #eaedf2;
}

.wcr-history-table td {
    padding: 14px 15px;
    color: #475467;
    font-size: 12px;
    font-weight: 600;
    border-bottom: 1px solid #f0f2f5;
}

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

.wcr-history-table tbody tr {
    transition: background 160ms ease;
}

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

.wcr-prize-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    max-width: 220px;
    padding: 6px 9px;
    color: #175cd3;
    background: #eff8ff;
    border: 1px solid #d1e9ff;
    border-radius: 9px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wcr-prize-badge > span {
    flex: 0 0 7px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--wcr-primary);
}

.wcr-prize-badge.is-neutral {
    color: #475467;
    background: #f8fafc;
    border-color: #e4e7ec;
}

.wcr-prize-badge.is-neutral > span {
    background: #98a2b3;
}

.wcr-cost-cell {
    color: var(--wcr-ink);
    font-weight: 800;
}

.wcr-cost-cell small {
    color: var(--wcr-muted);
    font-size: 9px;
    font-weight: 600;
}

.wcr-spin-id {
    direction: ltr;
    display: inline-block;
    padding: 5px 8px;
    color: #475467;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 10px;
    font-weight: 700;
    background: #f8fafc;
    border-radius: 7px;
}

.wcr-no-data {
    padding: 34px 18px !important;
    text-align: center !important;
}

.wcr-no-data > * {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.wcr-empty-icon {
    width: 38px;
    height: 38px;
    display: flex !important;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    color: var(--wcr-primary);
    font-size: 19px;
    background: var(--wcr-primary-soft);
    border-radius: 12px;
}

.wcr-no-data strong {
    margin-bottom: 3px;
    color: var(--wcr-ink);
    font-size: 13px;
}

.wcr-no-data small {
    color: var(--wcr-muted);
    font-size: 10px;
    font-weight: 500;
}

.wcr-buy-points {
    min-height: 100%;
    padding: 25px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at 12% 10%, rgba(23, 105, 255, 0.11), rgba(23, 105, 255, 0) 37%),
        linear-gradient(145deg, #ffffff 0%, #f6f9ff 100%);
}

.wcr-buy-points::after {
    content: "";
    position: absolute;
    left: -50px;
    bottom: -65px;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    border: 24px solid rgba(23, 105, 255, 0.035);
}

.wcr-buy-points-icon {
    width: 48px;
    height: 48px;
    padding: 12px;
    margin-bottom: 26px;
    color: var(--wcr-primary);
    background: #fff;
    border: 1px solid #dfe8f8;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(23, 105, 255, 0.08);
}

.wcr-buy-points-copy {
    position: relative;
    z-index: 1;
}

.wcr-buy-points p {
    margin: 9px 0 22px;
    color: var(--wcr-muted);
    font-size: 12px;
    line-height: 1.8;
}

/* Buttons */
.wcr-btn {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 10px 16px;
    border: 0;
    border-radius: 13px;
    text-decoration: none !important;
    font: inherit;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.wcr-btn svg {
    width: 17px;
    height: 17px;
}

.wcr-btn-primary {
    color: #fff !important;
    background: linear-gradient(135deg, var(--wcr-primary) 0%, #2257e7 100%);
    box-shadow: 0 10px 22px rgba(23, 105, 255, 0.20);
}

.wcr-btn-primary:hover {
    color: #fff !important;
    transform: translateY(-1px);
    box-shadow: 0 13px 26px rgba(23, 105, 255, 0.26);
}

/* Prize modal */
.wcr-modal {
    display: none;
    position: fixed;
    z-index: 999999;
    inset: 0;
    padding: 20px;
    background: rgba(15, 23, 42, 0.44);
    backdrop-filter: blur(7px);
    -webkit-backdrop-filter: blur(7px);
}

.wcr-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: wcrFadeIn 180ms ease both;
}

.wcr-modal-content {
    width: min(100%, 470px);
    position: relative;
    overflow: hidden;
    padding: 34px;
    direction: rtl;
    color: var(--wcr-text);
    font-family: "IBM Plex Sans Arabic", "Tajawal", "Cairo", system-ui, sans-serif;
    background: #fff;
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 26px;
    box-shadow: var(--wcr-shadow-lg);
    animation: wcrModalIn 260ms cubic-bezier(.2, .8, .2, 1) both;
}

.wcr-modal-content::before {
    content: "";
    position: absolute;
    width: 260px;
    height: 260px;
    top: -180px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 50%;
    background: radial-gradient(circle, rgba(23, 105, 255, 0.18), rgba(23, 105, 255, 0));
}

.wcr-modal-close {
    position: absolute;
    z-index: 5;
    top: 14px;
    left: 14px;
    width: 36px;
    height: 36px;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #667085;
    cursor: pointer;
    border: 1px solid #eaecf0;
    border-radius: 11px;
    background: #fff;
    transition: background 150ms ease, color 150ms ease;
}

.wcr-modal-close:hover {
    color: var(--wcr-ink);
    background: #f8fafc;
}

.wcr-modal-decoration {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.wcr-modal-decoration span {
    position: absolute;
    width: 7px;
    height: 7px;
    border-radius: 2px;
    background: var(--wcr-primary);
    opacity: 0.18;
    transform: rotate(30deg);
}

.wcr-modal-decoration span:nth-child(1) { top: 65px; right: 42px; }
.wcr-modal-decoration span:nth-child(2) { top: 106px; left: 45px; background: var(--wcr-accent); transform: rotate(52deg); }
.wcr-modal-decoration span:nth-child(3) { top: 42px; right: 115px; background: var(--wcr-warning); transform: rotate(14deg); }

.wcr-modal-body {
    position: relative;
    z-index: 2;
    text-align: center;
}

.wcr-prize-icon {
    width: 72px;
    height: 72px;
    padding: 17px;
    margin: 4px auto 14px;
    color: var(--wcr-primary);
    background: linear-gradient(145deg, #edf4ff 0%, #f5f2ff 100%);
    border: 1px solid #dfe8ff;
    border-radius: 22px;
    box-shadow: 0 14px 28px rgba(23, 105, 255, 0.13);
}

.wcr-modal-kicker {
    display: block;
    margin-bottom: 4px;
}

.wcr-modal-title {
    margin: 0;
    color: var(--wcr-ink);
    font-size: 30px;
    line-height: 1.3;
    font-weight: 900;
}

.wcr-prize-name {
    margin: 12px 0 5px;
    color: var(--wcr-primary);
    font-size: 19px;
    line-height: 1.5;
    font-weight: 800;
}

.wcr-prize-desc {
    margin: 0 auto 20px;
    max-width: 330px;
    color: var(--wcr-muted);
    font-size: 12px;
    line-height: 1.8;
}

.wcr-coupon-code {
    margin: 19px 0;
    padding: 14px;
    text-align: right;
    background: #f8fafc;
    border: 1px solid #e6eaf0;
    border-radius: 15px;
}

.wcr-coupon-label {
    margin-bottom: 8px;
    color: var(--wcr-muted);
    font-size: 10px;
    font-weight: 700;
}

.wcr-coupon-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
}

.wcr-coupon-value {
    min-width: 0;
    padding: 10px 12px;
    direction: ltr;
    text-align: left;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--wcr-ink);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .04em;
    background: #fff;
    border: 1px dashed #cfd7e6;
    border-radius: 10px;
}

.wcr-copy-coupon {
    min-width: 68px;
    padding: 8px 11px;
    color: var(--wcr-primary);
    font: inherit;
    font-size: 10px;
    font-weight: 800;
    cursor: pointer;
    border: 1px solid #d7e5ff;
    border-radius: 10px;
    background: var(--wcr-primary-soft);
}

.wcr-modal-close-btn {
    width: 100%;
    margin-top: 2px;
}

/* Login required */
.wcr-login-required,
.wcr-login-required * {
    box-sizing: border-box;
}

.wcr-login-required {
    max-width: 620px;
    margin: 32px auto;
    padding: 48px 30px;
    text-align: center;
    direction: rtl;
    color: var(--wcr-text, #344054);
    font-family: "IBM Plex Sans Arabic", "Tajawal", "Cairo", system-ui, sans-serif;
    background: linear-gradient(145deg, #fff 0%, #f7faff 100%);
    border: 1px solid #e4eaf2;
    border-radius: 26px;
    box-shadow: 0 16px 45px rgba(16, 24, 40, 0.08);
}

.wcr-login-icon {
    width: 58px;
    height: 58px;
    padding: 14px;
    margin: 0 auto 16px;
    color: #1769ff;
    background: #edf4ff;
    border-radius: 18px;
}

.wcr-login-required h3 {
    margin: 6px 0 8px;
    color: #101828;
    font-size: 24px;
    font-weight: 800;
}

.wcr-login-required p {
    max-width: 430px;
    margin: 0 auto 22px;
    color: #667085;
    font-size: 13px;
    line-height: 1.8;
}

/* Motion */
@keyframes wcrFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes wcrModalIn {
    from { opacity: 0; transform: translateY(14px) scale(.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.wcr-spinning .wcr-wheel-halo {
    box-shadow:
        0 0 0 12px rgba(255, 255, 255, 0.9),
        0 26px 58px rgba(23, 105, 255, 0.18);
}

@media (prefers-reduced-motion: reduce) {
    .wcr-container *,
    .wcr-modal * {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}

/* Responsive */
@media (max-width: 1024px) {
    .wcr-game-layout,
    .wcr-lower-grid {
        grid-template-columns: 1fr;
    }

    .wcr-info-column {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .wcr-trust-strip {
        grid-column: 1 / -1;
    }

    .wcr-buy-points {
        min-height: 250px;
    }
}

@media (max-width: 768px) {
    .wcr-container {
        padding: 14px;
    }

    .wcr-hero {
        align-items: stretch;
        flex-direction: column;
        padding: 24px;
        border-radius: 22px;
    }

    .wcr-hero h1 {
        font-size: 30px;
    }

    .wcr-hero p {
        font-size: 14px;
    }

    .wcr-balance-card {
        min-width: 0;
        width: 100%;
    }

    .wcr-game-card {
        padding: 18px;
        border-radius: 22px;
    }

    .wcr-game-head,
    .wcr-card-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .wcr-game-layout {
        padding-top: 18px;
        gap: 18px;
    }

    .wcr-wheel-column {
        padding: 14px 10px 10px;
        border-radius: 20px;
    }

    .wcr-wheel-stage {
        width: min(100%, 460px);
    }

    .wcr-wheel-container {
        width: 430px;
        height: 430px;
    }

    #wcrCanvas {
        width: 430px;
        height: 430px;
    }

    .wcr-wheel-pointer {
        top: 17px;
        width: 40px;
        height: 40px;
        border-radius: 12px;
    }

    .wcr-info-column {
        grid-template-columns: 1fr;
    }

    .wcr-trust-strip {
        grid-column: auto;
    }

    .wcr-history-section,
    .wcr-buy-points {
        padding: 20px;
        border-radius: 22px;
    }
}

@media (max-width: 520px) {
    .wcr-container {
        padding: 8px;
    }

    .wcr-hero {
        padding: 20px;
        margin-bottom: 14px;
    }

    .wcr-eyebrow {
        font-size: 11px;
    }

    .wcr-hero h1 {
        font-size: 26px;
    }

    .wcr-balance-value-row strong {
        font-size: 25px;
    }

    .wcr-game-card {
        padding: 14px;
    }

    .wcr-game-head h2 {
        font-size: 21px;
    }

    .wcr-game-meta {
        width: 100%;
    }

    .wcr-meta-pill {
        flex: 1 1 auto;
        justify-content: center;
    }

    .wcr-wheel-column {
        padding: 10px 5px 8px;
    }

    .wcr-wheel-stage {
        width: 100%;
    }

    .wcr-wheel-container {
        width: min(100%, 360px);
        height: auto;
        aspect-ratio: 1 / 1;
    }

    #wcrCanvas {
        width: 100% !important;
        height: auto !important;
        aspect-ratio: 1 / 1;
    }

    .wcr-wheel-pointer {
        top: 8px;
        width: 36px;
        height: 36px;
    }

    .wcr-wheel-pointer span {
        border-left-width: 8px;
        border-right-width: 8px;
        border-top-width: 12px;
    }

    .wcr-spin-button-container {
        padding: 0 4px;
        margin-top: 6px;
    }

    .wcr-spin-btn {
        min-height: 62px;
        grid-template-columns: 38px minmax(0, 1fr) auto;
        gap: 9px;
        border-radius: 16px;
    }

    .wcr-spin-button-icon {
        width: 38px;
        height: 38px;
        padding: 9px;
    }

    .wcr-spin-button-copy strong {
        font-size: 14px;
    }

    .wcr-spin-button-copy small {
        display: none;
    }

    .wcr-spin-button-cost {
        padding: 7px 8px;
        font-size: 9.5px;
    }

    .wcr-status-card,
    .wcr-how-card {
        padding: 15px;
    }

    .wcr-lower-grid {
        gap: 14px;
        margin-top: 14px;
    }

    .wcr-history-section,
    .wcr-buy-points {
        padding: 16px;
    }

    .wcr-history-note {
        display: none;
    }

    .wcr-buy-points-icon {
        margin-bottom: 18px;
    }

    .wcr-modal-content {
        padding: 29px 20px 22px;
        border-radius: 22px;
    }

    .wcr-modal-title {
        font-size: 27px;
    }
}

/* Runtime states */
body.wcr-modal-open {
    overflow: hidden;
}

.wcr-spin-btn.is-spinning .wcr-spin-button-icon {
    animation: wcrSpinIcon 900ms linear infinite;
}

.wcr-spin-btn.is-spinning:disabled {
    color: #fff;
    background: linear-gradient(135deg, #1769ff 0%, #2459e8 58%, #6d4aff 120%);
    box-shadow: 0 13px 30px rgba(23, 105, 255, 0.22);
    opacity: .9;
}

.wcr-spin-btn.is-spinning:disabled .wcr-spin-button-icon {
    color: #fff;
    background: rgba(255, 255, 255, 0.16);
}

.wcr-spin-btn.is-spinning:disabled .wcr-spin-button-copy small {
    color: rgba(255, 255, 255, 0.74);
}

.wcr-spin-btn.is-spinning:disabled .wcr-spin-button-cost {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.12);
}

@keyframes wcrSpinIcon {
    to { transform: rotate(-360deg); }
}
