@import url(https://fonts.googleapis.com/css?family=Exo:100,200,400,700);
@import url(https://fonts.googleapis.com/css?family=Source+Sans+Pro:700,400,300);

html {
    overflow-x: hidden;
}

body {
    margin: 0;
    padding: 0;
    background: #111;
    color: #fff;
    font-family: Arial;
    font-size: 14px;
    min-height: 100dvh;
}

.body {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('/images/Studenterlogin.jpg');
    background-size: cover;
    background-position: center;
    -webkit-filter: blur(9px);
    filter: blur(9px);
    transform: scale(1.05);
    z-index: 0;
}

.grad {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.65) 100%);
    z-index: 1;
    opacity: 0.7;
}

/* Main Content Wrapper */
.login-wrapper {
    position: relative;
    width: 100%;
    min-height: 100dvh;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: env(safe-area-inset-top, 16px) 1.5rem env(safe-area-inset-bottom, 16px);
    box-sizing: border-box;
}

.header {
    text-align: center;
    margin-bottom: 2rem;
    width: 100%;
}

.header div {
    color: #fff;
    font-family: 'Exo', sans-serif;
    font-size: clamp(28px, 9vw, 48px);
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    white-space: nowrap;
}

.header div span {
    color: #5379fa !important;
}

/* Glass Card & Controls */
.glass-card {
    width: 100%;
    max-width: 400px;
    padding: 2rem;
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.2);
}

.glass-control {
    width: 100%;
    height: 45px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 4px;
    color: #fff;
    font-family: 'Exo', sans-serif;
    font-size: 16px;
    font-weight: 400;
    padding: 10px 15px;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.glass-control:focus {
    outline: none;
    background: rgba(0, 0, 0, 0.4);
    border-color: #5379fa;
    box-shadow: 0 0 0 0.25rem rgba(83, 121, 250, 0.25);
}

.glass-control::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

/* Password field with show/hide toggle */
.password-field {
    position: relative;
}

.password-field .glass-control {
    padding-right: 45px;
}

.password-toggle {
    position: absolute;
    top: 0;
    right: 0;
    height: 45px;
    width: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
}

.password-toggle:hover,
.password-toggle:focus-visible {
    color: #fff;
    outline: none;
}

.btn-glass {
    width: 100%;
    height: 45px;
    background: #fff;
    border: none;
    cursor: pointer;
    border-radius: 4px;
    color: #333;
    font-family: 'Exo', sans-serif;
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.2s;
}

.btn-glass:hover {
    background: #f0f0f0;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

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

.btn-glass:disabled {
    cursor: not-allowed;
    opacity: 0.75;
    transform: none;
    box-shadow: none;
}

.btn-glass .spinner-border {
    width: 1rem;
    height: 1rem;
    border-width: 0.15em;
    vertical-align: -0.15em;
}

/* Alert Overrides for Glass Theme */
.alert {
    border-radius: 4px;
    padding: 1rem;
    margin-bottom: 1rem;
    border: none;
    background: rgba(255, 255, 255, 0.9);
}

.alert-danger {
    color: #c0392b;
    border-left: 4px solid #c0392b;
}

.alert-success {
    color: #27ae60;
    border-left: 4px solid #27ae60;
}

/* iPhone X+ safe area and small screen adjustments */
@media (max-width: 430px) {
    .glass-card {
        padding: 1.5rem 1.25rem;
    }
}
