﻿body {
    font-family: Arial, sans-serif;
    margin: 0;
    background: white;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.background-pattern {
    background-image: url('threads-pattern.png');
    background-repeat: repeat-x;
    height: 150px;
    width: 100%;
}

.login-container {
    margin-top: 80px;
    text-align: center;
    width: 320px;
}

.input-field {
    width: 100%;
    padding: 12px;
    margin: 8px 0;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 14px;
}

.login-btn {
    width: 100%;
    padding: 12px;
    background-color: black;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
}

.forgot-password {
    display: block;
    margin-top: 12px;
    color: #666;
    text-decoration: none;
    font-size: 12px;
}

.separator {
    margin: 20px 0;
    text-align: center;
    color: #aaa;
}

    .separator span {
        padding: 0 10px;
    }

.hsrty-login {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    background: white;
    font-size: 14px;
    cursor: pointer;
}

    .hsrty-login img.hstry {
        width: 40px;
        height: 40px;
        margin-right: 8px;
    }

    .hsrty-login img {
        width: 20px;
        height: 20px;
        margin-right: 8px;
    }

.footer {
    margin-top: auto;
    text-align: center;
    padding: 20px;
    font-size: 12px;
    color: #888;
}

.qr-section {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.qr-code {
    width: 80px;
    height: 80px;
    margin-top: 5px;
}

/* Validation error message */
.error {
    color: #e74c3c;
    font-size: 12px;
    margin-top: 4px;
    display: none;
}
/* ----------------------------------------
   1) Fluid container
---------------------------------------- */
.login-container {
    width: 90%; /* fluid on small screens */
    max-width: 400px; /* but never get wider than 400px */
    margin: 80px auto 0; /* center‑horizontally, add top space */
    padding: 0 16px; /* breathing room */
}

/* ----------------------------------------
   2) Background pattern scaling
---------------------------------------- */
.background-pattern {
    background-size: auto 150px;
    height: 150px;
}

@media (max-width: 480px) {
    .background-pattern {
        background-size: auto 80px;
        height: 80px;
    }
}

/* ----------------------------------------
   3) Button & footer adjustments
---------------------------------------- */
.hsrty-login {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

@media (max-width: 400px) {
    /* stack the “Create/Join” button contents on tiny screens */
    .hsrty-login {
        flex-direction: column;
        gap: 4px;
    }

        .hsrty-login img.hstry {
            width: 32px;
            height: 32px;
        }
}

.footer {
    margin-top: auto;
    text-align: center;
    padding: 20px;
    font-size: 12px;
    color: #888;
}

@media (max-width: 480px) {
    .footer {
        font-size: 10px;
        padding: 12px;
    }
}

/* ----------------------------------------
   4) Form fields (already fluid, but just in case)
---------------------------------------- */
.input-field,
.login-btn,
.hsrty-login {
    width: 100%;
    box-sizing: border-box;
}

/* ----------------------------------------
   5) Misc adjustments for tablets
---------------------------------------- */
@media (min-width: 481px) and (max-width: 768px) {
    .login-container {
        margin-top: 100px;
    }
}

/* ----------------------------------------
   6) Keep link sizes tappable
---------------------------------------- */
.forgot-password {
    display: inline-block;
    padding: 12px 0;
}