@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800;900&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

#userIdDisplay {
    font-size: 40%;
    font-style: italic;
    font-family: cursive;
}


.btn {
    border-radius: 0 !important;
}


body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #33ff00 0%, #ff9900 100%);
    position: relative;
    overflow: hidden;
}

.card-body h4 {
    font-size: 2em;
}

.container.kiosk {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.row {
    text-align: center;
}


.encoder {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
    min-width: 80vw;
    background: linear-gradient(to right, #2d6e30, #ffb74d);
    /* Updated gradient background */
    /* background: #E0E0E0; */
    padding: 2%;
}


.encoder .card {
    border: ridge;
}

.navbar {
    border: ridge;
    margin-bottom: 2%;
}

.navbar-brand img {
    max-height: 5vh;
    max-width: 100%;
}

.navbar-nav .nav-link {
    margin-right: 15px;
    /* Add some spacing between navigation links */
    color: #333;
    /* Set the color of the navigation links */
}

.box {
    position: relative;
    width: 380px;
    height: 420px;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    opacity: 0;
    /* Start with opacity set to 0 */
    transition: opacity 1s ease;
    /* Add a transition for the opacity */
}

.hidden {
    display: none;
}

/* Modern Login Container */
.login-container {
    position: fixed;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(4px);
    animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.login-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 420px;
    padding: 40px;
    position: relative;
    z-index: 10;
    animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(40px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Header Section */
.login-header {
    text-align: center;
    margin-bottom: 35px;
}

.logo-wrapper {
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
}

.logo-img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
    animation: logoFloat 3s ease-in-out infinite;
}

@keyframes logoFloat {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-8px);
    }
}

.login-title {
    font-size: 28px;
    font-weight: 700;
    color: #2d2d2d;
    margin: 12px 0 5px;
    letter-spacing: -0.5px;
}

.login-subtitle {
    font-size: 14px;
    color: #888;
    font-weight: 500;
}

/* Form Section */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.form-group {
    position: relative;
}

.input-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
}

.form-input {
    font-size: 16px;
    padding: 14px 12px 10px;
    border: none;
    background: transparent;
    border-bottom: 2px solid #e0e0e0;
    color: #2d2d2d;
    outline: none;
    transition: all 0.3s ease;
    font-weight: 500;
}

.form-input::placeholder {
    color: transparent;
}

.form-input:focus,
.form-input:valid {
    border-bottom-color: #28a745;
    padding-bottom: 8px;
}

.form-label {
    position: absolute;
    left: 12px;
    top: 14px;
    font-size: 16px;
    color: #999;
    pointer-events: none;
    transition: all 0.3s ease;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-label i {
    font-size: 14px;
}

.form-input:focus~.form-label,
.form-input:valid~.form-label {
    top: -22px;
    font-size: 12px;
    color: #28a745;
    font-weight: 600;
}

.input-underline {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    background: linear-gradient(90deg, #28a745, #f58220);
    width: 0;
    transition: width 0.3s ease;
}

.form-input:focus~.input-underline,
.form-input:valid~.input-underline {
    width: 100%;
}

/* Form Options */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    margin-top: 10px;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #666;
    cursor: pointer;
    font-weight: 500;
    transition: color 0.3s ease;
}

.remember-me input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #28a745;
}

.remember-me:hover {
    color: #28a745;
}

.forgot-link {
    color: #28a745;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.forgot-link:hover {
    color: #f58220;
    text-decoration: underline;
}

/* Login Button */
.login-btn {
    background: linear-gradient(135deg, #28a745 0%, #f58220 100%);
    color: white;
    border: none;
    padding: 14px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 15px;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.5px;
}

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

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(40, 167, 69, 0.4);
}

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

.login-btn:active {
    transform: translateY(0);
}

.btn-icon {
    font-size: 18px;
    transition: transform 0.3s ease;
}

.login-btn:hover .btn-icon {
    transform: translateX(4px);
}

/* Footer */
.login-footer {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
}

.security-note {
    font-size: 12px;
    color: #999;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-weight: 500;
}

.security-note i {
    color: #667eea;
    font-size: 13px;
}

/* 2FA Modern Steps */
.step-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.4s ease-out;
}

.step-title {
    font-size: 22px;
    font-weight: 700;
    color: #2d2d2d;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.step-title i {
    color: #28a745;
}

