:root {
    --primary-color: #fcb05a;
    --primary-hover: #fcb00a;
    --dark-bg: #333333;
    --light-text: #f8f9fa;
    --error-color: #dc3545;
    --success-color: #28a745;
    --shadow-light: rgba(0, 0, 0, 0.1);
    --shadow-medium: rgba(0, 0, 0, 0.15);
    --shadow-heavy: rgba(0, 0, 0, 0.25);
}

* {
    box-sizing: border-box;
}

body {
    background: linear-gradient(135deg, var(--dark-bg) 0%, #2c2c2c 50%, var(--dark-bg) 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 20px;
    position: relative;
    overflow-x: hidden;

    &::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: radial-gradient(circle at 20% 80%, rgba(252, 176, 90, 0.1) 0%, transparent 50%),
                    radial-gradient(circle at 80% 20%, rgba(252, 176, 90, 0.08) 0%, transparent 50%);
        pointer-events: none;
        z-index: 0;
    }
}

.login-container {
    position: relative;
    z-index: 1;
    animation: fadeInUp 0.8s ease-out;
}

.logo-container {
    animation: fadeInDown 0.6s ease-out;
    margin-bottom: 3rem !important;

    img {
        transition: transform 0.3s ease, filter 0.3s ease;
        filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
        max-width: 100%;
        height: auto;

        &:hover {
            transform: scale(1.05);
            filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.15));
        }
    }
}

.content-login-form {
    background: rgba(255, 255, 255, 0.98);
    padding: 3rem 2.5rem;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15),
                0 8px 25px rgba(0, 0, 0, 0.1),
                inset 0 1px 0 rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;

    &::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 2px;
        background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
        transition: left 0.5s ease;
    }

    &:hover {
        transform: translateY(-8px) scale(1.02);
        box-shadow: 0 25px 80px rgba(0, 0, 0, 0.2),
                    0 12px 35px rgba(0, 0, 0, 0.15);

        &::before {
            left: 100%;
        }
    }
}

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

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

@keyframes expandWidth {
    from {
        width: 0;
    }
    to {
        width: 60px;
    }
}

@keyframes buttonPulse {
    0%, 100% {
        box-shadow: 0 8px 30px rgba(252, 176, 90, 0.3),
                    0 4px 15px rgba(0, 0, 0, 0.1),
                    inset 0 1px 0 rgba(255, 255, 255, 0.3);
    }
    50% {
        box-shadow: 0 12px 40px rgba(252, 176, 90, 0.4),
                    0 6px 20px rgba(0, 0, 0, 0.15),
                    inset 0 1px 0 rgba(255, 255, 255, 0.4);
    }
}

.bg-likelogo {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%) !important;
    border: none !important;
    border-radius: 20px !important;
    padding: 1rem 2rem !important;
    font-size: 1.1rem !important;
    font-weight: 700 !important;
    letter-spacing: 1px !important;
    text-transform: uppercase !important;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(252, 176, 90, 0.3),
                0 4px 15px rgba(0, 0, 0, 0.1),
                inset 0 1px 0 rgba(255, 255, 255, 0.3);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    animation: buttonPulse 3s ease-in-out infinite;

    &::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.8s ease;
    }

    &::after {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        width: 0;
        height: 0;
        background: rgba(255, 255, 255, 0.2);
        border-radius: 50%;
        transform: translate(-50%, -50%);
        transition: width 0.6s ease, height 0.6s ease;
    }

    &:hover {
        background: linear-gradient(135deg, var(--primary-hover) 0%, #e67e22 100%) !important;
        transform: translateY(-5px) scale(1.03);
        box-shadow: 0 15px 50px rgba(252, 176, 90, 0.5),
                    0 8px 25px rgba(0, 0, 0, 0.15),
                    inset 0 1px 0 rgba(255, 255, 255, 0.4);
        animation: none;

        &::before {
            left: 100%;
        }
    }

    &:active {
        transform: translateY(-2px) scale(0.98);
        transition: all 0.1s ease;

        &::after {
            width: 300px;
            height: 300px;
        }
    }
}

.title {
    font-weight: 700;
    color: var(--dark-bg);
    letter-spacing: 1px;
    margin: 0 0 2rem 0;
    position: relative;
    text-align: center;
    animation: slideInLeft 0.8s ease-out 0.2s both;

    &::after {
        content: '';
        display: block;
        width: 0;
        height: 3px;
        background: linear-gradient(90deg, var(--primary-color), var(--primary-hover));
        margin: 0.5rem auto 0;
        animation: expandWidth 0.8s ease-out 0.6s both;
    }
}

.form-label {
    margin-bottom: 1.2rem !important;
    font-weight: 600;
    color: var(--dark-bg);
    font-size: 0.95rem;
    letter-spacing: 0.3px;
    display: block;
}

