/* İndirim Çarkı - Frontend Stilleri */
/* Canvas tabanlı profesyonel çark tasarımı */

/* ========================================
   FLOATING BUTON (Sol Alt)
   ======================================== */
.dw-floating-btn {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 999998;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    border-radius: 50px;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(240, 147, 251, 0.5);
    transition: all 0.3s ease;
    animation: floatingPulse 2s ease-in-out infinite;
}

.dw-floating-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 30px rgba(240, 147, 251, 0.7);
}

.dw-floating-icon {
    font-size: 24px;
    animation: wheelSpin 3s linear infinite;
}

.dw-floating-text {
    color: #fff;
    font-weight: bold;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

@keyframes floatingPulse {
    0%, 100% { box-shadow: 0 4px 20px rgba(240, 147, 251, 0.5); }
    50% { box-shadow: 0 4px 30px rgba(240, 147, 251, 0.8); }
}

@keyframes wheelSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ========================================
   POPUP OVERLAY
   ======================================== */
.dw-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999999;
    display: none;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.dw-popup-overlay.dw-active {
    display: flex;
    opacity: 1;
}

/* ========================================
   POPUP CONTAINER
   ======================================== */
.dw-popup-container {
    position: relative;
    background: rgba(51, 51, 51, 0.77);
    border-radius: 20px;
    padding: 25px;
    max-width: 480px;
    width: 95%;
    max-height: 95vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.dw-popup-container.dw-popup-large {
    max-width: 520px;
    padding: 20px 25px 25px;
}

.dw-popup-overlay.dw-active .dw-popup-container {
    transform: scale(1);
}

/* ========================================
   KAPATMA BUTONU
   ======================================== */
.dw-close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: transparent;
    border: none;
    color: #fff;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.dw-close-btn:hover {
    background: transparent;
    transform: rotate(90deg);
}

/* ========================================
   ÇARK WRAPPER & CONTAINER
   ======================================== */
.dw-wheel-wrapper {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 10px 0;
}

.dw-wheel-container {
    position: relative;
    width: 320px;
    height: 320px;
}

/* Büyük Çark - Desktop */
.dw-wheel-container.dw-wheel-large {
    width: 380px;
    height: 380px;
}

/* ========================================
   CANVAS ÇARK
   ======================================== */
.dw-wheel {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

#dw-canvas {
    display: block;
}

/* ========================================
   MERKEZ BUTONU
   ======================================== */
.dw-wheel-center-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.5);
    transition: all 0.3s ease;
    z-index: 10;
}

.dw-wheel-center-btn:hover {
    transform: translate(-50%, -50%) scale(1.1);
    box-shadow: 0 6px 25px rgba(102, 126, 234, 0.7);
}

