/* =========================
   AUTH BASE (DESKTOP)
========================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* body {
    font-family: "Inter", "Segoe UI", Roboto, Arial, sans-serif;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #e5e7eb;

    /* Modern gradient */
    /*background: linear-gradient(135deg, #020617, #0f172a, #020617);
}*/

body {
    font-family: "Inter", "Segoe UI", Roboto, Arial, sans-serif;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #e5e7eb;

    background: 
        linear-gradient(rgba(2,6,23,0.75), rgba(2,6,23,0.75)),
        url("../images/auth-bg.jpg") center/cover no-repeat;
    overflow-x: hidden;
}

body::before{
    content:"";
    position:fixed;
    inset:0;
    background:rgba(0,0,0,0.55);
    z-index:-1;
}

#bgVideo{
    position:fixed;
    top:0;
    left:0;
    width:100%;
    height:100%;
    object-fit:cover;
    z-index:-2;
}

.auth-box {
    width: 380px;
    /*background: #0a8bf5;*/
    padding: 28px;
    border-radius: 14px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
    background: rgba(2, 6, 23, 0.75);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255,255,255,0.08);
}

.auth-box h2 {
    text-align: center;
    margin-bottom: 22px;
    font-weight: 600;
}

.auth-box input {
    width: 100%;
    padding: 12px 14px;
    margin-bottom: 14px;
    border-radius: 10px;
    border: 1px solid #1e293b;
    background: #020617;
    color: #e5e7eb;
    outline: none;
}

.auth-box input:focus{
    border-color:#22c55e;
}

.auth-box button {
    width: 100%;
    margin-top: 6px;
    padding: 12px;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #020617;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
}

.auth-box button:hover{
    filter:brightness(1.1);
}

.auth-box a {
    display: block;
    margin-top: 10px;
    text-align: center;
    font-size: 14px;
    color: #94a3b8;
    text-decoration: none;
}

.error-msg {
    background: #fee2e2;
    color: #991b1b;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 12px;
    font-size: 14px;
    text-align: center;
}

/* =========================
   REGISTER MODAL
========================= */

.modal{
    position:fixed;
    inset:0;
    background:rgba(0,0,0,0.7);
    display:flex;
    align-items:center;
    justify-content:center;
    z-index:9999;
}

.modal.hidden{
    display:none;
}

.modal-box{
    width:90%;
    max-width:420px;
    background:#020617;
    padding:25px;
    border-radius:14px;
    box-shadow:0 20px 40px rgba(0,0,0,0.7);
    max-height:90vh;
    overflow-y:auto;
}

.modal-box h2{
    text-align:center;
    margin-bottom:18px;
}

.modal-box input{
    width:100%;
    padding:12px 14px;
    margin-bottom:14px;
    border-radius:10px;
    border:1px solid #1e293b;
    background:#020617;
    color:#e5e7eb;
}

.modal-box button{
    width:100%;
    padding:12px;
    border:none;
    border-radius:10px;
    background:#22c55e;
    color:#020617;
    font-weight:600;
    cursor:pointer;
    margin-top:6px;
}

/* =========================
   MOBILE
========================= */

@media (max-width:768px){

    #bgVideo{
        display:none;
    }

    body{
        background:#0f172a;
    }

    .auth-wrapper{
        padding:14px;
    }

    .auth-box{
        padding:22px;
    }

}

/* Password toggle */
.password-box {
    position: relative;
}

.password-box .toggle-pass {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
}

.password-box span{
    position:absolute;
    right:12px;
    top:50%;
    transform:translateY(-50%);
    cursor:pointer;
}

.password-box input {
    padding-right: 40px;
}

.toggle-pass {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 16px;
}

.auth-wrapper{
    width:100%;
    max-width:420px;
    padding:20px;
    position:relative;
    z-index:2;
}

.auth-wrapper {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 8px;              /* reduced from 16px */
    box-sizing: border-box;
}
/* Mobile friendly spacing */
        @media (max-width: 768px) {
            .auth-wrapper {
                width: 160%;
                padding: 6px;
                padding-top: 10vh;
                align-items: flex-start;
                box-sizing: border-box;
            }
        
            /* Proper mobile width for login box */
            .auth-box {
                width: 160%;
                max-width: 500px;   /* keeps form readable on tablets */
                margin: 0 auto;     /* center horizontally */
                padding: 16px;
            }
            .floating-group {
                margin-bottom: 10px;
            }
            .floating-group input {
                font-size: 16px;
                height: 40px;
            }
        
        }

.auth-box {
    width: 100%;
    max-width: 420px;
    background: #020617;
    padding: 18px;             /* reduced from 28px */
    border-radius: 10px;
    box-shadow: 0 10px 24px rgba(0,0,0,0.4);
}

/* =========================
   FLOATING LABEL INPUTS
========================= */

.floating-group {
    position: relative;
    margin-bottom: 12px;
}

/* Input */
.floating-group input {
    width: 100%;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #1e293b;
    background: #0f172a;
    color: #e5e7eb;
    outline: none;
    font-size: 15px;
    height: 38px;           /* smaller height */
}

/* Label inside input initially */
.floating-group label {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 13px;
    pointer-events: none;
    transition: all 0.25s ease;
    background: #0f172a;
    padding: 0 6px;
}

/* FLOAT WHEN TYPING OR FOCUS */
.floating-group input:focus + label,
.floating-group input:not(:placeholder-shown) + label {
    top: -7px;
    font-size: 11px;
    color: #22c55e;
}

/* Focus border */
.floating-group input:focus {
    border-color: #22c55e;
}

.live-msg {
    display: block;
    font-size: 12px;
    margin-top: 4px;
}

.live-msg.success {
    color: #22c55e;
}

.live-msg.error {
    color: #ef4444;
}


/* ===========================
   LOGIN LOADING BUTTON
=========================== */
#loginBtn{
    width:100%;
    height:50px;
    border:none;
    border-radius:12px;
    background:linear-gradient(135deg,#2563eb,#1d4ed8);
    color:#fff;
    font-size:16px;
    font-weight:600;
    cursor:pointer;
    display:flex;
    align-items:center;
    justify-content:center;
    gap:10px;
    transition:.25s;
}

#loginBtn:hover{
    transform:translateY(-2px);
    box-shadow:0 12px 30px rgba(37,99,235,.35);
}

#loginBtn:disabled{
    opacity:.8;
    cursor:not-allowed;
}

.spinner{
    width:20px;
    height:20px;
    border:3px solid rgba(255,255,255,.35);
    border-top:3px solid #fff;
    border-radius:50%;
    animation:spin .8s linear infinite;
}

@keyframes spin{
    from{
        transform:rotate(0deg);
    }

    to{
        transform:rotate(360deg);
    }
}