body, html {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: 'Segoe UI', Arial, sans-serif;
    background: #2471f3; /* Same blue as main page */
    color: #222;
}

/* HEADER STYLING */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 3vw;
    background: #fff;
    box-shadow: 0 2px 12px rgba(50,50,50,0.07);
    position: sticky;
    top: 0;
    z-index: 100;
}

.brand {
    font-weight: 700;
    font-size: 1.4rem;
    letter-spacing: .03em;
}

.highlight {
    color: #257cff;
    font-weight: bold;
}

.header nav a {
    padding: .55em 1.4em;
    border-radius: 1.5em;
    border: 1.5px solid #257cff;
    background: transparent;
    color: #257cff;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: background .15s, color .15s, border-color .15s;
    display: inline-block;
}

.header nav a:hover {
    background: #184c99;
    color: #fff;
    border-color: #184c99;
}

/* LOGIN CONTAINER */
.container {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 2px 32px rgba(60,60,60,0.09);
    max-width: 480px; /* Increased from 350px */
    width: 90%; /* Added to ensure responsiveness */
    margin: 60px auto 0 auto;
    padding: 3em 3em; /* Increased padding */
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 2rem;
}

h1 {
    margin-bottom: 1.8em; /* Increased spacing */
    color: #257cff;
    letter-spacing: .03em;
    font-size: 1.8em; /* Increased font size */
    font-weight: 700;
}

.log {
    width: 100%;
    max-width: 420px; /* Added max-width for form content */
    margin: 0 auto;
}

form {
    display: flex;
    flex-direction: column;
    gap: 1.5em; /* Increased gap */
}

label {
    font-weight: 600;
    margin-bottom: 0.4em; /* Increased spacing */
    color: #222;
    font-size: 1.1em; /* Added font size */
}

input[type="text"], 
input[type="password"] {
    padding: 0.9em 1.2em; /* Increased padding */
    border-radius: 10px; /* Increased border radius */
    border: 1.5px solid #257cff;
    outline: none;
    margin-bottom: 0.5em;
    font-size: 1.1em; /* Increased font size */
    background: #f5f8ff;
    width: 100%;
    transition: border-color 0.2s, background 0.2s;
}

input[type="text"]:focus, 
input[type="password"]:focus {
    border-color: #184c99;
    background: #eaf1ff;
}

button[type="submit"] {
    margin-top: 1em; /* Increased margin */
    background: #257cff;
    color: #fff;
    border: 1.5px solid #257cff;
    border-radius: 12px; /* Changed to regular border radius */
    padding: 1em 0; /* Increased padding */
    font-size: 1.2em; /* Increased font size */
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
    box-shadow: 0 2px 8px rgba(57, 87, 181, 0.08);
    width: 100%;
}

button[type="submit"]:hover {
    background: #184c99;
    color: #fff;
    border-color: #184c99;
}

.log p {
    margin-top: 1.2em;
    text-align: center;
    font-size: .98em;
    color: #444;
}

.log a {
    color: #257cff;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.15s;
}

.log a:hover {
    color: #184c99;
    text-decoration: underline;
}

footer {
    position: relative; /* Change from fixed to relative */
    width: 100%;
    text-align: center;
    padding: 1.5em 0;
    background: #fff;
    color: #272727;
    font-weight: 500;
    font-size: .98em;
    margin-top: 2rem;
    box-shadow: 0 -1px 8px rgba(70,70,70,0.03);
    border-radius: 12px 12px 0 0;
}

footer > p {
    padding: 0;
    margin: 0;

}

/* ========================================
   RESPONSIVE MEDIA QUERIES - AUTH PAGES
======================================== */

/* Large devices (laptops/desktops, 992px and up) */
@media (max-width: 1199.98px) {
    .header {
        padding: 1rem 2.5vw;
    }
    
    .container {
        max-width: 450px;
        padding: 2.5rem 2rem;
    }
}

/* Medium devices (tablets, 768px and up) */
@media (max-width: 991.98px) {
    .header {
        padding: 1rem 2vw;
        flex-direction: column;
        gap: 1rem;
    }
    
    .brand {
        font-size: 1.2rem;
        text-align: center;
    }
    
    .container {
        max-width: 90%;
        padding: 2rem 1.5rem;
        margin-top: 2rem;
    }
    
    h1 {
        font-size: 1.8rem;
    }
    
    input[type="text"], 
    input[type="password"] {
        padding: 1rem;
        font-size: 1rem;
    }
    
    button[type="submit"] {
        padding: 1rem;
        font-size: 1.1rem;
    }
}

