* {
    box-sizing: border-box;
}

body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    overflow: hidden;
}

.login-container {
    width: 100vw;
    height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

.floating-shapes {
    position: absolute;
    width: 100%;
    height: 100%;
}

.shape {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    animation: float 6s ease-in-out infinite;
}

.shape-1 {
    width: 80px;
    height: 80px;
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.shape-2 {
    width: 120px;
    height: 120px;
    top: 60%;
    right: 10%;
    animation-delay: 2s;
}

.shape-3 {
    width: 60px;
    height: 60px;
    bottom: 20%;
    left: 20%;
    animation-delay: 4s;
}

.shape-4 {
    width: 100px;
    height: 100px;
    top: 10%;
    right: 30%;
    animation-delay: 1s;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

.login-content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 450px;
    padding: 20px;
}

.login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 25px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: slideInUp 0.8s ease-out;
    overflow: hidden;
}

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

.logo-container {
    margin-bottom: 20px;
    animation: bounceIn 1s ease-out 0.3s both;
}

.logo-image {
    height: 70px;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
    transition: transform 0.3s ease;
}

.logo-image:hover {
    transform: scale(1.05);
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.login-title {
    margin-bottom: 10px;
    font-weight: 700;
    font-size: 2.2rem;
    animation: fadeInUp 0.8s ease-out 0.5s both;
}

.title-text {
    background: linear-gradient(45deg, #17a2b8, #138496);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.login-subtitle {
    font-size: 1.1rem;
    color: #6c757d;
    margin: 0;
    animation: fadeInUp 0.8s ease-out 0.7s both;
}

.card-body {
    padding: 40px 30px;
}

.form-group {
    margin-bottom: 25px;
    animation: fadeInUp 0.8s ease-out both;
}

.form-group:nth-child(1) { animation-delay: 0.9s; }
.form-group:nth-child(2) { animation-delay: 1.1s; }
.form-group:nth-child(3) { animation-delay: 1.3s; }

.input-container {
    position: relative;
    transition: transform 0.3s ease;
}

.input-container:hover {
    transform: translateY(-2px);
}

.input-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #17a2b8;
    font-size: 1.1rem;
    z-index: 2;
}

.input-field {
    border: 2px solid #e9ecef;
    border-radius: 15px;
    padding: 15px 15px 15px 50px;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    width: 100%;
}

.input-field:focus {
    border-color: #17a2b8;
    box-shadow: 0 0 0 0.2rem rgba(23, 162, 184, 0.25);
    background: white;
    transform: scale(1.02);
    outline: none;
}

.input-field::placeholder {
    color: #adb5bd;
    transition: color 0.3s ease;
}

.input-field:focus::placeholder {
    color: #17a2b8;
}

.error-message {
    color: #dc3545;
    font-size: 0.9rem;
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.login-button {
    width: 100%;
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
    border: none;
    border-radius: 15px;
    padding: 15px 30px;
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

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

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

.login-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(23, 162, 184, 0.3);
}

.login-button:active {
    transform: translateY(-1px);
}

.button-text {
    position: relative;
    z-index: 1;
}

.button-icon {
    position: relative;
    z-index: 1;
    transition: transform 0.3s ease;
}

.login-button:hover .button-icon {
    transform: translateX(5px);
}

.login-footer {
    margin-top: 30px;
    animation: fadeInUp 0.8s ease-out 1.5s both;
}

.divider {
    text-align: center;
    margin: 25px 0;
    position: relative;
}

.divider::before,
.divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 45%;
    height: 1px;
    background: linear-gradient(90deg, transparent, #dee2e6, transparent);
}

.divider::before { left: 0; }
.divider::after { right: 0; }

.divider span {
    background: white;
    padding: 0 15px;
    color: #6c757d;
    font-size: 0.9rem;
}

.features {
    display: flex;
    justify-content: space-around;
    gap: 15px;
    margin-top: 20px;
}

.feature-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: #6c757d;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.feature-item:hover {
    color: #17a2b8;
    transform: translateY(-2px);
}

.feature-item i {
    font-size: 1.2rem;
    color: #17a2b8;
}

/* Responsive Design */
@media (max-width: 768px) {
    .login-content {
        padding: 15px;
    }
    
    .card-body {
        padding: 30px 20px;
    }
    
    .features {
        flex-direction: column;
        gap: 20px;
    }
    
    .login-title {
        font-size: 1.8rem;
    }
}

/* Loading Animation */
.login-button.loading {
    pointer-events: none;
}

.login-button.loading .button-text {
    opacity: 0;
}

.login-button.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
