* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    position: relative;
}

/* Animated Background Particles */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}

.particle {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: float 15s infinite;
}

.particle:nth-child(1) {
    width: 80px;
    height: 80px;
    left: 10%;
    animation-delay: 0s;
    animation-duration: 12s;
}

.particle:nth-child(2) {
    width: 60px;
    height: 60px;
    left: 20%;
    animation-delay: 2s;
    animation-duration: 14s;
}

.particle:nth-child(3) {
    width: 100px;
    height: 100px;
    left: 35%;
    animation-delay: 4s;
    animation-duration: 16s;
}

.particle:nth-child(4) {
    width: 50px;
    height: 50px;
    left: 50%;
    animation-delay: 1s;
    animation-duration: 13s;
}

.particle:nth-child(5) {
    width: 70px;
    height: 70px;
    left: 65%;
    animation-delay: 3s;
    animation-duration: 15s;
}

.particle:nth-child(6) {
    width: 90px;
    height: 90px;
    left: 75%;
    animation-delay: 5s;
    animation-duration: 17s;
}

.particle:nth-child(7) {
    width: 55px;
    height: 55px;
    left: 85%;
    animation-delay: 2s;
    animation-duration: 14s;
}

.particle:nth-child(8) {
    width: 75px;
    height: 75px;
    left: 95%;
    animation-delay: 4s;
    animation-duration: 16s;
}

@keyframes float {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.3;
    }
    90% {
        opacity: 0.3;
    }
    100% {
        transform: translateY(-100vh) rotate(360deg);
        opacity: 0;
    }
}

.container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1200px;
    padding: 20px;
    animation: fadeIn 1s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.header {
    text-align: center;
    margin-bottom: 40px;
    animation: slideDown 0.8s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.main-title {
    color: #ffffff;
    font-size: 2.5em;
    font-weight: 600;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.3);
    letter-spacing: 2px;
}

.login-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    display: flex;
    overflow: hidden;
    max-width: 900px;
    margin: 0 auto;
    animation: scaleIn 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55) 0.3s backwards;
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.card-left {
    flex: 1;
    padding: 60px 40px;
    background: linear-gradient(135deg, #f5f7fa 0%, #e9ecef 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.card-left::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(74, 159, 216, 0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.logo-container {
    position: relative;
    z-index: 1;
    text-align: center;
}

.logo-circle {
    width: 200px;
    height: 200px;
    margin: 0 auto 30px;
    animation: pulse 3s ease-in-out infinite;
    border-radius: 50%;
    overflow: hidden;
    background: white;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.logo-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.logo-svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 5px 15px rgba(44, 90, 160, 0.3));
}

.department-title {
    color: #5a6c7d;
    font-size: 1.8em;
    font-weight: 700;
    margin-bottom: 10px;
    letter-spacing: 1px;
}

.college-name {
    color: #7a8a9a;
    font-size: 0.9em;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.card-right {
    flex: 1;
    padding: 60px 50px;
    background: linear-gradient(135deg, #4a9fd8 0%, #3d85c6 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.card-right::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 60%);
    animation: rotate 15s linear infinite reverse;
}

.account-title {
    color: white;
    font-size: 2em;
    font-weight: 600;
    margin-bottom: 30px;
    text-align: center;
    position: relative;
    z-index: 1;
    animation: slideRight 0.6s ease-out 0.5s backwards;
}

@keyframes slideRight {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.login-form {
    position: relative;
    z-index: 1;
}

.input-group {
    margin-bottom: 25px;
    position: relative;
    animation: slideRight 0.6s ease-out backwards;
}

.input-group:nth-child(1) {
    animation-delay: 0.6s;
}

.input-group:nth-child(2) {
    animation-delay: 0.7s;
}

.input-field {
    width: 100%;
    padding: 15px 20px;
    border: none;
    border-radius: 10px;
    font-size: 1em;
    background: rgba(255, 255, 255, 0.9);
    transition: all 0.3s ease;
    outline: none;
}

.input-field:focus {
    background: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.input-field:focus + .input-border {
    transform: scaleX(1);
}

.input-border {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    transform: scaleX(0);
    transition: transform 0.3s ease;
    border-radius: 10px;
}

.login-btn {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
    color: white;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    margin-top: 15px;
    animation: slideRight 0.6s ease-out 0.8s backwards;
}

.btn-text {
    position: relative;
    z-index: 1;
}

.btn-wave {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.login-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(46, 204, 113, 0.4);
}

.login-btn:hover .btn-wave {
    width: 300px;
    height: 300px;
}

.login-btn:active {
    transform: translateY(-1px);
}

.form-footer {
    text-align: center;
    margin-top: 20px;
    animation: slideRight 0.6s ease-out 0.9s backwards;
}

.forgot-link {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-size: 0.9em;
    transition: all 0.3s ease;
    position: relative;
}

.forgot-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: white;
    transition: width 0.3s ease;
}

.forgot-link:hover::after {
    width: 100%;
}

.forgot-link:hover {
    color: white;
}

.footer {
    text-align: center;
    margin-top: 40px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9em;
    animation: fadeIn 1s ease-in-out 1s backwards;
}

/* Responsive Design */
@media (max-width: 768px) {
    .main-title {
        font-size: 1.5em;
    }

    .login-card {
        flex-direction: column;
    }

    .card-left,
    .card-right {
        padding: 40px 30px;
    }

    .logo-circle {
        width: 150px;
        height: 150px;
    }

    .department-title {
        font-size: 1.4em;
    }

    .account-title {
        font-size: 1.6em;
    }
}

/* Loading Animation */
.loading {
    pointer-events: none;
    opacity: 0.6;
}

.loading .login-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    transform: translate(-50%, -50%);
}

@keyframes spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}
