:root {
    --primary-color: #0d6efd;
    --secondary-color: #8f34eb;
    --dark-color: #000000;
    --light-color: #ffffff;
    --gray-color: #f8f9fa;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Poppins", sans-serif;
}

body,
html {
    height: 100%;
    overflow-x: hidden;
    opacity: 0;
    animation: pageFadeIn 0.8s ease-out forwards;
}

/* Page Fade In Animation */
@keyframes pageFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.excel-style-container {
    display: flex;
    min-height: 100vh;
    position: relative;
}

/* Left Panel - Brand Section (Black) */
.excel-cell-left {
    flex: 1.2;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding: 2rem;
    opacity: 0;
    transform: translateX(-50px);
    animation: slideInLeft 0.8s ease-out 0.3s forwards;
}

/* Overlay for opacity */
.excel-cell-left::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url("../images/ict/bg_3.jpg") center/cover no-repeat !important;
    opacity: 0.7;
    z-index: 0;
    animation: bgReveal 1.2s ease-out 0.5s forwards;
}

/* Background Reveal Animation */
@keyframes bgReveal {
    0% {
        transform: scale(1.1);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 0.7;
    }
}

/* Make sure content is above the overlay */
.excel-cell-left>* {
    position: relative;
    z-index: 1;
}

.brand-content {
    text-align: center;
    z-index: 2;
    max-width: 80%;
}

.brand-content img {
    max-width: 180px;
    height: auto;
    margin-bottom: 2rem;
    filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.5));
    animation: float 6s ease-in-out infinite 2s,
        logoPop 0.8s ease-out 0.8s forwards;
    opacity: 0;
    transform: scale(0.8);
}

