/* ==================== MODAL/POPUP STYLES ==================== */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(5px);
    z-index: 9999;
    animation: modalFadeIn 0.3s ease;
}

.modal-overlay.show {
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-container {
    background: #2a2a2a;
    border-radius: 16px;
    padding: 25px;
    max-width: 450px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: modalSlideUp 0.3s ease;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-header {
    background: #2a2a2a;
    padding: 20px 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    gap: 12px;
}

.modal-header h3 {
    color: #ffffff;
    font-size: clamp(16px, 1.5vw, 20px);
    font-weight: 600;
    margin: 0;
}

.modal-body {
    padding: 30px 25px;
    color: #ffffff;
    background: #2a2a2a;
}

.modal-message {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

/* ==================== SMOOTH ICON STYLES ==================== */
.modal-icon {
    font-size: 32px;
    flex-shrink: 0;
    filter: drop-shadow(0 2px 8px currentColor);
}

/* Success Icon - Smooth Bounce + Gentle Pulse */
.modal-icon.success {
    color: #99ff00;
    animation: iconSmoothBounce 0.7s cubic-bezier(0.34, 1.56, 0.64, 1), 
               iconGentlePulse 2.5s ease-in-out 0.7s infinite;
}

/* Error Icon - Elastic Shake */
.modal-icon.error {
    color: #f44336;
    animation: iconElasticShake 0.8s cubic-bezier(0.36, 0.07, 0.19, 0.97);
}

/* Warning Icon - Smooth Swing */
.modal-icon.warning {
    color: #ff9800;
    animation: iconSmoothBounce 0.7s cubic-bezier(0.34, 1.56, 0.64, 1), 
               iconSmoothSwing 2s ease-in-out 0.7s infinite;
    transform-origin: top center;
}

/* Info Icon - Smooth Pop */
.modal-icon.info {
    color: #2196f3;
    animation: iconSmoothPop 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* ==================== SMOOTH ANIMATIONS ==================== */

/* Smooth Bounce - Elastic & Natural */
@keyframes iconSmoothBounce {
    0% {
        transform: scale(0) translateY(30px) rotate(-10deg);
        opacity: 0;
    }
    40% {
        transform: scale(1.15) translateY(-8px) rotate(3deg);
    }
    60% {
        transform: scale(0.92) translateY(4px) rotate(-2deg);
    }
    80% {
        transform: scale(1.05) translateY(-2px) rotate(1deg);
    }
    100% {
        transform: scale(1) translateY(0) rotate(0deg);
        opacity: 1;
    }
}

/* Gentle Pulse - Smooth & Subtle */
@keyframes iconGentlePulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
        filter: drop-shadow(0 2px 8px currentColor);
    }
    50% {
        transform: scale(1.08);
        opacity: 0.9;
        filter: drop-shadow(0 4px 12px currentColor);
    }
}

/* Elastic Shake - Smooth dengan Rotation */
@keyframes iconElasticShake {
    0%, 100% {
        transform: translateX(0) rotate(0deg) scale(1);
    }
    10% {
        transform: translateX(-8px) rotate(-6deg) scale(1.05);
    }
    20% {
        transform: translateX(8px) rotate(6deg) scale(1.08);
    }
    30% {
        transform: translateX(-6px) rotate(-4deg) scale(1.06);
    }
    40% {
        transform: translateX(6px) rotate(4deg) scale(1.04);
    }
    50% {
        transform: translateX(-4px) rotate(-2deg) scale(1.02);
    }
    60% {
        transform: translateX(4px) rotate(2deg) scale(1.01);
    }
    70% {
        transform: translateX(-2px) rotate(-1deg) scale(1);
    }
    80% {
        transform: translateX(2px) rotate(1deg) scale(1);
    }
    90% {
        transform: translateX(-1px) rotate(0deg) scale(1);
    }
}

/* Smooth Swing - Natural Pendulum */
@keyframes iconSmoothSwing {
    0%, 100% {
        transform: rotate(0deg);
    }
    10% {
        transform: rotate(10deg);
    }
    20% {
        transform: rotate(-8deg);
    }
    30% {
        transform: rotate(6deg);
    }
    40% {
        transform: rotate(-4deg);
    }
    50% {
        transform: rotate(2deg);
    }
    60% {
        transform: rotate(-1deg);
    }
    70% {
        transform: rotate(0.5deg);
    }
    80% {
        transform: rotate(0deg);
    }
}

/* Smooth Pop - Playful Bounce */
@keyframes iconSmoothPop {
    0% {
        transform: scale(0) rotate(180deg);
        opacity: 0;
    }
    50% {
        transform: scale(1.2) rotate(-10deg);
    }
    70% {
        transform: scale(0.9) rotate(5deg);
    }
    85% {
        transform: scale(1.05) rotate(-2deg);
    }
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

.modal-text {
    flex: 1;
    line-height: 1.6;
    font-size: clamp(14px, 1.2vw, 16px);
}

.modal-footer {
    padding: 20px 25px;
    margin-top: -20px;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    background: #2a2a2a;
}

.modal-btn {
    padding: 10px 10px;
    border: none;
    border-radius: 15px;
    font-size: clamp(14px, 1.1vw, 16px);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
    color: #ffffff !important;
}

.modal-btn-primary {
    background: #278a00 !important;
    color: #ffffff !important;
    box-shadow: 0 4px 15px rgba(153, 255, 0, 0.3);
}

.modal-btn-primary:hover {
    background: #99ff00 !important;
    box-shadow: 0 6px 20px rgba(153, 255, 0, 0.4);
    color: #ffffff !important;
}

.modal-btn-secondary {
    background: #860000c7;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.modal-btn-secondary:hover {
    background: #d30000;
    border-color: rgba(255, 255, 255, 0.25);
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes modalSlideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}