body {
    margin: 0;
    min-height: 100vh;
    min-height: -webkit-fill-available;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f5f5f5;
    position: relative;
    padding: 1rem;
    box-sizing: border-box;
}

html {
    height: -webkit-fill-available;
}

#background-video {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
}

#header-logo-container {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 2;
    width: auto;
}

#header-logo {
    max-width: 120px;
    height: auto;
    display: block;
}

.form-signin {
    width: 100%;
    max-width: 500px;
    padding: clamp(1rem, 5vw, 2rem);
    background-color: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 25px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    margin: 60px auto 20px;
}

.form-content {
    display: flex;
    flex-direction: column;
    gap: clamp(1rem, 3vw, 1.5rem);
}

.form-row {
    display: flex;
    gap: 0.3rem;
    padding: 0.3rem 0;
    flex-wrap: wrap;
}

.form-row .form-floating {
    flex: 1;
    min-width: 250px;
}

.profile-upload-container {
    position: relative;
    width: clamp(100px, 20vw, 120px);
    height: clamp(100px, 20vw, 120px);
    margin: 0 auto;
}

.profile-preview {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    background-color: #f8f9fa;
    border: 2px solid rgba(255, 255, 255, 0.8);
    padding: 2px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.profile-upload-icon {
    position: absolute;
    bottom: 0;
    right: 0;
    width: clamp(30px, 6vw, 35px);
    height: clamp(30px, 6vw, 35px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 2px solid white;
    transition: all 0.2s ease;
    background-color: #63ba5d;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.profile-upload-icon:hover {
    background-color: #50954b;
    transform: scale(1.05);
}

.profile-upload-icon svg {
    width: clamp(16px, 3vw, 18px);
    height: clamp(16px, 3vw, 18px);
    color: white;
}

#profilePicture {
    display: none;
}

.form-control {
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background-color: rgba(255, 255, 255, 0.7) !important;
    padding: 1rem 0.75rem;
    height: calc(3.5rem + 2px);
    transition: all 0.3s ease;
    font-size: clamp(14px, 3vw, 16px);
}

.form-control:focus {
    background-color: rgba(255, 255, 255, 0.9) !important;
    box-shadow: 0 0 0 0.25rem rgba(99, 186, 93, 0.25);
    border-color: #63ba5d;
}

.form-floating>label {
    padding: 1rem 0.75rem;
    color: #666;
    font-size: clamp(14px, 3vw, 16px);
}

.btn-primary {
    background-color: #63ba5d;
    border-color: #63ba5d;
    border-radius: 12px;
    padding: clamp(0.6rem, 2vw, 0.8rem);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    font-size: clamp(14px, 3vw, 16px);
}

.btn-primary:hover {
    background-color: #50954b;
    border-color: #50954b;
    box-shadow: 0 4px 15px rgba(99, 186, 93, 0.3);
}

#sign-h1 {
    color: #2c3e50;
    font-weight: 600;
    font-size: clamp(1.5rem, 5vw, 2rem);
    margin-bottom: clamp(1rem, 4vw, 2rem);
    text-align: center;
}

.sign-up {
    color: rgb(104, 104, 104);
    font-size: clamp(12px, 2.5vw, 14px);
    text-decoration: underline;
    transition: all 0.3s ease;
}

@media (max-width: 480px) {
    .form-signin {
        padding: 1.5rem;
    }

    #header-logo-container {
        top: 15px;
        left: 15px;
        width: 100px;
    }

    #header-logo {
        max-width: 100%;
        height: auto;
    }

    .form-row {
        flex-direction: column;
        gap: 1rem;
    }

    .form-row .form-floating {
        width: 100%;
    }
}

@supports (padding: max(0px)) {
    .form-signin {
        padding-left: max(1rem, env(safe-area-inset-left));
        padding-right: max(1rem, env(safe-area-inset-right));
    }
}

@media (min-height: 800px) {
    .form-signin {
        margin-top: clamp(60px, 10vh, 100px);
    }
}

@media (max-height: 600px) and (orientation: landscape) {
    body {
        align-items: flex-start;
    }

    .form-signin {
        margin-top: 20px;
        margin-bottom: 20px;
    }
}