@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&display=swap');

html,
body {
    background-color: #0d0814;
    margin: 0;
    font-family: 'Poppins', sans-serif;
    overflow-x: hidden;
}

.bg-container {
    width: 100%;
    min-height: 100vh;
    padding: 20px;
    box-sizing: border-box;
    position: relative;
    background: linear-gradient(rgba(13, 8, 20, 0.45), rgba(13, 8, 20, 0.45)),
        url('../img/9QiNexr\ -\ Imgur.gif') no-repeat center;
    background-size: cover;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    /* Back to center for desktop presence */
    gap: 20px;
}

/* ── Card Container ── */
.card-container {
    width: min(700px, 92%);
    padding: clamp(1.5rem, 5vh, 2.5rem) clamp(2rem, 8vw, 5rem);
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    border-radius: 28px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.6),
        inset 0 0 0 1px rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 10;
    margin-bottom: 2rem;
    box-sizing: border-box;
}

.card-container::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 28px;
    padding: 1.5px;
    background: linear-gradient(135deg, rgba(255, 0, 200, 0.5), transparent, rgba(138, 43, 226, 0.5));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

h1 {
    font-size: clamp(1.6rem, 8vw, 2.4rem);
    font-weight: 800;
    color: #fff;
    margin-bottom: 1.5rem;
    letter-spacing: -1px;
    text-align: center;
    background: linear-gradient(90deg, #fff, #ffb3f0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ── Form Fields ── */
.sign {
    width: 100%;
    padding: 16px 20px;
    margin-bottom: 1.2rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    color: #fff;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
}

.sign:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 0, 200, 0.3);
}

.sign:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: #ff00c8;
    box-shadow: 0 0 0 4px rgba(255, 0, 200, 0.15);
    transform: translateY(-2px);
}

input::placeholder {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.95rem;
}

/* ── Actions & Button ── */
.login-actions {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    margin-top: 1rem;
}

.button {
    width: 100%;
    padding: 16px;
    background: linear-gradient(90deg, #ff00c8, #8a2be2);
    border: none;
    border-radius: 14px;
    color: #fff;
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 25px rgba(255, 0, 200, 0.3);
    position: relative;
    overflow: hidden;
}

.button:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 15px 35px rgba(255, 0, 200, 0.4);
}

.button::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s ease;
}

.button:hover::after {
    left: 100%;
}

.register-link {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.6);
}

.anim-link {
    color: #ffb3f0;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.2s ease;
    position: relative;
}

.anim-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 1px;
    background: #ffb3f0;
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.anim-link:hover {
    color: #fff;
    text-shadow: 0 0 10px rgba(255, 179, 240, 0.5);
}

.anim-link:hover::after {
    transform: scaleX(1);
    background: #fff;
}

/* ── "Back to Home" Button ── */
.btn {
    align-self: flex-start;
    margin-bottom: 2rem;
    margin-left: 20px;
    position: relative;
    z-index: 100;
}

.btn a {
    text-decoration: none;
    padding: 12px 28px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(15px) saturate(160%);
    -webkit-backdrop-filter: blur(15px) saturate(160%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50px;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 700;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    align-items: center;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.btn a:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
    border-color: rgba(255, 0, 200, 0.4);
    box-shadow: 0 15px 40px rgba(255, 0, 200, 0.2);
    color: #ffb3f0;
}

/* ── Mobile ── */
@media (max-width: 480px) {
    .card-container {
        padding: 2.5rem 1.5rem;
    }

    .btn {
        margin-left: 0;
        margin-bottom: 1.5rem;
    }

    h1 {
        font-size: 2rem;
    }
}