/* Reset */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', sans-serif;
}

/* Body */
body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    background: linear-gradient(135deg, #667eea, #764ba2);
}

/* Container */
.box {
    width: 100%;
    max-width: 380px;
    padding: 40px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

.box h2 {
    margin-bottom: 25px;
    color: #333;
    text-align: center;
}

/* Inputs */
.inputBox {
    position: relative;
    margin-bottom: 20px;
}

.inputBox input {
    width: 100%;
    padding: 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    outline: none;
    font-size: 15px;
    transition: border 0.3s ease;
}

.inputBox input:focus {
    border-color: #667eea;
}

.inputBox label {
    position: absolute;
    top: 50%;
    left: 14px;
    padding: 0 4px;
    background: #fff;
    color: #999;
    font-size: 14px;
    pointer-events: none;
    transform: translateY(-50%);
    transition: top 0.3s ease, color 0.3s ease, font-size 0.3s ease;
}

.inputBox input:focus + label,
.inputBox input:not(:placeholder-shown) + label {
    top: -8px;
    left: 10px;
    color: #667eea;
    font-size: 12px;
}

/* Password */
.passwordBox {
    position: relative;
}

.passwordBox input {
    padding-right: 44px;
}

.toggle-password {
    position: absolute;
    top: 50%;
    right: 12px;
    width: auto;
    padding: 0;
    background: transparent;
    color: #777;
    border: none;
    font-size: 16px;
    cursor: pointer;
    transform: translateY(-50%);
    transition: color 0.3s ease;
}

.toggle-password:hover {
    background: transparent;
    color: #667eea;
}

/* Button */
button {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px;
    background: #667eea;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 700;
    transition: background 0.3s ease, opacity 0.3s ease;
}

button:hover {
    background: #5a67d8;
}

button.loading {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Feedback */
.error,
.error-message {
    margin-bottom: 15px;
    padding: 10px;
    background: #ffe5e5;
    color: #c0392b;
    border-radius: 6px;
    text-align: center;
}

/* Helpers */
.hidden {
    display: none;
}

/* Responsive */
@media (max-width: 768px) {
    .box {
        padding: 30px;
    }

    .box h2 {
        font-size: 22px;
    }
}

@media (max-width: 480px) {
    body {
        align-items: flex-start;
        padding-top: 40px;
    }

    .box {
        padding: 25px;
    }

    .box h2 {
        font-size: 20px;
    }

    .inputBox input,
    button {
        padding: 12px;
        font-size: 14px;
    }
}
