/* KART GENEL */
.epw-spinwheel-box {
    max-width: 360px;
    margin: 20px auto;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 24px 48px rgba(0,0,0,.08);
    padding: 20px 20px 24px;
    font-family: inherit;
    display: grid;
    gap: 24px;
    position: relative;
    z-index: 1;
}

/* ÜST BAŞLIK BLOKU */
.epw-head-block {
    text-align: center;
    display: grid;
    gap: 6px;
}

.epw-title {
    font-size: 20px;
    font-weight: 600;
    color: #111;
    margin: 0;
}

.epw-subtext {
    font-size: 14px;
    color: #555;
    line-height: 1.4;
    margin: 0;
}

/* ÇARK BLOKU */
.epw-wheel-wrap {
    position: relative;
    width: 220px;
    margin: 8px auto 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 28px; /* başlık ile pointer arasında nefes */
}

.epw-wheel-pointer-arrow {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translate(-50%, -8px);
    z-index: 40;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.epw-wheel-pointer-head {
    width: 0;
    height: 0;
    border-left: 12px solid transparent;
    border-right: 12px solid transparent;
    border-top: 18px solid #000;
    filter: drop-shadow(0 2px 2px rgba(0,0,0,.4));
    border-radius: 2px;
}

/* SVG WRAP */
.epw-wheel-svg-wrap {
    width: 200px;
    height: 200px;
    position: relative;
    filter: drop-shadow(0 18px 32px rgba(0,0,0,.3));
}

.epw-wheel-svg {
    display: block;
    width: 200px;
    height: 200px;
}

/* Dilim görünümü */
.epw-slice-path {
    stroke: #000;
    stroke-width: 1.5;
}

.epw-slice-label {
    font-size: 13px;
    font-weight: 700;
    fill: #fff;
    text-shadow: 0 2px 3px rgba(0,0,0,.8);
    font-family: system-ui, sans-serif;
    user-select: none;
    pointer-events: none;
    dominant-baseline: middle;
    text-anchor: middle;
}

/* Kazanan dilim highlight */
@keyframes epw-winner-pulse {
    0% {
        filter: drop-shadow(0 0 2px #fff) drop-shadow(0 0 4px rgba(255,255,255,.8));
        transform: scale(1);
    }
    50% {
        filter: drop-shadow(0 0 6px #fff) drop-shadow(0 0 12px rgba(255,255,255,1));
        transform: scale(1.03);
    }
    100% {
        filter: drop-shadow(0 0 2px #fff) drop-shadow(0 0 4px rgba(255,255,255,.8));
        transform: scale(1);
    }
}
.epw-slice-winner {
    stroke: #fff !important;
    stroke-width: 3 !important;
    animation: epw-winner-pulse 0.8s ease-in-out 0s 3;
    transform-origin: 100px 100px;
}

/* FORM BLOKU */
.epw-form-block {
    display: grid;
    gap: 12px;
    font-size: 14px;
    color: #333;
}

/* "E-posta adresin" label */
.epw-form-row-top {
    display: flex;
    justify-content: flex-start;
    align-items: baseline;
}

.epw-email-label {
    font-size: 13px;
    color: #333;
    font-weight: 500;
    line-height: 1.4;
    margin: 0;
}

/* Satır 1: input tek başına full width */
.epw-form-row-email {
    display: block;
}

.epw-input-email {
    width: 100%;
    border-radius: 10px;
    border: 1px solid #ddd;
    padding: 10px 12px;
    font-size: 14px;
    color: #111;
}

/* Satır 2: buton + hak pill yan yana */
.epw-form-row-actions {
    display: flex;
    gap: 8px;
    align-items: stretch;
    flex-wrap: nowrap;
}

.epw-spin-btn {
    flex: 1 1 auto;
    background: #111;
    color: #fff;
    border: 0;
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all .15s ease;
    text-align: center;
    min-width: 0;
}
.epw-spin-btn[disabled],
.epw-spin-btn.epw-busy {
    background: #999 !important;
    cursor: not-allowed !important;
    box-shadow: none !important;
    transform: none !important;
}
.epw-spin-btn:hover:not([disabled]):not(.epw-busy) {
    box-shadow: 0 10px 20px rgba(0,0,0,.15);
    transform: translateY(-1px);
}

/* hakkınız pill */
.epw-remaining-pill {
    flex: 0 0 auto;
    background: #fafafa;
    color: #111;
    border: 1px solid #d4d4d8;
    border-radius: 10px;
    padding: 8px 10px;
    font-size: 12px;
    line-height: 1.2;
    min-width: 80px;
    box-shadow: 0 8px 18px rgba(0,0,0,.06);
    display: grid;
    justify-items: center;
    align-content: center;
    text-align: center;
}
.epw-remaining-label {
    font-weight: 400;
    color: #555;
    font-size: 11px;
}
.epw-remaining {
    font-weight: 600;
    color: #000;
    font-size: 13px;
}

/* alt bilgi satırı */
.epw-extra-info-row {
    font-size: 12px;
    line-height: 1.4;
    color: #555;
}
.epw-extra-info-text {
    text-align: left;
    border-left: 3px solid #eee;
    padding-left: 8px;
}

/* MODAL OVERLAY
   her zaman DOM'da ama kapalıyken invisible.
   .epw-open class geldiğinde aktif olacak
*/
.epw-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;

    opacity: 0;
    pointer-events: none;
    transition: opacity .15s ease;
}
.epw-modal-overlay.epw-open {
    opacity: 1;
    pointer-events: all;
}

/* popup kutusu */
.epw-modal {
    background: #fff;
    color: #111;
    border-radius: 14px;
    box-shadow: 0 30px 80px rgba(0,0,0,.4);
    width: min(320px,90%);
    padding: 20px 16px 16px;
    text-align: center;
    display: grid;
    gap: 16px;
    font-family: inherit;
    animation: epw-modal-pop .18s ease;
    position: relative;
    z-index: 2;
}
@keyframes epw-modal-pop {
    0% { transform: scale(.85); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}
.epw-modal-body {
    font-size: 14px;
    line-height: 1.4;
    color: #111;
    word-break: break-word;
}
.epw-modal-message {
    font-weight: 500;
}
.epw-modal-close-btn {
    background: #111;
    color: #fff;
    border: 0;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all .15s ease;
}
.epw-modal-close-btn:hover {
    box-shadow: 0 10px 20px rgba(0,0,0,.2);
    transform: translateY(-1px);
}

/* KONFETİ fullscreen overlay içinde */
.epw-confetti-fullscreen {
    position: absolute;
    inset: 0;
    overflow: visible;
    pointer-events: none;
    z-index: 1;
}
.epw-confetti-piece {
    position: absolute;
    width: 8px;
    height: 14px;
    background-color: red;
    opacity: 0;
    border-radius: 2px;
    box-shadow: 0 0 4px rgba(0,0,0,.2);
    animation: epw-confetti-fall 1.4s linear forwards;
}

@keyframes epw-confetti-fall {
    0% {
        opacity: 1;
        transform: translate3d(0,0,0) rotateZ(0deg) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate3d(var(--tx, 0px), 360px, 0) rotateZ(var(--rot, 180deg)) scale(.8);
    }
}
