:root {
    --oxford-blue: #001a39;
    --oxford-gold: #ffcc00;
    --oxford-gold-hover: #ffd633;
    --teacher-teal: #00d2d3;
    --teacher-teal-hover: #48dbfb;
    --glass-bg: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.15);
    
    /* Unified Theme Variables */
    --theme-primary: #36336dff;
    --theme-button: #36336dff;
    --theme-button-hover: #36336dff;
}

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

body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding-left: 8%;
    background-image: url('https://oxford.ps/frontend backgruond.jpg');
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    overflow-x: hidden;
    position: relative;
}

body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at left, rgba(0, 26, 57, 0.4) 0%, rgba(0, 26, 57, 0.7) 100%);
    z-index: 0;
}

/* --- Login Card & Animation --- */
.login-card {
    position: relative;
    overflow: hidden;
    background: var(--glass-bg) !important;
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 24px;
    padding: 45px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.4);
    z-index: 1;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.login-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
}

.border-animation {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    padding: 3px;
    -webkit-mask: 
        linear-gradient(#fff 0 0) content-box, 
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
}

.border-animation::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    top: -50%;
    left: -50%;
    background: conic-gradient(from 0deg, transparent 0%, transparent 60%, rgba(255, 255, 255, 0.3) 85%, #ffffff 100%);
    animation: rotate-border 4s linear infinite;
}

@keyframes rotate-border {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.login-logo {
    width: 90px;
    height: auto;
    margin-bottom: 25px;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
}

.login-card h2 {
    color: #ffffff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
    margin-bottom: 25px;
    font-weight: 700;
}

/* --- Form Elements --- */
.form-floating > .form-control {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    color: #fff;
    padding-left: 15px;
}

.form-floating > .form-control:focus {
    background-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.05);
    border-color: var(--theme-primary) !important;
}

.form-floating > label {
    color: rgba(255, 255, 255, 0.5);
    padding-left: 15px;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label {
    color: var(--theme-primary) !important;
    font-weight: 700;
    transform: scale(0.85) translateY(-1rem) !important;
}

.password-toggle {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: rgba(255, 255, 255, 0.4);
    z-index: 20;
    font-size: 1.25rem;
    transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.login-btn {
    border-radius: 14px;
    padding: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    background-color: var(--theme-button);
    border: 2px solid var(--theme-button);
    color: #ffffff;
}

.login-btn:hover {
    background-color: transparent;
    color: #ffffff !important;
    border-color: #ffffff;
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
}

.login-links a {
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    font-size: 0.85rem;
    transition: 0.3s;
    font-weight: 500;
}

.login-links a:hover {
    color: #fff;
    text-shadow: 0 0 10px rgba(255,255,255,0.5);
}

/* Ensure content is above everything */
.login-card > div:not(.border-animation), 
.login-card > form {
    position: relative;
    z-index: 10;
}

/* --- Responsive Design --- */
@media (max-width: 1024px) {
    body {
        justify-content: center;
        padding-left: 0;
    }
    .container-fluid.d-flex {
        justify-content: center !important;
    }
}

@media (max-width: 576px) {
    .login-card {
        padding: 35px 25px;
        max-width: 92%;
    }
    .login-logo {
        width: 80px;
    }
}

@keyframes cardEntrance {
    from { opacity: 0; transform: translateX(-50px); }
    to { opacity: 1; transform: translateX(0); }
}

.animate-entrance {
    animation: cardEntrance 1s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}