/* ========================================
   ŞANS ÇARKI MODAL STİLLERİ
   ======================================== */

.wheel-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center; /* dikey ortalama */
    justify-content: center;
    overflow-y: auto;
    padding: 20px;
}

.wheel-modal.hidden {
    display: none !important;
}

.wheel-modal.active {
    display: flex;
}

.wheel-backdrop {
    position: fixed;
    inset: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.4), rgba(118, 75, 162, 0.4));
    backdrop-filter: blur(6px);
}

.wheel-dialog {
    position: relative;
    width: 100%;
    max-width: 720px;
    margin: 40px 0; /* scroll durumunda biraz nefes alanı */
    background: rgba(255, 255, 255, 0.98);
    border-radius: 28px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.3);
    padding: 28px;
    z-index: 10;
}

/* SweetAlert çark modalının üstünde kalsın */
.wheel-swal,
.swal2-container {
    z-index: 12000 !important;
}

.wheel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.wheel-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 22px;
    color: #1e293b;
}

.wheel-title i {
    color: #ef4444;
}

.wheel-close {
    width: 42px;
    height: 42px;
    border: none;
    background: #f1f5f9;
    color: #64748b;
    font-size: 18px;
    cursor: pointer;
    border-radius: 12px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wheel-close:hover {
    color: #ef4444;
    background: #fee2e2;
}

.wheel-body {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    align-items: center;
    justify-items: center;
}

/* ========================================
   ÇARK ALANI
   ======================================== */

.wheel-canvas-wrap {
    position: relative;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

/* Üst Ok (Pointer) */
.wheel-pointer {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 15;
    width: 0;
    height: 0;
    border-left: 22px solid transparent;
    border-right: 22px solid transparent;
    border-top: 46px solid #ef4444;
    filter: drop-shadow(0 5px 10px rgba(0, 0, 0, 0.25));
}

.wheel-pointer::before {
    content: '';
    position: absolute;
    width: 0;
    height: 0;
    border-left: 16px solid transparent;
    border-right: 16px solid transparent;
    border-top: 34px solid #dc2626;
    top: -42px;
    left: -16px;
}

.wheel-pointer::after {
    content: '👇';
    position: absolute;
    top: -38px;
    left: -10px;
    font-size: 20px;
}

#cartWheelCanvas {
    width: 100%;
    height: auto;
    display: block;
    filter: drop-shadow(0 15px 40px rgba(0, 0, 0, 0.2));
}

.wheel-result.under {
    margin-top: 18px;
    width: 100%;
    max-width: 360px;
    margin : auto;
}

/* Dekoratif yıldızlar */
.wheel-stars {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.wheel-star {
    position: absolute;
    font-size: 18px;
    animation: twinkle 2s infinite;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.2); }
}

/* ========================================
   SAĞ PANEL
   ======================================== */

.wheel-side {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.wheel-desc {
    font-size: 13px;
    line-height: 1.7;
    color: #475569;
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 16px;
}

/* ========================================
   SONUÇ KUTUSU
   ======================================== */

.wheel-result {
    padding: 18px;
    border-radius: 16px;
    background: linear-gradient(135deg, #ecfdf5, #d1fae5);
    border: 2px solid #86efac;
    text-align: center;
}

.wheel-result-title {
    font-size: 20px;
    font-weight: 800;
    color: #15803d;
    margin-bottom: 8px;
}

.wheel-result-prize {
    font-size: 22px;
    font-weight: 800;
    color: #1e293b;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 6px;
}

.wheel-result-sub {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 10px;
}

.wheel-result-code {
    font-size: 14px;
    color: #475569;
    background: #fff;
    border: 2px dashed #86efac;
    border-radius: 12px;
    padding: 12px;
    margin-top: 8px;
}

.wheel-result-code span {
    display: inline-block;
    font-size: 20px;
    font-weight: 800;
    color: #059669;
    letter-spacing: 2px;
    margin-top: 4px;
    font-family: monospace;
}

.wheel-result-code .coupon-code {
    display: inline-block;
    background: #f0fdf4;
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid #86efac;
    margin: 4px 0;
}

.wheel-result-code .copy-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    background: #10b981;
    color: white;
    border-radius: 8px;
    cursor: pointer;
    margin-left: 8px;
    transition: all 0.2s;
}

.wheel-result-code .copy-btn:hover {
    background: #059669;
    transform: scale(1.05);
}

.wheel-result-code.urun {
    background: linear-gradient(135deg, #fdf2f8, #fce7f3);
    border-color: #f9a8d4;
    color: #be185d;
}

.wheel-result-code.urun i {
    color: #ec4899;
}

.wheel-result-code.kargo {
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    border-color: #93c5fd;
    color: #1d4ed8;
}

.wheel-result-code.kargo i {
    color: #3b82f6;
}

.wheel-result-info {
    font-size: 11px;
    color: #64748b;
    margin-top: 8px;
}

/* ========================================
   RESPONSİVE
   ======================================== */

@media (max-width: 860px) {
    .wheel-body {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .wheel-dialog {
        margin: 20px 0;
        padding: 20px;
    }

    .wheel-canvas-wrap {
        max-width: 400px;
    }
}

@media (max-width: 480px) {
    .wheel-modal {
        padding: 0;
        align-items: stretch;
    }

    .wheel-dialog {
        margin: 0;
        padding: 5px;
        border-radius: 0;
        max-width: 100%;
        min-height: 100vh;
        display: flex;
        flex-direction: column;
    }

    .wheel-header {
        margin-bottom: 16px;
    }

    .wheel-title {
        font-size: 18px;
    }

    .wheel-close {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }

    .wheel-body {
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .wheel-pointer {
        border-left-width: 18px;
        border-right-width: 18px;
        border-top-width: 38px;
        top: -10px;
    }

    .wheel-pointer::before {
        border-left-width: 13px;
        border-right-width: 13px;
        border-top-width: 28px;
        top: -35px;
        left: -13px;
    }

    .wheel-pointer::after {
        font-size: 16px;
        top: -32px;
        left: -8px;
    }

    .wheel-canvas-wrap {
        max-width: 100vw;
        margin: 0 auto;
    }

    .wheel-result.under {
        max-width: 90vw;
        font-size: 14px;
    }

    .wheel-result-title {
        font-size: 18px;
    }

    .wheel-result-prize {
        font-size: 20px;
    }
}

/* Gizli sınıf - sadece çark modalı için */
#wheelModal.hidden,
#wheelResult.hidden {
    display: none !important;
}