/* Already Logged In Modal Styles */
.already-logged-modal {
    backdrop-filter: blur(15px);
    background-color: rgba(0, 0, 0, 0.7);
}

.already-logged-modal .modal-dialog {
    transform: scale(0.7) translateY(-100px) rotateX(45deg);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.already-logged-modal.show .modal-dialog {
    transform: scale(1) translateY(0) rotateX(0deg);
    opacity: 1;
}

.already-logged-content {
    border: none;
    border-radius: 25px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    position: relative;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
}

.already-logged-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-light), var(--success-color));
    animation: shimmer 2s ease-in-out infinite;
}

.already-logged-header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    border: none;
    padding: 2.5rem 2rem 1.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.already-logged-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: rotate 10s linear infinite;
}

.user-avatar-container {
    position: relative;
    margin-bottom: 1rem;
    z-index: 2;
}

.user-avatar {
    width: 100px;
    height: 100px;
    margin: 0 auto;
    position: relative;
    border-radius: 50%;
    border: 4px solid rgba(255, 255, 255, 0.3);
    overflow: hidden;
    animation: avatarPulse 3s ease-in-out infinite;
}

.avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.online-indicator {
    position: absolute;
    bottom: 5px;
    right: 5px;
    width: 20px;
    height: 20px;
    background: var(--success-color);
    border: 3px solid white;
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

.welcome-back-animation {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 3;
}

.success-icon {
    font-size: 2rem;
    color: var(--success-color);
    background: white;
    border-radius: 50%;
    padding: 0.3rem;
    animation: successBounce 0.6s ease-out 0.5s both;
    transform: scale(0);
}

.already-logged-body {
    padding: 2rem;
    text-align: center;
}

.modal-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
    animation: slideInUp 0.6s ease-out 0.3s both;
    transform: translateY(20px);
    opacity: 0;
}

.user-info {
    margin-bottom: 2rem;
    animation: slideInUp 0.6s ease-out 0.4s both;
    transform: translateY(20px);
    opacity: 0;
}

.user-name {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 1.1rem;
}

.user-email {
    color: var(--primary-color);
    font-weight: 500;
}

.session-info {
    background: rgba(22, 110, 34, 0.05);
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(22, 110, 34, 0.1);
    animation: slideInUp 0.6s ease-out 0.5s both;
    transform: translateY(20px);
    opacity: 0;
}

.session-item {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
    font-weight: 500;
}

.session-item:last-child {
    margin-bottom: 0;
}

.session-item i {
    margin-right: 0.5rem;
    font-size: 1.1rem;
}

.action-message {
    animation: slideInUp 0.6s ease-out 0.6s both;
    transform: translateY(20px);
    opacity: 0;
}

.action-message p {
    font-weight: 600;
    color: var(--dark-gray);
    margin-bottom: 0;
}

.already-logged-footer {
    padding: 1.5rem 2rem 2rem;
    border: none;
    background: transparent;
    display: flex;
    gap: 1rem;
    justify-content: center;
    animation: slideInUp 0.6s ease-out 0.7s both;
    transform: translateY(20px);
    opacity: 0;
}

.already-logged-footer .btn {
    border-radius: 12px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.already-logged-footer .btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transition: all 0.3s ease;
    transform: translate(-50%, -50%);
}

.already-logged-footer .btn:hover::before {
    width: 300px;
    height: 300px;
}

.already-logged-footer .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.btn-outline-secondary {
    border: 2px solid #6c757d;
    color: #6c757d;
    background: white;
}

.btn-outline-secondary:hover {
    background: #6c757d;
    color: white;
    border-color: #6c757d;
}

.btn-primary-custom {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    border: none;
    color: white;
}

.btn-primary-custom:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
    color: white;
}

/* Floating particles animation */
.already-logged-header::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.1) 2px, transparent 2px),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.1) 1px, transparent 1px),
        radial-gradient(circle at 40% 60%, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 50px 50px, 30px 30px, 70px 70px;
    animation: floatParticles 20s linear infinite;
    pointer-events: none;
}

/* Button loading states */
.btn-loading-state {
    position: relative;
    pointer-events: none;
}

.btn-loading-state::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.btn-loading-state span {
    opacity: 0;
}

/* Animations */
@keyframes shimmer {

    0%,
    100% {
        transform: translateX(-100%);
    }

    50% {
        transform: translateX(100%);
    }
}

@keyframes rotate {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes avatarPulse {

    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.4);
    }

    50% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(255, 255, 255, 0);
    }
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(40, 167, 69, 0.4);
    }

    50% {
        transform: scale(1.2);
        box-shadow: 0 0 0 5px rgba(40, 167, 69, 0);
    }
}

@keyframes successBounce {
    0% {
        transform: scale(0) rotate(0deg);
    }

    50% {
        transform: scale(1.3) rotate(180deg);
    }

    100% {
        transform: scale(1) rotate(360deg);
    }
}

@keyframes slideInUp {
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes floatParticles {
    0% {
        transform: translateY(0px) translateX(0px);
    }

    33% {
        transform: translateY(-10px) translateX(10px);
    }

    66% {
        transform: translateY(5px) translateX(-5px);
    }

    100% {
        transform: translateY(0px) translateX(0px);
    }
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .already-logged-footer {
        flex-direction: column;
    }

    .already-logged-footer .btn {
        width: 100%;
    }

    .user-avatar {
        width: 80px;
        height: 80px;
    }

    .modal-title {
        font-size: 1.5rem;
    }

    .demo-title {
        font-size: 2rem;
    }

    .demo-container {
        padding: 1rem;
    }
}

/* Notification Styles */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    min-width: 300px;
    max-width: 400px;
    padding: 1rem 1.5rem;
    border-radius: 10px;
    color: white;
    font-weight: 500;
    animation: slideInRight 0.3s ease-out;
}

.notification.success {
    background: linear-gradient(135deg, var(--success-color), #20c997);
}

.notification.info {
    background: linear-gradient(135deg, #17a2b8, #20c997);
}

.notification.error {
    background: linear-gradient(135deg, var(--error-color), #e74c3c);
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}