/* Universal Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.modal-box {
    background: white;
    border-radius: 20px;
    padding: 40px 30px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.4);
    transform: scale(0.7) translateY(-20px);
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.modal-overlay.show .modal-box {
    transform: scale(1) translateY(0);
}

/* Success Modal */
.modal-icon-success {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
}

.modal-icon-success svg {
    width: 100%;
    height: 100%;
}

.success-circle {
    stroke: #10b981;
    stroke-width: 2;
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    animation: circle-animate 0.6s ease-in-out forwards;
}

@keyframes circle-animate {
    100% {
        stroke-dashoffset: 0;
    }
}

.success-check {
    stroke: #10b981;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    animation: check-animate 0.3s 0.6s ease-in-out forwards;
}

@keyframes check-animate {
    100% {
        stroke-dashoffset: 0;
    }
}

/* Error Modal */
.modal-icon-error {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    position: relative;
}

.error-circle {
    stroke: #ef4444;
    stroke-width: 2;
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    animation: circle-animate 0.6s ease-in-out forwards;
}

.error-x {
    stroke: #ef4444;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-dasharray: 35;
    stroke-dashoffset: 35;
    animation: x-animate 0.3s 0.6s ease-in-out forwards;
}

@keyframes x-animate {
    100% {
        stroke-dashoffset: 0;
    }
}

/* Warning Modal */
.modal-icon-warning {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
}

.warning-circle {
    stroke: #f59e0b;
    stroke-width: 2;
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    animation: circle-animate 0.6s ease-in-out forwards;
}

.warning-exclamation {
    fill: #f59e0b;
    opacity: 0;
    animation: fade-in 0.3s 0.6s ease-in-out forwards;
}

@keyframes fade-in {
    100% {
        opacity: 1;
    }
}

/* Modal Content */
.modal-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: #1e293b;
}

.modal-title.success {
    color: #10b981;
}

.modal-title.error {
    color: #ef4444;
}

.modal-title.warning {
    color: #f59e0b;
}

.modal-message {
    font-size: 1rem;
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 25px;
}

.modal-message strong {
    color: #1e293b;
}

/* Modal Buttons */
.modal-btn {
    padding: 12px 40px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
}

.modal-btn.success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.modal-btn.success:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(16, 185, 129, 0.3);
}

.modal-btn.error {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

.modal-btn.error:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(239, 68, 68, 0.3);
}

.modal-btn.warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
}

.modal-btn.warning:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(245, 158, 11, 0.3);
}

/* Responsive */
@media (max-width: 768px) {
    .modal-box {
        padding: 30px 20px;
    }

    .modal-title {
        font-size: 1.5rem;
    }

    .modal-message {
        font-size: 0.95rem;
    }

    .modal-icon-success,
    .modal-icon-error,
    .modal-icon-warning {
        width: 60px;
        height: 60px;
    }
}