.dw-wheel-center-btn span {
    color: #fff;
    font-weight: bold;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ========================================
   OK İŞARETİ
   ======================================== */
.dw-wheel-pointer {
    position: absolute;
    top: 50%;
    right: -15px;
    transform: translateY(-50%);
    z-index: 20;
}

.dw-wheel-pointer::before {
    content: '';
    display: block;
    width: 0;
    height: 0;
    border-top: 20px solid transparent;
    border-bottom: 20px solid transparent;
    border-right: 35px solid #fff;
    filter: drop-shadow(-3px 0 5px rgba(0, 0, 0, 0.3));
}

/* ========================================
   BİLGİ YAZISI (Çark Altı)
   ======================================== */
.dw-wheel-info {
    text-align: center;
    color: #ffffff;
    font-size: 16px;
    font-weight: 500;
    margin: 15px 0 5px;
    padding: 0 10px;
}

/* ========================================
   E-POSTA FORMU
   ======================================== */
.dw-email-form {
    display: none;
    margin-top: 15px;
    animation: fadeInUp 0.3s ease;
}

.dw-email-form.dw-active {
    display: block;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dw-input-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.dw-email-input {
    flex: 1;
    min-width: 200px;
    padding: 15px 20px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 16px;
    transition: all 0.3s ease;
}

.dw-email-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.dw-email-input:focus {
    outline: none;
    border-color: #667eea;
    background: rgba(255, 255, 255, 0.15);
}

.dw-submit-btn {
    padding: 15px 30px;
    background: #FF6B00;
    border: none;
    border-radius: 25px;
    color: #fff;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.dw-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(255, 107, 0, 0.5);
}

.dw-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* ========================================
   ÇEVİRME BUTONU
   ======================================== */
.dw-spin-btn {
    display: block;
    width: 100%;
    padding: 16px 30px;
    margin-top: 15px;
    background: #FF6B00;
    border: none;
    border-radius: 25px;
    color: #fff;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 2px;
    box-shadow: 0 8px 25px rgba(255, 107, 0, 0.4);
}

.dw-spin-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(255, 107, 0, 0.5);
}

.dw-spin-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ========================================
   SONUÇ EKRANI
   ======================================== */
.dw-result {
    display: none;
    text-align: center;
    animation: fadeInUp 0.5s ease;
}

.dw-result.dw-active {
    display: block;
}

.dw-result-title {
    color: #4ecdc4;
    font-size: 32px;
    margin: 0 0 10px 0;
}

.dw-result-prize {
    color: #fff;
    font-size: 24px;
    margin: 0 0 20px 0;
}

.dw-result-code {
    background: rgba(255, 255, 255, 0.1);
    border: 2px dashed rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
}

.dw-result-code label {
    display: block;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    margin-bottom: 10px;
}

.dw-coupon-code {
    color: #ffeaa7;
    font-size: 28px;
    font-weight: bold;
    font-family: monospace;
    letter-spacing: 3px;
}

.dw-result-message {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    margin-top: 15px;
}

/* ========================================
   BEKLEME MESAJI
   ======================================== */
.dw-cooldown-message {
    display: none;
    text-align: center;
    padding: 30px;
}

.dw-cooldown-message.dw-active {
    display: block;
}

.dw-cooldown-message h3 {
    color: #fff;
    margin: 0 0 15px 0;
}

.dw-countdown {
    font-size: 36px;
    font-weight: bold;
    color: #f5576c;
    font-family: monospace;
}

/* ========================================
   HATA MESAJI
   ======================================== */
.dw-error-message {
    display: none;
    background: rgba(245, 87, 108, 0.2);
    border: 1px solid rgba(245, 87, 108, 0.5);
    border-radius: 8px;
    padding: 12px 15px;
    color: #f5576c;
    margin-top: 15px;
    font-size: 14px;
    text-align: center;
}

.dw-error-message.dw-active {
    display: block;
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* ========================================
   LOADING SPINNER
   ======================================== */
.dw-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s linear infinite;
    margin-right: 10px;
    vertical-align: middle;
}

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

/* ========================================
   KONFETİ ANİMASYONU
   ======================================== */
.dw-confetti {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000000;
}

.dw-confetti-piece {
    position: absolute;
    width: 10px;
    height: 10px;
    animation: confetti-fall 3s ease-out forwards;
}

@keyframes confetti-fall {
    0% {
        opacity: 1;
        transform: translateY(-100vh) rotate(0deg);
    }
    100% {
        opacity: 0;
        transform: translateY(100vh) rotate(720deg);
    }
}

/* ========================================
   MOBİL UYUMLULUK
   ======================================== */
@media (max-width: 600px) {
    /* Floating Buton - Mobil */
    .dw-floating-btn {
        bottom: 15px;
        left: 15px;
        padding: 10px 14px;
        gap: 8px;
    }

    .dw-floating-icon {
        font-size: 18px;
    }

    .dw-floating-text {
        font-size: 11px;
    }

    /* Popup Container - Mobil */
    .dw-popup-container {
        padding: 15px;
        margin: 10px;
        max-width: 95%;
        max-height: 90vh;
    }

    .dw-popup-container.dw-popup-large {
        padding: 15px;
        max-width: 95%;
    }

    /* Çark - Mobil (280x280) */
    .dw-wheel-container,
    .dw-wheel-container.dw-wheel-large {
        width: 280px;
        height: 280px;
        margin: 0 auto;
    }

    #dw-canvas {
        width: 280px !important;
        height: 280px !important;
    }

    /* Bilgi Yazısı - Mobil */
    .dw-wheel-info {
        font-size: 14px;
        margin: 10px 0 5px;
    }

    /* Butonlar - Mobil */
    .dw-spin-btn {
        font-size: 14px;
        padding: 12px 18px;
        margin-top: 10px;
    }

    .dw-input-group {
        flex-direction: column;
    }

    .dw-email-input,
    .dw-submit-btn {
        width: 100%;
    }

    .dw-email-input {
        padding: 12px 15px;
        font-size: 14px;
    }

    .dw-submit-btn {
        padding: 12px 20px;
        font-size: 14px;
    }

    /* Sonuç - Mobil */
    .dw-result-title {
        font-size: 26px;
    }

    .dw-result-prize {
        font-size: 18px;
    }

    .dw-coupon-code {
        font-size: 20px;
        letter-spacing: 2px;
    }

    .dw-result-code {
        padding: 15px;
    }

    /* Merkez Buton - Mobil */
    .dw-wheel-center-btn {
        width: 55px;
        height: 55px;
    }

    .dw-wheel-center-btn span {
        font-size: 9px;
    }

    /* Ok İşareti - Mobil */
    .dw-wheel-pointer::before {
        border-top: 14px solid transparent;
        border-bottom: 14px solid transparent;
        border-right: 24px solid #fff;
    }

    .dw-wheel-pointer {
        right: -12px;
    }

    /* Kapatma Butonu - Mobil */
    .dw-close-btn {
        width: 40px;
        height: 40px;
        font-size: 24px;
        top: 8px;
        right: 8px;
    }
}
