@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Hedvig+Letters+Serif:opsz@12..24&display=swap');

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

html,
body {
    height: 100%;
    font-family: 'Inter', sans-serif;
}

body {
    display: flex;
    flex-direction: column;
    background-color: #1F1E1D;
}

h1 {
    font-size: 32px;
    font-weight: 400;
    line-height: 32px;
    color: #1F1E1D;
    margin-bottom: 25px;
    font-family: 'Hedvig Letters Serif', serif;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    color: #F5F5F5;
    background-color: #1F1E1D;
}

.nav a {
    color: #F5F5F5;
    text-decoration: none;
    font-size: 14px;
    font-weight: 400;
    line-height: 22px;
    transition: text-decoration 0.2s ease;
}

.nav a:hover {
    text-decoration: underline;
}

.brand svg {
    display: block;
}

.tools {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-right: 10px;
}

.legal {
    display: flex;
    gap: 20px;
}

.help {
    display: flex;
    align-items: center;
    gap: 7px;
}

.help svg {
    display: block;
}

.legal a,
.help a {
    font-size: 12px;
    line-height: 19px;
}

.content {
    flex: 1;
    padding: 0 12px 12px;
    overflow: hidden;
}

.form-contain {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    padding: 24px;
    background-color: #F5F5F5;
    border-radius: 16px;
}

#signin-form {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 340px;
}

.input-group {
    position: relative;
    margin-top: 15px;
    width: 100%;
}

#name,
#grade {
    width: 100%;
    padding: 14px 20px; 
    border: 1px solid rgba(31, 30, 29, 0.4);
    border-radius: 8px;
    font-size: 16px;
    font-weight: 400;
    line-height: 24px;
    color: #1F1E1D;
    background-color: transparent;
    transition: border-color 0.2s ease;
    appearance: none;
}

.input-group label {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    color: rgba(31, 30, 29, 0.4);
    pointer-events: none;
    transition: all 0.2s ease;
    font-family: 'Inter', sans-serif;
    background-color: transparent; 
    padding: 0 4px;
    z-index: 1;
}

#name:focus,
#grade:focus {
    outline: none;
    border-color: #007BFF;
}

#name:focus ~ label,
#name:not(:placeholder-shown) ~ label,
#grade:focus ~ label,
#grade:valid ~ label {
    top: 0;
    transform: translateY(-50%);
    font-size: 12px;
    font-weight: 500;
    color: #007BFF;
    background-color: #F5F5F5;
}

#name:not(:placeholder-shown):not(:focus) ~ label,
#grade:valid:not(:focus) ~ label {
    color: rgba(31, 30, 29, 0.6);
}

#grade {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231F1E1D' stroke-opacity='0.4' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 20px center;
    background-size: 16px 16px;
}

#sign-in-btn {
    width: 100%;
    padding: 14px 20px;
    margin-top: 20px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 400;
    font-family: 'Inter', sans-serif;
    line-height: 22px;
    color: #F5F5F5;
    background-color: #1F1E1D;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

#sign-in-btn:hover {
    opacity: 0.9;
}

#sign-in-btn:active {
    opacity: 0.8;
}

.separator {
    width: 340px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 20px 0;
}

.line {
    flex: 1;
    height: 1px;
    background-color: rgba(31, 30, 29, 0.4);
}

.or {
    padding: 0 20px;
    color: #1F1E1D;
    font-size: 16px;
    font-weight: 600;
}

.alternative {
    width: 340px;
    display: flex;
    justify-content: center;
    padding: 14px 20px;
    border: 1px solid #007BFF;
    border-radius: 8px;
    background-color: rgba(0, 123, 255, 0.05);
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.alternative a {
    color: #007BFF;
    text-decoration: none;
    font-size: 16px;
}

.alternative:hover {
    background-color: rgba(0, 123, 255, 0.2);
}
