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

html, body {
    height: 100%;
    font-family: 'Segoe UI', sans-serif;
    overflow-x: hidden; /* allow vertical scroll, block horizontal */
}

/* Background Image */
.background {
    background: url('../images/bg.jpg') no-repeat center center fixed;
    background-size: cover;
    position: fixed;
    width: 100%;
    height: 100%;
    z-index: -1;
}

/* Container to center form */
.container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 400px;
    padding: 10px;
}

/* Glassmorphism Form */
.form-box {
    display: none;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 30px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 8px 32px rgba(0,0,0,0.37);
    color: white;
    transition: all 0.3s ease;
}

.form-box.active {
    display: block;
}

/* Headings */
h2 {
    text-align: center;
    margin-bottom: 20px;
    font-weight: 500;
}

/* Input & Select */
input, select {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: none;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
    font-size: 14px;
    outline: none;
}

input::placeholder,
select {
    color: #eee;
}

button {
    width: 100%;
    padding: 12px;
    background: rgba(255,255,255,0.4);
    border: none;
    color: white;
    font-weight: bold;
    border-radius: 10px;
    cursor: pointer;
    transition: 0.3s ease;
}

button:hover {
    background: rgba(255,255,255,0.6);
}

/* Text below buttons */
p {
    text-align: center;
    font-size: 14px;
}

a {
    color: #90caf9;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.error {
    text-align: center;
    color: #ff6b6b;
    font-size: 14px;
    margin-bottom: 10px;
}


/* -------- Responsive Tweaks -------- */

/* Very short screens */
@media (max-height: 450px) {
    .container {
        top: 55%;
        transform: translate(-50%, -50%);
    }

    .form-box {
        padding: 20px;
    }
}

/* Small mobile screens */
@media (max-width: 400px) {
    .container {
        width: 95%;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
    }

    .form-box {
        padding: 20px 15px;
    }

    input, select, button {
        font-size: 13px;
        padding: 10px;
    }

    h2 {
        font-size: 18px;
    }

    p {
        font-size: 12px;
    }
}

/* Extra small devices (<=320px like old iPhones) */
@media (max-width: 320px) {
    .form-box {
        padding: 15px 10px;
    }

    h2 {
        font-size: 16px;
    }

    input, select, button {
        font-size: 12px;
        padding: 8px;
    }
}