/* Logo Pop Animation */
@keyframes logoPop {
    0% {
        opacity: 0;
        transform: scale(0.8) rotate(-10deg);
    }

    70% {
        transform: scale(1.05) rotate(5deg);
    }

    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

.brand-content h1 {
    font-weight: 600;
    margin-bottom: 1.5rem;
    font-size: 2.2rem;
    color: #fff;
    opacity: 0;
    transform: translateY(20px);
    animation: textSlideUp 0.8s ease-out 1s forwards;
}

.brand-content p {
    font-weight: 300;
    opacity: 0;
    font-size: 1.1rem;
    line-height: 1.6;
    color: #e0e0e0;
    transform: translateY(20px);
    animation: textSlideUp 0.8s ease-out 1.2s forwards;
}

/* Text Slide Up Animation */
@keyframes textSlideUp {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Right Panel - Login Form (White) */
.excel-cell-right {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    background: whitesmoke;
    position: relative;
    opacity: 0;
    transform: translateX(50px);
    animation: slideInRight 0.8s ease-out 0.3s forwards;
}

/* Slide In Animations */
@keyframes slideInLeft {
    0% {
        opacity: 0;
        transform: translateX(-50px);
    }

    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    0% {
        opacity: 0;
        transform: translateX(50px);
    }

    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

.login-content {
    width: 100%;
    max-width: 700px;
    padding: 2rem;
    position: relative;
    padding-bottom: 70px;
    opacity: 0;
    animation: contentFadeIn 0.8s ease-out 0.6s forwards;
}

/* Content Fade In */
@keyframes contentFadeIn {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-content h3 {
    font-weight: 700;
    margin-bottom: 2rem;
    text-align: center;
    position: relative;
    font-size: 1.8rem;
    color: #333;
    opacity: 0;
    animation: titleAppear 0.8s ease-out 0.9s forwards;
}

/* Title Appear Animation */
@keyframes titleAppear {
    0% {
        opacity: 0;
        transform: translateY(15px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.text-center i {
    opacity: 0;
    transform: scale(0.5) rotate(-180deg);
    animation: iconSpin 0.8s ease-out 0.7s forwards;
    display: inline-block;
}

/* Icon Spin Animation */
@keyframes iconSpin {
    0% {
        opacity: 0;
        transform: scale(0.5) rotate(-180deg);
    }

    70% {
        transform: scale(1.1) rotate(10deg);
    }

    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

.form-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: #333;
    opacity: 0;
    animation: labelAppear 0.5s ease-out 1.1s forwards;
}

/* Label Appear Animation */
@keyframes labelAppear {
    0% {
        opacity: 0;
        transform: translateX(-10px);
    }

    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

.form-control {
    padding: 0.8rem 1.2rem;
    border-radius: 8px;
    border: 1px solid #ddd;
    transition: all 0.3s ease;
    background: var(--gray-color);
    opacity: 0;
    transform: translateY(10px);
    animation: inputSlideUp 0.5s ease-out forwards;
}

/* Input Animation Delays */
.mb-3:nth-child(1) .form-control {
    animation-delay: 1.2s;
}

.mb-3:nth-child(2) .form-control {
    animation-delay: 1.4s;
}

@keyframes inputSlideUp {
    0% {
        opacity: 0;
        transform: translateY(10px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.15);
    transform: translateY(-2px);
    transition: all 0.3s ease;
}

.input-group-text {
    background: var(--gray-color);
    border: 1px solid #ddd;
    border-radius: 8px 0 0 8px;
    color: #555;
    opacity: 0;
    animation: inputIconAppear 0.5s ease-out forwards;
}

.mb-3:nth-child(1) .input-group-text {
    animation-delay: 1.2s;
}

.mb-3:nth-child(2) .input-group-text {
    animation-delay: 1.4s;
}

@keyframes inputIconAppear {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.btn-login {
    background: var(--primary-color);
    border: none;
    padding: 0.8rem;
    border-radius: 8px;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    color: white;
    opacity: 0;
    transform: translateY(20px);
    animation: buttonSlideUp 0.6s ease-out 1.6s forwards;
    position: relative;
    overflow: hidden;
}

/* Button Slide Up Animation */
@keyframes buttonSlideUp {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.btn-login:hover {
    transform: translateY(-3px);
    /* box-shadow: 0 8px 20px rgba(13, 110, 253, 0.3); */
    background: #115bca;
    color: white;
}

.btn-login::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%);
    transform-origin: 50% 50%;
}

.btn-login:focus:not(:active)::after {
    animation: ripple 1s ease-out;
}

@keyframes ripple {
    0% {
        transform: scale(0, 0);
        opacity: 0.5;
    }

    100% {
        transform: scale(40, 40);
        opacity: 0;
    }
}

.login-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    opacity: 0;
    animation: optionsAppear 0.5s ease-out 1.5s forwards;
}

@keyframes optionsAppear {
    0% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.form-check-label {
    color: #555;
}

.forgot-password {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.forgot-password:hover {
    color: #0b5ed7;
    text-decoration: underline;
}

/* Powered by footer styling */
.powered-by-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    text-align: center;
    padding: 15px 0;
    margin-top: 30px;
    border-top: 1px solid #eaeaea;
    background: rgba(248, 249, 250, 0.8);
    border-radius: 0 0 8px 8px;
    opacity: 0;
    animation: footerAppear 0.5s ease-out 1.8s forwards;
}

@keyframes footerAppear {
    0% {
        opacity: 0;
        transform: translateY(10px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.powered-by-text {
    font-size: 0.85rem;
    color: #6c757d;
    font-weight: 500;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.powered-by-text span {
    color: var(--primary-color);
    font-weight: 600;
}

.college-logo {
    width: 20px;
    height: 20px;
    margin-right: 5px;
    display: inline-block;
    vertical-align: middle;
    background: linear-gradient(135deg,
            var(--primary-color),
            var(--secondary-color));
    border-radius: 50%;
    position: relative;
}

.college-logo::before {
    content: "T";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

/* Float Animation */
@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

/* Responsive adjustments - Animations for mobile */
@media (max-width: 992px) {
    .excel-style-container {
        flex-direction: column;
    }

    .excel-cell-left {
        min-height: 30vh;
        transform: translateY(-50px);
        animation: slideInTop 0.8s ease-out 0.3s forwards;
    }

    @keyframes slideInTop {
        0% {
            opacity: 0;
            transform: translateY(-50px);
        }

        100% {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .excel-cell-right {
        transform: translateY(50px);
        animation: slideInBottom 0.8s ease-out 0.3s forwards;
    }

    @keyframes slideInBottom {
        0% {
            opacity: 0;
            transform: translateY(50px);
        }

        100% {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .brand-content {
        max-width: 90%;
    }

    .excel-cell-right {
        flex: 1;
    }
}

@media (max-width: 768px) {
    .login-content {
        padding: 1.5rem;
        padding-bottom: 60px;
    }

    .brand-content h2 {
        font-size: 1.8rem;
    }

    .brand-content p {
        font-size: 1rem;
    }

    .form-control {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }

    .input-group-text {
        padding: 0.6rem 0.8rem;
    }

    .btn-login {
        padding: 0.7rem;
        font-size: 0.9rem;
    }

    .login-content h3 {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }

    .powered-by-footer {
        padding: 12px 0;
    }

    .powered-by-text {
        font-size: 0.8rem;
    }
}

@media (max-width: 576px) {
    .excel-cell-left {
        display: none;
    }

    .excel-cell-right {
        padding: 1rem;
    }

    .login-content {
        padding: 1rem;
        padding-bottom: 50px;
    }

    .form-control {
        padding: 0.5rem 0.8rem;
        font-size: 0.85rem;
    }

    .input-group-text {
        padding: 0.5rem 0.7rem;
    }

    .btn-login {
        padding: 0.6rem;
        font-size: 0.85rem;
    }

    .login-content h3 {
        font-size: 1.3rem;
        margin-bottom: 1.2rem;
    }

    .login-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .forgot-password {
        display: none;
    }

    .powered-by-footer {
        padding: 10px 0;
    }

    .powered-by-text {
        font-size: 0.75rem;
    }
}

@media (max-width: 360px) {
    .excel-cell-right {
        padding: 0.5rem;
    }

    .login-content {
        padding: 0.8rem;
        padding-bottom: 45px;
    }

    .form-control {
        padding: 0.4rem 0.6rem;
        font-size: 0.8rem;
    }

    .input-group-text {
        padding: 0.4rem 0.6rem;
        font-size: 0.8rem;
    }

    .btn-login {
        padding: 0.5rem;
        font-size: 0.8rem;
    }

    .powered-by-text {
        font-size: 0.7rem;
    }
}