/* Reset and Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #333;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

/* Container */
.container {
    width: 100%;
    max-width: 400px;
    background-color: #ffffff;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    text-align: center;
    animation: fadeIn 0.5s ease-out;
}

/* Typography */
h1 {
    color: #333;
    font-size: 1.8rem;
    margin-bottom: 10px;
}

p {
    color: #666;
    margin-bottom: 30px;
    font-size: 0.95rem;
}

h2 {
    color: #444;
    font-size: 1.4rem;
    margin-bottom: 20px;
}

/* Login Section & Card */
.login-section {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.login-card {
    width: 100%;
    max-width: 100%;
    background: transparent;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* ============================
   FORM – FULL RESPONSIVE FIX
   ============================ */
form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
    /* ensures form always fits screen */
}

/* Inputs responsive */
input[type="password"] {
    width: 100%;
    max-width: 100%;
    /* prevents any overflow */
    padding: 12px 15px;
    border: 2px solid #e1e1e1;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    outline: none;
}

input[type="password"]:focus {
    border-color: #667eea;
}

/* Buttons responsive */
button {
    width: 100%;
    max-width: 100%;
    padding: 12px;
    background: linear-gradient(to right, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(118, 75, 162, 0.3);
}

button:active {
    transform: translateY(0);
}

/* Error Message */
.error {
    background-color: #ffebee;
    color: #c62828;
    padding: 10px;
    border-radius: 6px;
    margin-top: 20px;
    font-size: 0.9rem;
    border: 1px solid #ffcdd2;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =====================================
   RESPONSIVE ADJUSTMENTS
   ===================================== */
@media (max-width: 480px) {

    .container {
        padding: 20px 15px;
        width: 95%;
    }

    h1 {
        font-size: 1.4rem;
    }

    h2 {
        font-size: 1.1rem;
    }

    .login-section {
        flex-direction: column;
        padding: 10px 0;
    }

    .login-card {
        padding: 15px;
    }

    /* FORM corrections */
    form {
        gap: 12px;
    }

    input[type="password"],
    button {
        font-size: 0.95rem;
        padding: 11px;
    }
}

@media (max-width: 320px) {

    .container {
        padding: 15px 10px;
    }

    .login-card {
        padding: 10px;
    }

    h1 {
        font-size: 1.2rem;
    }

    p {
        font-size: 0.85rem;
    }

    form {
        gap: 10px;
    }

    input[type="password"],
    button {
        font-size: 0.85rem;
        padding: 9px;
    }
}