.input-group {
    position: relative;
    margin-bottom: 1.8rem;
    animation: slideInLeft 0.6s ease-out calc(0.4s + var(--delay, 0s)) both;

    &:nth-child(1) { --delay: 0s; }
    &:nth-child(2) { --delay: 0.1s; }
    &:nth-child(3) { --delay: 0.2s; }
    &:nth-child(4) { --delay: 0.3s; }
}

.input-group-text {
    position: absolute;
    top: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(252, 176, 90, 0.1);
    color: var(--primary-color);
    border: 2px solid rgba(0, 0, 0, 0.08);
    padding: 0 1rem;
    z-index: 2;
    transition: all 0.3s ease;

    &:first-child {
        left: 0;
        border-right: none;
        border-radius: 15px 0 0 15px;
    }

    &:last-child {
        right: 0;
        border-left: none;
        border-radius: 0 15px 15px 0;
    }

    &.password-toggle {
        cursor: pointer;

        &:hover {
            background: rgba(252, 176, 90, 0.2);
            transform: scale(1.05);
            color: var(--primary-hover);
        }
    }
}

.form-control {
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid rgba(0, 0, 0, 0.08);
    border-radius: 15px;
    padding: 1rem 1.25rem 1rem 3.5rem;
    font-size: 1rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05),
                inset 0 1px 0 rgba(255, 255, 255, 0.8);
    position: relative;
    z-index: 1;
    width: 100%;

    &::placeholder {
        color: rgba(0, 0, 0, 0.4);
        transition: all 0.3s ease;
    }

    &:focus {
        background: rgba(255, 255, 255, 1);
        border-color: var(--primary-color);
        box-shadow: 0 0 0 4px rgba(252, 176, 90, 0.15),
                    0 8px 25px rgba(0, 0, 0, 0.1),
                    inset 0 1px 0 rgba(255, 255, 255, 1);
        outline: none;
        transform: translateY(-3px) scale(1.02);

        &::placeholder {
            color: rgba(0, 0, 0, 0.3);
            transform: translateY(-2px);
        }
    }
}

.alert {
    border-radius: 15px;
    padding: 1rem 1.25rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    animation: slideInLeft 0.5s ease-out;
    border: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);

    &.alert-danger {
        background: linear-gradient(135deg, rgba(220, 53, 69, 0.1) 0%, rgba(220, 53, 69, 0.05) 100%);
        color: var(--error-color);
    }

    &.alert-success {
        background-color: rgba(40, 167, 69, 0.1);
        border-color: var(--success-color);
        color: var(--success-color);
    }
}

.form-check {
    margin-bottom: 2rem !important;
    animation: slideInLeft 0.6s ease-out calc(0.4s + 0.4s) both;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.form-check-input {
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid rgba(0, 0, 0, 0.2);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.9);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    margin: 0;

    &:checked {
        background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
        border-color: var(--primary-color);
        box-shadow: 0 0 0 3px rgba(252, 176, 90, 0.2),
                    0 4px 12px rgba(252, 176, 90, 0.3);
        transform: scale(1.1);
    }

    &:hover {
        border-color: var(--primary-color);
        transform: scale(1.05);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    }
}

.form-check-label {
    font-weight: 500;
    color: var(--dark-bg);
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;

    &:hover {
        color: var(--primary-color);
        transform: translateX(2px);
    }
}

.d-grid {
    animation: slideInLeft 0.6s ease-out calc(0.4s + 0.5s) both;
}

.btn {
    position: relative;
    overflow: hidden;
    border: none !important;
    font-weight: 600 !important;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);

    &::before {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        width: 0;
        height: 0;
        background: rgba(255, 255, 255, 0.2);
        border-radius: 50%;
        transform: translate(-50%, -50%);
        transition: width 0.6s ease, height 0.6s ease;
    }

    &:active::before {
        width: 300px;
        height: 300px;
    }

    i {
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
    }

    &:hover i {
        transform: translateX(5px) scale(1.1);
        filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
    }

    &:active i {
        transform: translateX(2px) scale(0.95);
    }
}

.login-page-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.login-content {
    width: 100%;
    max-width: 450px;
    margin: 0 auto;
}

.login-footer {
    margin-top: 1.5rem;
    text-align: center;
    color: #6c757d;
    font-size: 0.9rem;

    a {
        color: var(--primary-color);
        text-decoration: none;
        transition: color 0.3s;

        &:hover {
            color: var(--primary-hover);
            text-decoration: underline;
        }
    }
}

@media (max-width: 768px) {
    .login-page-container {
        padding: 1rem 0.5rem;
    }
    
    .login-content {
        max-width: 100%;
    }
    
    .logo-container img {
        width: 180px;
    }
    
    .content-login-form {
        padding: 2rem 1.5rem !important;
    }
}

@media (max-width: 480px) {
    .logo-container img {
        width: 150px;
    }
    
    .content-login-form {
        padding: 1.5rem 1rem !important;
    }
}
