/* Alert System Styles */
.global-alert-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    padding-top: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Form Success Message Styles */
.form-success-message {
    background: linear-gradient(135deg, #28a745, #20c997);
    border-radius: 8px;
    margin-bottom: 20px;
    padding: 0;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(40, 167, 69, 0.2);
    opacity: 0;
    transform: translateY(-20px);
    animation: slideInDown 0.5s ease forwards, pulse 2s infinite;
    width: 100%;
    position: relative;
}

/* Login Success Message Styles */
.login-success-message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 500px;
    z-index: 9999;
    background: linear-gradient(135deg, #182958, #2a4494); 
    border-radius: 15px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 0 0 100px rgba(24, 41, 88, 0.4);
    animation: popIn 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards, floatAnimation 3s ease-in-out infinite;
    padding: 10px;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.login-success-message .success-content {
    padding: 30px;
    position: relative;
    z-index: 2;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 10px;
}

.login-success-message .success-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 20px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.login-success-message .success-text {
    color: white;
    font-weight: 600;
    font-size: 22px;
    text-align: center;
    margin-bottom: 20px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.login-success-message .success-bg-icon {
    position: absolute;
    right: 20px;
    bottom: 20px;
    font-size: 150px;
    opacity: 0.1;
    color: white;
    transform: rotate(15deg);
}

/* Çıkış mesajı için özel stiller */
.logout-success-message {
    background: linear-gradient(135deg, #ee7003, #f39c12) !important; 
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 0 0 100px rgba(238, 112, 3, 0.4) !important;
}

.login-success-message .success-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.login-success-message .success-close:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: scale(1.1);
}

.login-success-message .redirect-text {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    text-align: center;
    margin-top: 15px;
}

.login-success-message .progress-bar-container {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    margin-top: 20px;
    overflow: hidden;
}

.login-success-message .progress-bar-fill {
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    width: 0%;
    animation: progressFill 2s linear forwards;
}

@keyframes popIn {
    0% {
        opacity: 0;
        transform: translate(-50%, -40%) scale(0.8);
    }
    70% {
        opacity: 1;
        transform: translate(-50%, -52%) scale(1.05);
    }
    100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

@keyframes floatAnimation {
    0% {
        transform: translate(-50%, -50%);
    }
    50% {
        transform: translate(-50%, -53%);
    }
    100% {
        transform: translate(-50%, -50%);
    }
}

@keyframes progressFill {
    0% { width: 0%; }
    100% { width: 100%; }
}

.form-success-message .success-content {
    display: flex;
    align-items: center;
    padding: 20px;
    position: relative;
    z-index: 2;
}

.form-success-message .success-icon {
    background-color: rgba(255, 255, 255, 0.2);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    flex-shrink: 0;
}

.form-success-message .success-text {
    color: white;
    font-weight: 500;
    font-size: 18px;
    flex-grow: 1;
}

.form-success-message .success-close {
    background: none;
    border: none;
    color: white;
    opacity: 0.7;
    cursor: pointer;
    font-size: 20px;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.form-success-message .success-close:hover {
    opacity: 1;
    transform: scale(1.1);
}

.form-success-message .success-bg-icon {
    position: absolute;
    right: -20px;
    top: -20px;
    font-size: 120px;
    opacity: 0.1;
    color: white;
    transform: rotate(15deg);
}

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

@keyframes pulse {
    0% {
        box-shadow: 0 10px 30px rgba(40, 167, 69, 0.2);
    }
    50% {
        box-shadow: 0 10px 30px rgba(40, 167, 69, 0.4);
    }
    100% {
        box-shadow: 0 10px 30px rgba(40, 167, 69, 0.2);
    }
}

.global-alert {
    margin-bottom: 15px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    overflow: hidden;
    animation: bounceIn 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55) forwards;
    position: relative;
    border: none;
    padding: 0;
}

.global-alert .alert-content {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    background-color: #fff;
}

.global-alert .icon-container {
    margin-right: 15px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.global-alert .alert-message {
    flex-grow: 1;
    font-weight: 500;
    font-size: 16px;
}

.global-alert .btn-close {
    opacity: 0.7;
    transition: all 0.2s;
}

.global-alert .btn-close:hover {
    opacity: 1;
    transform: scale(1.1);
}

/* Success Alert */
.global-alert.alert-success {
    background: linear-gradient(135deg, #28a745, #20c997);
}

.global-alert.alert-success .icon-container {
    background-color: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.global-alert.alert-success .progress-bar {
    background-color: #28a745;
}

/* Danger Alert */
.global-alert.alert-danger {
    background: linear-gradient(135deg, #dc3545, #ff6b6b);
}

.global-alert.alert-danger .icon-container {
    background-color: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.global-alert.alert-danger .progress-bar {
    background-color: #dc3545;
}

/* Warning Alert */
.global-alert.alert-warning {
    background: linear-gradient(135deg, #ffc107, #ffda6a);
}

.global-alert.alert-warning .icon-container {
    background-color: rgba(255, 255, 255, 0.2);
    color: #fff;
}

/* Info Alert */
.global-alert.alert-info {
    background: linear-gradient(135deg, #17a2b8, #4cc9f0);
}

.global-alert.alert-info .icon-container {
    background-color: rgba(255, 255, 255, 0.2);
    color: #fff;
}

/* Progress bar for auto-close countdown */
.global-alert .progress-container {
    height: 4px;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.3);
    position: absolute;
    bottom: 0;
}

.global-alert .progress-bar {
    height: 100%;
    width: 100%;
    transform-origin: left;
    animation: progress 5s linear forwards;
}

/* Animations */
@keyframes bounceIn {
    0% {
        transform: translateY(-120px) scale(0.9);
        opacity: 0;
    }
    70% {
        transform: translateY(10px) scale(1.02);
        opacity: 1;
    }
    100% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

@keyframes bounceOut {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    20% {
        transform: scale(1.05);
    }
    50%, 100% {
        transform: scale(0.9);
        opacity: 0;
    }
}

@keyframes progress {
    0% {
        transform: scaleX(1);
    }
    100% {
        transform: scaleX(0);
    }
}

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

.checkmark-circle {
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    stroke-width: 2;
    stroke-miterlimit: 10;
    stroke: #fff;
    fill: none;
    animation: checkmark-circle 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.checkmark {
    width: 25px;
    height: 25px;
    border-radius: 50%;
    display: block;
    stroke-width: 3;
    stroke: #fff;
    stroke-miterlimit: 10;
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
    animation: checkmark 0.6s cubic-bezier(0.65, 0, 0.45, 1) 0.3s forwards;
}

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

/* Error X mark */
.error-x {
    width: 25px;
    height: 25px;
    display: block;
}

.error-x .line {
    stroke-width: 3;
    stroke: #fff;
    stroke-miterlimit: 10;
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
    animation: checkmark 0.6s cubic-bezier(0.65, 0, 0.45, 1) 0.3s forwards;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .global-alert-container {
        padding-top: 10px;
    }
    
    .global-alert {
        width: 95%;
    }
    
    .global-alert .alert-content {
        padding: 12px 15px;
    }
    
    .global-alert .icon-container {
        width: 35px;
        height: 35px;
        margin-right: 10px;
    }
    
    .global-alert .alert-message {
        font-size: 14px;
    }
}
