/* Modern Variables */
:root {
    --k-primary: #7c3aed;
    /* Violet */
    --k-secondary: #db2777;
    /* Pink */
    --k-accent: #fbbf24;
    /* Amber */
    --k-dark: #0f172a;
    /* Slate 900 */
    --k-glass: rgba(15, 23, 42, 0.75);
    --k-border: rgba(255, 255, 255, 0.1);
}

/* Floating Button - Neon Style */
.kampanya-btn-wrapper {
    position: fixed;
    bottom: 30px;
    left: 30px;
    z-index: 9990;
    animation: bounce 3s infinite ease-in-out;
}

.kampanya-btn {
    background: linear-gradient(135deg, var(--k-secondary), var(--k-primary));
    color: white;
    width: 65px;
    height: 65px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    box-shadow: 0 0 20px rgba(219, 39, 119, 0.6), 0 0 40px rgba(124, 58, 237, 0.4);
    cursor: pointer;
    border: 2px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

.kampanya-btn::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transform: rotate(45deg);
    animation: shine 3s infinite;
}

.kampanya-btn:hover {
    transform: scale(1.15) rotate(10deg);
    box-shadow: 0 0 30px rgba(219, 39, 119, 0.8), 0 0 60px rgba(124, 58, 237, 0.6);
}

.kampanya-tooltip {
    position: absolute;
    left: 80px;
    top: 15px;
    background: white;
    padding: 6px 12px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 800;
    color: var(--k-primary);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    white-space: nowrap;
    opacity: 0;
    transform: translateX(-10px);
    transition: 0.3s;
    pointer-events: none;
}

.kampanya-btn-wrapper:hover .kampanya-tooltip {
    opacity: 1;
    transform: translateX(0);
}

@keyframes shine {
    0% {
        top: -150%;
    }

    20% {
        top: 150%;
    }

    100% {
        top: 150%;
    }
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-12px);
    }
}

/* Modal - Glassmorphism */
.kampanya-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    /* Lighter dark */
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s;
    backdrop-filter: blur(12px);
    /* Strong blur */
}

.kampanya-modal.active {
    opacity: 1;
    pointer-events: auto;
}

.kampanya-content {
    background: var(--k-glass);
    width: 90%;
    max-width: 900px;
    border-radius: 24px;
    position: relative;
    padding: 0;
    display: flex;
    flex-direction: row;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), inset 0 0 0 1px var(--k-border);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
    color: var(--k-accent);
}

/* Left Side: Wheel (Cyberpunkish) */
.wheel-section {
    flex: 1.1;
    background: radial-gradient(circle at center, rgba(124, 58, 237, 0.1) 0%, transparent 70%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    position: relative;
    min-height: 450px;
    border-right: 1px solid var(--k-border);
}

.wheel-container {
    position: relative;
    width: 100%;
    max-width: 400px;
    aspect-ratio: 1/1;
    filter: drop-shadow(0 0 30px rgba(124, 58, 237, 0.3));
}

#canvas {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    /* border: 4px solid rgba(255,255,255,0.1); */
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.5);
}

.wheel-arrow {
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 50px;
    z-index: 5;
    filter: drop-shadow(0 0 10px rgba(251, 191, 36, 0.6));
}

/* Right Side: Form (Modern Input) */
.form-section {
    flex: 0.9;
    padding: 50px 40px;
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02) 0%, rgba(255, 255, 255, 0) 100%);
}

.kampanya-title {
    font-size: 32px;
    font-weight: 900;
    margin-bottom: 5px;
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -1px;
}

.kampanya-desc {
    font-size: 15px;
    color: #94a3b8;
    margin-bottom: 30px;
    line-height: 1.6;
}

.kampanya-input {
    width: 100%;
    padding: 15px 20px;
    margin-bottom: 15px;
    border: 1px solid var(--k-border);
    background: rgba(15, 23, 42, 0.6);
    border-radius: 12px;
    color: #fff;
    font-size: 16px;
    outline: none;
    transition: 0.3s;
    font-family: 'Inter', sans-serif;
}

.kampanya-input::placeholder {
    color: #64748b;
}

.kampanya-input:focus {
    background: rgba(15, 23, 42, 0.9);
    border-color: var(--k-primary);
    box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.1);
}

.spin-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(45deg, var(--k-accent), #f59e0b);
    color: #451a03;
    font-weight: 800;
    border: none;
    border-radius: 12px;
    font-size: 18px;
    cursor: pointer;
    box-shadow: 0 10px 20px -5px rgba(245, 158, 11, 0.4);
    transition: 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 10px;
    position: relative;
    overflow: hidden;
}

.spin-btn::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(rgba(255, 255, 255, 0.2), transparent);
    opacity: 0;
    transition: 0.2s;
}

.spin-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px -5px rgba(245, 158, 11, 0.5);
}

.spin-btn:hover::before {
    opacity: 1;
}

.spin-btn:active {
    transform: translateY(1px);
}

.spin-btn:disabled {
    filter: grayscale(1);
    cursor: not-allowed;
    transform: none;
}

/* Result Box */
.result-box {
    display: none;
    text-align: center;
    animation: zoomIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.result-title {
    font-size: 18px;
    color: var(--k-accent);
    margin-bottom: 10px;
    font-weight: bold;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.result-reward {
    font-size: 32px;
    color: #fff;
    font-weight: 900;
    margin-bottom: 25px;
    text-shadow: 0 0 30px rgba(124, 58, 237, 0.5);
}

.coupon-code {
    background: rgba(15, 23, 42, 0.8);
    padding: 20px;
    border-radius: 12px;
    font-family: 'Outfit', monospace;
    font-size: 28px;
    letter-spacing: 4px;
    border: 2px dashed rgba(255, 255, 255, 0.2);
    margin-bottom: 15px;
    color: var(--k-accent);
    user-select: all;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.5);
}

/* Confetti Animation Placeholder */
.celebrate .kampanya-content {
    animation: pulse 1s;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.02);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Mobile */
@media (max-width: 768px) {
    .kampanya-content {
        flex-direction: column;
        width: 95%;
        max-height: 85vh;
        overflow-y: auto;
    }

    .wheel-section {
        padding: 30px 20px;
        min-height: auto;
        border-right: none;
        border-bottom: 1px solid var(--k-border);
    }

    .wheel-container {
        width: 280px;
        max-width: 100%;
    }

    .form-section {
        padding: 30px 20px;
    }

    .kampanya-btn-wrapper {
        bottom: 20px;
        left: 20px;
    }

    .kampanya-btn {
        width: 55px;
        height: 55px;
        font-size: 22px;
    }
}

/* SweetAlert Z-Index Fix */
.swal2-container {
    z-index: 20000 !important;
}