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

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 25%, #27ae60 50%, #2ecc71 75%, #16a085 100%);
    min-height: 100vh;
    overflow-x: hidden;
    overflow-y: auto;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 20% 20%, rgba(46, 204, 113, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(22, 160, 133, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 40% 70%, rgba(52, 73, 94, 0.3) 0%, transparent 50%);
    z-index: -1;
    pointer-events: none;
}

.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    box-sizing: border-box;
}

.login-form {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 3rem;
    border-radius: 24px;
    box-shadow:
        0 25px 45px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    width: 100%;
    max-width: 40vw;
    position: relative;
    overflow: hidden;
}



.login-form::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: rotate(45deg);
    pointer-events: none;
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%) rotate(45deg);
    }

    100% {
        transform: translateX(100%) rotate(45deg);
    }
}

.login-form h1 {
    color: #ffffff;
    text-align: center;
    margin-bottom: 2rem;
    font-weight: 700;
    font-size: 2.5rem;
    letter-spacing: 0.8px;
    text-shadow:
        0 2px 4px rgba(0, 0, 0, 0.5),
        0 0 20px rgba(255, 255, 255, 0.1);
}

.login-form h2 {
    color: #ffffff;
    text-align: center;
    margin-bottom: 2rem;
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: 0.8px;
}

.form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 0.75rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
    letter-spacing: 0.3px;
}

.form-group input {
    width: 100%;
    padding: 1rem 1.25rem;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    font-size: 1rem;
    font-family: 'Roboto', sans-serif;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    outline: none;
}

/* Custom autofill styling to match color palette */
.form-group input:-webkit-autofill,
.form-group input:-webkit-autofill:hover,
.form-group input:-webkit-autofill:focus,
.form-group input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px rgba(46, 204, 113, 0.1) inset !important;
    -webkit-text-fill-color: #000000 !important;
    background: rgba(46, 204, 113, 0.1) !important;
    border: 2px solid rgba(46, 204, 113, 0.3) !important;
    backdrop-filter: blur(10px);
}

/* Alternative autofill styling for other browsers */
.form-group input:autofill {
    background: rgba(46, 204, 113, 0.1) !important;
    color: #000000 !important;
    border: 2px solid rgba(46, 204, 113, 0.3) !important;
}

.form-group input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.form-group input:focus {
    border-color: #2ecc71;
    background: rgba(255, 255, 255, 0.15);
    box-shadow:
        0 0 0 3px rgba(46, 204, 113, 0.2),
        0 8px 16px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

/* Select element styling */
.form-group select,
.form-select {
    width: 100%;
    padding: 1rem 1.25rem;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    font-size: 1rem;
    font-family: 'Roboto', sans-serif;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    outline: none;
    cursor: pointer;
    appearance: none;
    background-image:
        linear-gradient(45deg, transparent 50%, rgba(255, 255, 255, 0.8) 50%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.8) 50%, transparent 50%);
    background-position:
        calc(100% - 20px) calc(1rem + 2px),
        calc(100% - 15px) calc(1rem + 2px);
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
}

