/* ===============================
   RESET + BACKGROUND
=================================*/
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    width: 100%;
    overflow-x: hidden;
}

body {
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 16px;
    font-family: 'Segoe UI', Arial, sans-serif;
    background: linear-gradient(135deg, #1E1E2F, #2C2C3E, #3A1C71);
    overflow-x: hidden;
}

/* ===============================
   BADGE
=================================*/
.badge {
    display: inline-block;
    padding: 4px 10px;
    background: #2c3e50;
    color: white;
    font-size: 12px;
    border-radius: 6px;
    margin-bottom: 8px;
}

/* ===============================
   LOGIN CONTAINER (GLASS)
=================================*/
.login-container {
    position: relative;
    width: 100%;
    max-width: 420px;
    padding: 36px 28px;
    border-radius: 22px;
    text-align: center;

    background: rgba(255, 255, 255, 0.07);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255,255,255,0.2);

    box-shadow: 0 10px 35px rgba(0,0,0,0.5),
                0 0 20px rgba(255, 193, 7, 0.25);

    transition: transform 0.3s ease;
    overflow: hidden;
}

.login-container:hover {
    transform: translateY(-4px);
}

/* ===============================
   CLOSE BUTTON
=================================*/
.close-btn {
    position: absolute;
    top: 12px;
    right: 14px;
    font-size: 24px;
    font-weight: bold;
    color: #fff;
    text-decoration: none;
    line-height: 1;
    transition: 0.3s;
    z-index: 2;
}

.close-btn:hover {
    color: #facc15;
    transform: scale(1.15);
}

/* ===============================
   LOGO
=================================*/
.login-container img {
    width: 100%;
    max-width: 180px;
    height: auto;
    margin: 0 auto 10px;
    display: block;
}

/* ===============================
   TITLE
=================================*/
.login-container h2 {
    margin: 8px 0 18px;
    letter-spacing: 1px;
    color: white;
    text-shadow: 0 0 12px rgba(255,255,255,0.4);
    font-size: 28px;
}

/* ===============================
   INPUT GROUP (Floating Label)
=================================*/
.input-group {
    position: relative;
    margin: 16px 0;
}

.input-group input,
.input-group select {
    width: 100%;
    height: 50px;
    padding: 14px 18px;
    border-radius: 30px;
    border: none;
    outline: none;
    font-size: 15px;
    background: rgba(255,255,255,0.92);
    color: #222;
    transition: 0.3s ease;
}

.input-group input::placeholder {
    color: transparent;
}

.input-group input:focus,
.input-group select:focus {
    background: rgba(255,255,255,0.98);
    box-shadow: 0 0 12px rgba(255,193,7,0.6);
}

.input-group label {
    position: absolute;
    top: 50%;
    left: 18px;
    transform: translateY(-50%);
    font-size: 14px;
    color: #777;
    pointer-events: none;
    transition: 0.2s ease;
    background: transparent;
    padding: 0 4px;
}

.input-group input:focus + label,
.input-group input:not(:placeholder-shown) + label,
.input-group select:focus + label,
.input-group select:valid + label {
    top: 0;
    left: 16px;
    transform: translateY(-50%);
    font-size: 12px;
    color: #FFC107;
    background: rgba(42, 35, 74, 0.95);
    border-radius: 10px;
}

.input-group select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
}

/* ===============================
   BUTTON
=================================*/
.login-container button {
    margin-top: 18px;
    padding: 14px;
    width: 100%;
    border-radius: 30px;
    border: none;
    cursor: pointer;
    font-weight: bold;
    font-size: 15px;

    background: linear-gradient(135deg, #FFC107, #FFD54F);
    color: #1E1E2F;

    box-shadow: 0 5px 15px rgba(255,193,7,0.4);
    transition: 0.3s ease;
}

.login-container button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255,193,7,0.7);
}

/* ===============================
   REGISTER LINK
=================================*/
.register {
    margin-top: 14px;
    font-size: 14px;
    color: white;
    line-height: 1.5;
}

.register a {
    text-decoration: none;
    color: #FFC107;
    transition: 0.3s;
}

.register a:hover {
    color: white;
}

/* ===============================
   MESSAGES
=================================*/
.error,
.success {
    padding: 10px 12px;
    border-radius: 8px;
    margin-bottom: 12px;
    font-size: 13px;
    text-align: center;
    line-height: 1.4;
}

.error {
    color: #FF4D4D;
    background: rgba(255, 77, 77, 0.1);
}

.success {
    color: #4CAF50;
    background: rgba(76, 175, 80, 0.1);
}

input.invalid {
    border: 1px solid #FF4D4D;
    box-shadow: 0 0 8px rgba(255, 77, 77, 0.6);
}

/* ===============================
   TABLET
=================================*/
@media (max-width: 768px) {
    body {
        padding: 18px;
        align-items: center;
    }

    .login-container {
        max-width: 380px;
        padding: 32px 24px;
    }

    .login-container img {
        max-width: 160px;
    }

    .login-container h2 {
        font-size: 24px;
    }
}

/* ===============================
   PHONE
=================================*/
@media (max-width: 480px) {
    body {
        padding: 12px;
        align-items: center;
    }

    .login-container {
        max-width: 100%;
        padding: 24px 16px 20px;
        border-radius: 18px;
    }

    .login-container img {
        max-width: 140px;
        margin-bottom: 8px;
    }

    .login-container h2 {
        font-size: 22px;
        margin-bottom: 14px;
    }

    .input-group {
        margin: 14px 0;
    }

    .input-group input,
    .input-group select,
    .login-container button {
        height: 46px;
        font-size: 14px;
    }

    .input-group label {
        left: 16px;
        font-size: 13px;
    }

    .close-btn {
        top: 10px;
        right: 12px;
        font-size: 22px;
    }

    .register {
        font-size: 13px;
    }
}

/* ===============================
   SMALL PHONE
=================================*/
@media (max-width: 360px) {
    body {
        padding: 10px;
    }

    .login-container {
        padding: 22px 14px 18px;
    }

    .login-container img {
        max-width: 125px;
    }

    .login-container h2 {
        font-size: 20px;
    }

    .input-group input,
    .input-group select,
    .login-container button {
        height: 44px;
        font-size: 13px;
        padding: 12px 16px;
    }

    .register,
    .error,
    .success {
        font-size: 12px;
    }
}