/* Small devices (landscape phones, 576px and up) */
@media (max-width: 767.98px) {
    .header {
        padding: 0.8rem 1.5vw;
    }
    
    .brand {
        font-size: 1.1rem;
    }
    
    .header nav a {
        padding: 0.5rem 1.2rem;
        font-size: 0.9rem;
    }
    
    .container {
        max-width: 95%;
        padding: 1.8rem 1.2rem;
        margin-top: 1.5rem;
        border-radius: 12px;
    }
    
    h1 {
        font-size: 1.6rem;
        margin-bottom: 1.5rem;
    }
    
    .log {
        padding: 1.5rem 1rem;
    }
    
    label {
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
    }
    
    input[type="text"], 
    input[type="password"] {
        padding: 0.9rem;
        font-size: 0.95rem;
        margin-bottom: 1rem;
    }
    
    button[type="submit"] {
        padding: 0.9rem;
        font-size: 1rem;
    }
    
    .log p {
        font-size: 0.9rem;
        margin-top: 1rem;
    }
    
    footer {
        padding: 1.5rem 1rem;
        font-size: 0.85rem;
    }
}

/* Extra small devices (portrait phones, less than 576px) */
@media (max-width: 575.98px) {
    .header {
        padding: 0.8rem 1vw;
        text-align: center;
    }
    
    .brand {
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }
    
    .header nav {
        width: 100%;
        justify-content: center;
    }
    
    .header nav a {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
        min-width: 80px;
    }
    
    .container {
        padding: 1.5rem 1rem;
        margin-top: 1rem;
        border-radius: 10px;
        min-height: auto;
    }
    
    h1 {
        font-size: 1.4rem;
        margin-bottom: 1.2rem;
    }
    
    .log {
        padding: 1.2rem 0.8rem;
    }
    
    label {
        font-size: 0.85rem;
        margin-bottom: 0.4rem;
    }
    
    input[type="text"], 
    input[type="password"] {
        padding: 0.8rem;
        font-size: 0.9rem;
        margin-bottom: 0.8rem;
        border-radius: 6px;
    }
    
    button[type="submit"] {
        padding: 0.8rem;
        font-size: 0.95rem;
        border-radius: 6px;
    }
    
    .log p {
        font-size: 0.85rem;
        margin-top: 0.8rem;
    }
    
    .log a {
        font-size: 0.85rem;
    }
    
    footer {
        padding: 1.2rem 0.75rem;
        font-size: 0.8rem;
    }
    
    footer p {
        margin-bottom: 0.3rem;
    }
}

/* iPad specific (768px x 1024px) */
@media only screen and (min-device-width: 768px) and (max-device-width: 1024px) {
    .header {
        padding: 1.2rem 3vw;
    }
    
    .container {
        max-width: 500px;
        padding: 3rem 2.5rem;
        margin-top: 3rem;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    input[type="text"], 
    input[type="password"] {
        padding: 1.2rem;
        font-size: 1.1rem;
        min-height: 44px; /* iOS touch target minimum */
    }
    
    button[type="submit"] {
        padding: 1.2rem;
        font-size: 1.2rem;
        min-height: 44px;
    }
    
    .log {
        padding: 2rem;
    }
}

/* Landscape orientation adjustments */
@media (orientation: landscape) and (max-height: 500px) {
    .container {
        margin-top: 1rem;
        padding: 1.5rem;
    }
    
    h1 {
        font-size: 1.3rem;
        margin-bottom: 1rem;
    }
    
    .log {
        padding: 1rem;
    }
    
    input[type="text"], 
    input[type="password"] {
        padding: 0.7rem;
        margin-bottom: 0.8rem;
    }
    
    button[type="submit"] {
        padding: 0.7rem;
    }
    
    footer {
        padding: 1rem;
        font-size: 0.8rem;
    }
}

/* Touch devices - better touch targets */
@media (hover: none) and (pointer: coarse) {
    input[type="text"], 
    input[type="password"] {
        min-height: 48px;
        padding: 1rem;
    }
    
    button[type="submit"] {
        min-height: 48px;
        padding: 1rem 2rem;
    }
    
    .header nav a {
        min-height: 44px;
        min-width: 44px;
        padding: 0.8rem 1.5rem;
    }
    
    .log a {
        min-height: 44px;
        padding: 0.5rem;
        display: inline-block;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    input[type="text"], 
    input[type="password"] {
        border: 2px solid #000;
    }
    
    button[type="submit"] {
        border: 2px solid #000;
    }
    
    .container {
        border: 2px solid #000;
    }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .container {
        animation: none;
    }
    
    input[type="text"]:focus, 
    input[type="password"]:focus,
    button[type="submit"]:hover,
    .header nav a:hover {
        transition: none;
    }
}

/* Add animation for container */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.container {
    animation: fadeIn 0.5s ease-out;
}