@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOutRight {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #667eea 100%);
    background-size: 200% 200%;
    animation: gradientShift 15s ease infinite;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    position: relative;
    overflow: hidden;
}

.background-logo-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 0;
    pointer-events: none;
}

.background-logo {
    font-size: 40rem;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.05);
    animation: float 6s ease-in-out infinite;
    text-shadow: 0 0 100px rgba(255, 255, 255, 0.1);
}

.container {
    position: relative;
    z-index: 1;
}

.login-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    width: 100%;
    max-width: 420px;
    min-height: 80vh;
    animation: fadeInUp 0.8s ease-out;
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.login-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.2);
}

.logo-section {
    background: white;
    padding: 2rem 2rem 1rem;
    text-align: center;
    animation: fadeInUp 1s ease-out 0.2s both;
    flex-shrink: 0;
}

.logo-container {
    width: 100px;
    height: 100px;
    margin: 0 auto 1rem;
    background: #000000;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: float 3s ease-in-out infinite, pulse 2s ease-in-out infinite;
    position: relative;
    padding: 15px;
}

.logo-container::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    animation: rotate 10s linear infinite;
    opacity: 0.3;
    filter: blur(15px);
}

.logo-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    position: relative;
    z-index: 1;
    animation: pulse 2s ease-in-out infinite;
}

.logo-image {
    filter: brightness(0) invert(1);
}

.logo-placeholder {
    color: white;
    font-size: 3rem;
    font-weight: 700;
    position: relative;
    z-index: 1;
    animation: pulse 2s ease-in-out infinite;
}

.brand-title {
    color: #667eea;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    animation: fadeInUp 1.2s ease-out 0.4s both;
}

.brand-subtitle {
    color: #6c757d;
    font-size: 0.85rem;
    animation: fadeInUp 1.4s ease-out 0.6s both;
}

.login-body {
    padding: 1.5rem 2rem 2rem;
    background: linear-gradient(to bottom, white, #f8f9fa);
    animation: fadeInUp 1.6s ease-out 0.8s both;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.form-floating {
    margin-bottom: 1rem;
    animation: fadeInUp 1.8s ease-out 1s both;
}

.form-control {
    border-radius: 10px;
    border: 2px solid #e9ecef;
    transition: all 0.4s ease;
}

.form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.15);
    transform: translateY(-2px);
}

.form-control:hover {
    border-color: #c7d0f0;
}

.btn-login {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 10px;
    padding: 14px;
    width: 100%;
    font-weight: 600;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.btn-login::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s ease;
}

.btn-login:hover::before {
    left: 100%;
}

.btn-login:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.5);
}

.btn-login:active {
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.alert {
    border-radius: 10px;
    border: none;
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    min-width: 300px;
    max-width: 400px;
    animation: slideInRight 0.5s ease-out;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.alert.fade-out {
    animation: slideOutRight 0.5s ease-out forwards;
}

.alert .btn-close {
    padding: 0.5rem;
    cursor: pointer;
}

.alert-danger {
    background: linear-gradient(135deg, #ff6b6b, #ee5a6f);
    color: white;
    border: none;
}

.alert-success {
    background: linear-gradient(135deg, #51cf66, #37b24d);
    color: white;
    border: none;
}

hr {
    opacity: 0.1;
    margin: 1.5rem 0 1rem 0;
}