.step-subtitle {
    font-size: 13px;
    color: #888;
    margin-bottom: 25px;
    text-align: center;
}

.qr-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 15px;
    box-shadow: 0 10px 30px rgba(40, 167, 69, 0.15);
    border: 1px solid rgba(40, 167, 69, 0.1);
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.3s ease;
}

.qr-card:hover {
    transform: translateY(-5px);
}

.secret-key-input {
    width: 100%;
    text-align: center;
    border: 1px dashed #cbd5e1;
    background: #f8fafc;
    padding: 10px;
    font-family: 'Courier New', Courier, monospace;
    font-weight: 600;
    letter-spacing: 2px;
    color: #475569;
    margin-bottom: 20px;
    border-radius: 8px;
    outline: none;
    transition: all 0.3s ease;
}

.secret-key-input:focus {
    border-color: #28a745;
    background: #ffffff;
}

.code-input-lg {
    font-size: 28px;
    letter-spacing: 8px;
    text-align: center;
    padding: 15px 10px 10px;
    font-weight: 700;
    color: #2d2d2d;
    border-bottom: 2px solid #e0e0e0;
}

.code-input-lg::placeholder {
    color: #cbd5e1;
    font-weight: 400;
}

.code-input-lg:focus {
    border-bottom-color: #28a745;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
    color: #28a745;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.back-link:hover {
    color: #f58220;
    transform: translateX(-3px);
}

/* Decorative Elements */
.decoration {
    position: fixed;
    border-radius: 50%;
    pointer-events: none;
    z-index: 1;
}

.decoration-1 {
    width: 300px;
    height: 300px;
    background: rgba(40, 167, 69, 0.1);
    top: -100px;
    right: -100px;
    animation: float 8s ease-in-out infinite;
}

.decoration-2 {
    width: 200px;
    height: 200px;
    background: rgba(245, 130, 32, 0.1);
    bottom: -50px;
    left: -50px;
    animation: float 10s ease-in-out infinite reverse;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px) translateX(0px);
    }

    50% {
        transform: translateY(30px) translateX(20px);
    }
}

.card {
    margin-bottom: 1vh;
}

.card-header,
.card-body {
    padding: 1vw;
}

.loader-wrapper {
    width: 100%;
    height: 100%;
    position: fixed;
    top: 0;
    left: 0;
    background-color: #103816;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* HTML: <div class="loader"></div> */
.loader {
    width: 40px;
    height: 40px;
    --c: no-repeat linear-gradient(rgb(250, 250, 250) 0 0);
    background: var(--c), var(--c), var(--c), var(--c);
    background-size: 21px 21px;
    animation: l5 1.5s infinite cubic-bezier(0.3, 1, 0, 1);
}

@keyframes l5 {
    0% {
        background-position: 0 0, 100% 0, 100% 100%, 0 100%
    }

    33% {
        background-position: 0 0, 100% 0, 100% 100%, 0 100%;
        width: 60px;
        height: 60px
    }

    66% {
        background-position: 100% 0, 100% 100%, 0 100%, 0 0;
        width: 60px;
        height: 60px
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes loader-inner {
    0% {
        height: 0%;
    }

    25% {
        height: 0%;
    }

    50% {
        height: 100%;
    }

    75% {
        height: 100%;
    }

    100% {
        height: 0%;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .login-container {
        padding: 20px;
    }

    .login-card {
        max-width: 100%;
        padding: 30px 20px;
    }

    .login-title {
        font-size: 24px;
    }

    .login-subtitle {
        font-size: 13px;
    }

    .logo-img {
        width: 70px;
        height: 70px;
    }

    .form-input {
        font-size: 16px;
        padding: 12px 10px 8px;
    }

    .form-label {
        font-size: 14px;
    }

    .login-btn {
        padding: 12px 20px;
        font-size: 15px;
    }

    .decoration-1,
    .decoration-2 {
        display: none;
    }
}

@media (max-width: 480px) {
    .login-card {
        padding: 25px 15px;
    }

    .login-header {
        margin-bottom: 25px;
    }

    .logo-img {
        width: 60px;
        height: 60px;
    }

    .login-title {
        font-size: 20px;
        margin: 10px 0 3px;
    }

    .login-subtitle {
        font-size: 12px;
    }

    .login-form {
        gap: 20px;
    }

    .form-options {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
}