.form-group select:focus,
.form-select:focus {
    border-color: #2ecc71;
    background: rgba(255, 255, 255, 0.15);
    box-shadow:
        0 0 0 3px rgba(46, 204, 113, 0.2),
        0 8px 16px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

.form-group select:hover,
.form-select:hover {
    border-color: rgba(46, 204, 113, 0.4);
    background: rgba(255, 255, 255, 0.12);
}

/* Option styling */
.form-group select option,
.form-select option {
    background: rgba(26, 95, 63, 0.95);
    color: #ffffff;
    padding: 0.5rem;
    border: none;
}

/* Additional styling for better dropdown appearance */
.form-group select option:hover,
.form-select option:hover {
    background: rgba(39, 174, 96, 0.8);
}

.form-group select option:checked,
.form-select option:checked {
    background: rgba(39, 174, 96, 0.9);
}

.btn {
    width: 100%;
    padding: 1rem 1.5rem;
    border: none;
    border-radius: 16px;
    cursor: pointer;
    font-size: 1.1rem;
    font-family: 'Roboto', sans-serif;
    font-weight: 500;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    margin-top: 1rem;
}

.btn-primary {
    background: linear-gradient(135deg, #1a5f3f, #27ae60);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.15);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
    box-shadow: 0 4px 15px rgba(26, 95, 63, 0.3);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #0f3a24, #1e8449);
    box-shadow: 0 6px 20px rgba(26, 95, 63, 0.4);
    transform: translateY(-2px);
}

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

.btn-primary:active {
    transform: translateY(0px);
    box-shadow: 0 2px 8px rgba(26, 95, 63, 0.5);
}

.form-links {
    text-align: center;
    margin-top: 2rem;
}

.token-link {
    color: #acfccd
}

.token-link:visited {
    color: #2ecc71 !important;
}

.token-link:hover {
    color: #27ae60;
    text-decoration: underline;
    text-shadow: 0 0 8px rgba(46, 204, 113, 0.5);
    transform: translateY(-1px);
    transition: all 0.3s ease;
}

.form-links a {
    display: block;
    margin: 0.75rem 0;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-weight: 300;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.form-links a:hover {
    color: #2ecc71;
    text-shadow: 0 0 8px rgba(46, 204, 113, 0.5);
    transform: translateY(-1px);
}

/* Responsive design */
@media (max-width: 768px) {
    .login-container {
        padding: 2vh 10px;
        min-height: 100vh;
        align-items: flex-start;
        padding-top: 5vh;
    }

    .login-form {
        padding: 2rem;
        border-radius: 16px;
        max-width: 95vw !important;
        min-width: unset;
        width: 95vw;
        margin: auto;
        align-self: center;
    }

    .login-form h1 {
        font-size: 2.2rem;
        margin-bottom: 1.5rem;
    }

    .login-form h2 {
        font-size: 1.5rem;
        color: white;
        margin-bottom: 1.5rem;
    }

    .form-group input {
        padding: 1rem 1.125rem;
        font-size: 1rem;
    }

    .btn {
        padding: 1rem 1.5rem;
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .login-container {
        padding: 1vh 5px;
        align-items: flex-start;
        padding-top: 3vh;
    }

    .login-form {
        padding: 1.5rem;
        max-width: 90vw !important;
        width: 90vw;
        min-width: unset;
        margin-top: 1vh;
        margin-bottom: 3vh;
    }

    .login-form h1 {
        font-size: 2rem;
        margin-bottom: 1rem;
    }

    .form-group input {
        padding: 0.875rem 1rem;
    }

    .form-group {
        margin-bottom: 1.25rem;
    }
}

/* Password Validation Styles */
.password-requirements {
    margin-top: 0.5rem;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: none;
}

.requirement {
    display: flex;
    align-items: center;
    margin: 0.25rem 0;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    transition: all 0.3s ease;
}

.requirement::before {
    content: '○';
    margin-right: 0.5rem;
    transition: all 0.3s ease;
}

.requirement.valid {
    color: #2ecc71;
}

.requirement.valid::before {
    content: '✓';
    color: #2ecc71;
}

.requirement.invalid {
    color: #e74c3c;
}

.requirement.invalid::before {
    content: '✗';
    color: #e74c3c;
}

.password-match-feedback {
    margin-top: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.password-match-feedback.valid {
    color: #2ecc71;
    background: rgba(46, 204, 113, 0.1);
    border: 1px solid rgba(46, 204, 113, 0.3);
}

.password-match-feedback.invalid {
    color: #e74c3c;
    background: rgba(231, 76, 60, 0.1);
    border: 1px solid rgba(231, 76, 60, 0.3);
}

/* Checkbox group styling */
.checkbox-group {
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
    font-weight: 400;
    letter-spacing: 0.3px;
    transition: all 0.3s ease;
    padding: 0.5rem;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.checkbox-group label:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(46, 204, 113, 0.3);
    transform: translateY(-1px);
}

/* Hide default checkbox */
.checkbox-filter {
    opacity: 0;
    position: absolute;
    width: 0;
    height: 0;
}

/* Custom checkbox styling */
.checkbox-filter+span {
    position: relative;
    padding-left: 2.5rem;
}

.checkbox-filter+span::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

/* Checkmark styling */
.checkbox-filter+span::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
    width: 8px;
    height: 4px;
    border: 2px solid transparent;
    border-right-color: #ffffff;
    border-bottom-color: #ffffff;
    opacity: 0;
    transition: all 0.3s ease;
}

/* Checked state */
.checkbox-filter:checked+span::before {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    border-color: #2ecc71;
    box-shadow: 0 4px 15px rgba(46, 204, 113, 0.3);
}

.checkbox-filter:checked+span::after {
    opacity: 1;
    transform: translateY(-50%) rotate(45deg) scale(1);
}

/* Focus state for accessibility */
.checkbox-filter:focus+span::before {
    box-shadow: 0 0 0 3px rgba(46, 204, 113, 0.3);
}

/* Active state */
.checkbox-group label:active {
    transform: scale(0.98);
}