/* =========================================================
   MTAAHELP LOGIN PAGE
   Modern • Lively • Responsive
========================================================= */

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

:root {
    --green: #16a34a;
    --green-dark: #15803d;
    --green-light: #dcfce7;
    --blue: #2563eb;
    --text: #111827;
    --muted: #6b7280;
    --border: #e5e7eb;
    --white: #ffffff;
}


/* =========================================================
   BODY
========================================================= */

body {
    font-family: Arial, Helvetica, sans-serif;
    background:
        radial-gradient(circle at 10% 20%, rgba(22, 163, 74, 0.12), transparent 28%),
        radial-gradient(circle at 90% 80%, rgba(37, 99, 235, 0.10), transparent 28%),
        linear-gradient(135deg, #f0fdf4, #f8fafc 50%, #eff6ff);

    color: #1f2937;

    min-height: 100vh;

    overflow-x: hidden;
}


/* =========================================================
   BACKGROUND DECORATION
========================================================= */

body::before,
body::after {
    content: "";
    position: fixed;

    width: 260px;
    height: 260px;

    border-radius: 50%;

    pointer-events: none;

    z-index: -1;

    filter: blur(2px);

    animation: floatingShape 8s ease-in-out infinite;
}

body::before {
    top: 100px;
    left: -100px;

    background: rgba(22, 163, 74, 0.08);
}

body::after {
    bottom: -100px;
    right: -80px;

    background: rgba(37, 99, 235, 0.08);

    animation-delay: 2s;
}

@keyframes floatingShape {

    0%,
    100% {
        transform: translateY(0) scale(1);
    }

    50% {
        transform: translateY(-25px) scale(1.08);
    }
}


/* =========================================================
   NAVBAR
========================================================= */

.navbar {
    height: 70px;

    background: rgba(255, 255, 255, 0.88);

    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 0 7%;

    border-bottom: 1px solid rgba(229, 231, 235, 0.8);

    position: relative;
    z-index: 10;

    box-shadow:
        0 4px 20px rgba(0, 0, 0, 0.03);
}


/* =========================================================
   LOGO
========================================================= */

.logo {
    text-decoration: none;

    color: var(--text);

    font-size: 24px;

    font-weight: 800;

    display: flex;
    align-items: center;

    gap: 5px;

    transition: transform 0.25s ease;
}

.logo:hover {
    transform: translateY(-2px);
}

.logo-icon {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    width: 36px;
    height: 36px;

    background: linear-gradient(
        135deg,
        #22c55e,
        #15803d
    );

    color: white;

    border-radius: 10px;

    font-size: 19px;

    box-shadow:
        0 6px 15px rgba(22, 163, 74, 0.25);

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease;
}

.logo:hover .logo-icon {
    transform: rotate(-5deg) scale(1.08);

    box-shadow:
        0 8px 20px rgba(22, 163, 74, 0.35);
}

.logo span:last-child {
    color: var(--green);
}


/* =========================================================
   BACK HOME
========================================================= */

.back-home {
    text-decoration: none;

    color: #4b5563;

    font-size: 14px;

    font-weight: 600;

    padding: 9px 14px;

    border-radius: 8px;

    transition:
        color 0.25s ease,
        background 0.25s ease,
        transform 0.25s ease;
}

.back-home:hover {
    color: var(--green);

    background: var(--green-light);

    transform: translateX(-3px);
}


/* =========================================================
   LOGIN CONTAINER
========================================================= */

.login-container {
    min-height: calc(100vh - 70px);

    display: flex;

    justify-content: center;

    align-items: center;

    padding: 50px 20px;

    position: relative;
}


/* =========================================================
   LOGIN CARD
========================================================= */

.login-card {
    width: 100%;

    max-width: 450px;

    background: rgba(255, 255, 255, 0.94);

    padding: 42px;

    border-radius: 22px;

    border: 1px solid rgba(255, 255, 255, 0.8);

    box-shadow:
        0 25px 60px rgba(0, 0, 0, 0.10),
        0 5px 15px rgba(22, 163, 74, 0.05);

    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);

    position: relative;

    overflow: hidden;

    animation:
        cardEntrance 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}


/* Green decorative line */

.login-card::before {
    content: "";

    position: absolute;

    top: 0;
    left: 0;

    width: 100%;
    height: 4px;

    background:
        linear-gradient(
            90deg,
            #16a34a,
            #22c55e,
            #2563eb
        );
}


/* Decorative glow */

.login-card::after {
    content: "";

    position: absolute;

    width: 130px;
    height: 130px;

    border-radius: 50%;

    background: rgba(22, 163, 74, 0.06);

    top: -60px;
    right: -50px;

    pointer-events: none;
}

@keyframes cardEntrance {

    from {
        opacity: 0;

        transform:
            translateY(35px)
            scale(0.96);
    }

    to {
        opacity: 1;

        transform:
            translateY(0)
            scale(1);
    }
}


/* =========================================================
   LOGIN HEADER
========================================================= */

.login-header {
    text-align: center;

    margin-bottom: 30px;

    position: relative;

    z-index: 1;
}


/* =========================================================
   LOGIN ICON
========================================================= */

.login-icon {
    width: 68px;
    height: 68px;

    margin: 0 auto 18px;

    display: flex;

    align-items: center;
    justify-content: center;

    background:
        linear-gradient(
            135deg,
            #dcfce7,
            #bbf7d0
        );

    border-radius: 20px;

    font-size: 30px;

    box-shadow:
        0 10px 25px rgba(22, 163, 74, 0.15);

    animation:
        iconFloat 3s ease-in-out infinite;

    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease;
}

.login-icon:hover {
    transform: scale(1.08) rotate(-3deg);

    box-shadow:
        0 14px 30px rgba(22, 163, 74, 0.25);
}

@keyframes iconFloat {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
    }
}


/* =========================================================
   HEADER TEXT
========================================================= */

.login-header h1 {
    font-size: 30px;

    color: var(--text);

    margin-bottom: 10px;

    letter-spacing: -0.5px;
}

.login-header p {
    color: var(--muted);

    font-size: 14px;

    line-height: 1.6;
}


/* =========================================================
   FORM
========================================================= */

.form-group {
    margin-bottom: 21px;

    animation: formFade 0.7s ease both;
}

.form-group:nth-child(1) {
    animation-delay: 0.15s;
}

.form-group:nth-child(2) {
    animation-delay: 0.25s;
}

@keyframes formFade {

    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* =========================================================
   LABELS
========================================================= */

.form-group label {
    display: block;

    margin-bottom: 8px;

    font-size: 14px;

    font-weight: 700;

    color: #374151;
}


/* =========================================================
   INPUTS
========================================================= */

/* MtaaHelp Login Inputs */

.form-group input,
input[type="email"],
input[type="password"] {

    /* Keep the original input dimensions */
    width: 100%;
    height: 66px;
    box-sizing: border-box;

    /* Transparent dark theme */
    background: transparent;
    color: #ffffff;

    /* Original border styling */
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;

    /* Keep comfortable typing space */
    padding: 14px 16px;

    outline: none;
    transition: all 0.3s ease;
}

/* Placeholder text */

.form-group input::placeholder {
    color: rgba(255, 255, 255, 0.55);
}

/* When typing or clicking the input */

.form-group input:focus {
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
    border-color: #19c996;
    box-shadow: 0 0 0 3px rgba(15, 157, 117, 0.2);
}

.form-group input:hover {
    border-color: #a7f3d0;
}

/* Prevent Chrome autofill from turning inputs white */

.form-group input:-webkit-autofill,
.form-group input:-webkit-autofill:hover,
.form-group input:-webkit-autofill:focus {
    -webkit-text-fill-color: #ffffff;
    -webkit-box-shadow: 0 0 0 1000px #1e293b inset;
    transition: background-color 5000s ease-in-out 0s;
}

/* =========================================================
   PASSWORD
========================================================= */

.password-wrapper {
    position: relative;
}

.password-wrapper input {
    padding-right: 70px;
}

.password-toggle {
    position: absolute;

    right: 9px;
    top: 50%;

    transform: translateY(-50%);

    border: none;

    background: #f0fdf4;

    color: var(--green-dark);

    font-weight: 700;

    font-size: 12px;

    cursor: pointer;

    padding: 7px 9px;

    border-radius: 6px;

    transition:
        background 0.2s ease,
        color 0.2s ease,
        transform 0.2s ease;
}

.password-toggle:hover {
    background: var(--green);

    color: white;

    transform:
        translateY(-50%)
        scale(1.04);
}

.password-toggle:active {
    transform:
        translateY(-50%)
        scale(0.96);
}


/* =========================================================
   LOGIN BUTTON
========================================================= */

.login-button {
    width: 100%;

    padding: 14px 18px;

    border: none;

    border-radius: 11px;

    background:
        linear-gradient(
            135deg,
            #22c55e,
            #16a34a
        );

    color: white;

    font-size: 16px;

    font-weight: 700;

    cursor: pointer;

    position: relative;

    overflow: hidden;

    box-shadow:
        0 8px 20px rgba(22, 163, 74, 0.25);

    transition:
        transform 0.2s ease,
        box-shadow 0.25s ease,
        background 0.25s ease;
}


/* Button shine */

.login-button::before {
    content: "";

    position: absolute;

    top: 0;
    left: -100%;

    width: 70%;
    height: 100%;

    background:
        linear-gradient(
            90deg,
            transparent,
            rgba(255, 255, 255, 0.25),
            transparent
        );

    transform: skewX(-20deg);

    transition: left 0.6s ease;
}

.login-button:hover::before {
    left: 140%;
}

.login-button:hover {
    background:
        linear-gradient(
            135deg,
            #16a34a,
            #15803d
        );

    transform: translateY(-2px);

    box-shadow:
        0 12px 28px rgba(22, 163, 74, 0.32);
}

.login-button:active {
    transform: translateY(0);

    box-shadow:
        0 5px 12px rgba(22, 163, 74, 0.2);
}

.login-button:disabled {
    background: #9ca3af;

    box-shadow: none;

    cursor: not-allowed;

    transform: none;
}


/* =========================================================
   MESSAGE
========================================================= */

.message {
    padding: 13px 15px;

    margin-bottom: 20px;

    border-radius: 10px;

    font-size: 14px;

    text-align: center;

    font-weight: 600;

    animation:
        messageSlide 0.35s ease;
}

@keyframes messageSlide {

    from {
        opacity: 0;

        transform: translateY(-8px);
    }

    to {
        opacity: 1;

        transform: translateY(0);
    }
}

.message.success {
    background: #dcfce7;

    color: #166534;

    border: 1px solid #bbf7d0;
}

.message.error {
    background: #fee2e2;

    color: #991b1b;

    border: 1px solid #fecaca;
}


/* =========================================================
   REGISTER LINK
========================================================= */

.register-link {
    text-align: center;

    margin-top: 27px;

    padding-top: 22px;

    border-top: 1px solid #f1f5f9;

    font-size: 14px;

    color: var(--muted);
}

.register-link a {
    color: var(--green);

    font-weight: 700;

    text-decoration: none;

    margin-left: 3px;

    transition:
        color 0.2s ease,
        text-decoration 0.2s ease;
}

.register-link a:hover {
    color: var(--green-dark);

    text-decoration: underline;
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 600px) {

    .navbar {
        height: 65px;

        padding: 0 18px;
    }

    .logo {
        font-size: 21px;
    }

    .logo-icon {
        width: 32px;
        height: 32px;

        font-size: 17px;
    }

    .back-home {
        font-size: 13px;

        padding: 8px 10px;
    }

    .login-container {
        min-height: calc(100vh - 65px);

        padding: 30px 16px;
    }

    .login-card {
        padding: 34px 22px;

        border-radius: 18px;
    }

    .login-header h1 {
        font-size: 26px;
    }

    .login-icon {
        width: 62px;
        height: 62px;

        font-size: 27px;
    }

    .form-group input {
        padding: 13px;
    }

    .login-button {
        padding: 14px;
    }
}


/* =========================================================
   SMALL PHONES
========================================================= */

@media (max-width: 380px) {

    .navbar {
        padding: 0 12px;
    }

    .logo {
        font-size: 19px;
    }

    .back-home {
        font-size: 12px;
    }

    .login-card {
        padding: 30px 18px;
    }

    .login-header h1 {
        font-size: 24px;
    }
}


/* =========================================================
   REDUCED MOTION
========================================================= */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

.forgot-password-link {
    display: block;
    text-align: right;
    margin-top: 10px;
    margin-bottom: 20px;
    position: relative;
    z-index: 2;
}

.forgot-password-link a {
    color: var(--green);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
}

.forgot-password-link a:hover {
    text-decoration: underline;
}

/* =========================================================
   LOGIN PAGE — DARK MODE
========================================================= */

html.dark-mode body,
body.dark-mode {
    background: #0f172a;
    color: #f8fafc;
}

html.dark-mode .login-card,
body.dark-mode .login-card {
    background: #1e293b;
    color: #f8fafc;
}

html.dark-mode .login-header h1,
body.dark-mode .login-header h1 {
    color: #ffffff;
}

html.dark-mode .login-header p,
body.dark-mode .login-header p {
    color: #cbd5e1;
}

html.dark-mode .form-group label,
body.dark-mode .form-group label {
    color: #e2e8f0;
}

html.dark-mode input,
body.dark-mode input {
    background: #0f172a;
    color: #ffffff;
    border-color: #475569;
}

html.dark-mode input::placeholder,
body.dark-mode input::placeholder {
    color: #94a3b8;
}

html.dark-mode .navbar,
body.dark-mode .navbar {
    background: #0f172a;
}

/* =========================================================
   LOGIN VERIFICATION ACTIONS - DARK MODE
========================================================= */

.login-verification-actions {
    margin-top: 15px;
    padding: 16px;
    border-radius: 12px;
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    text-align: center;
}

.login-verification-actions p {
    margin: 0 0 14px;
    color: #374151;
    font-size: 14px;
    line-height: 1.5;
}

/* Verify Account button */
.verify-account-button {
    width: 100%;
    padding: 11px 16px;
    margin-bottom: 10px;
    border: none;
    border-radius: 8px;
    background: #16a34a;
    color: #ffffff;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s ease;
}

.verify-account-button:hover {
    background: #15803d;
}

/* Resend button */
.resend-verification-button {
    width: 100%;
    padding: 11px 16px;
    border: 1px solid #16a34a;
    border-radius: 8px;
    background: transparent;
    color: #15803d;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s ease;
}

.resend-verification-button:hover {
    background: #dcfce7;
}


/* =========================================================
   DARK MODE
========================================================= */

.dark-mode .login-verification-actions {
    background: #1f2937;
    border-color: #374151;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.dark-mode .login-verification-actions p {
    color: #d1d5db;
}

.dark-mode .verify-account-button {
    background: #22c55e;
    color: #052e16;
}

.dark-mode .verify-account-button:hover {
    background: #16a34a;
    color: #ffffff;
}

.dark-mode .resend-verification-button {
    background: #111827;
    border-color: #22c55e;
    color: #86efac;
}

.dark-mode .resend-verification-button:hover {
    background: #14532d;
    color: #bbf7d0;
}

/* =========================================================
   LOGIN VERIFICATION MESSAGE - DARK MODE
========================================================= */

.dark-mode #message.message.error {
    background: #3f1d1d;
    border: 1px solid #7f1d1d;
    color: #fecaca;
}

.dark-mode #message .login-verification-actions {
    background: #1f2937;
    border: 1px solid #374151;
    color: #d1d5db;
}

.dark-mode #message .login-verification-actions p {
    color: #d1d5db;
}

.dark-mode #message .verify-account-button {
    background: #22c55e;
    color: #052e16;
}

.dark-mode #message .verify-account-button:hover {
    background: #16a34a;
    color: #ffffff;
}

.dark-mode #message .resend-verification-button {
    background: #111827;
    border: 1px solid #22c55e;
    color: #86efac;
}

.dark-mode #message .resend-verification-button:hover {
    background: #14532d;
    color: #bbf7d0;
}

/* ============================================================
   VERIFICATION HELP
============================================================ */

.verification-help {
    margin: 15px 0 20px;
    padding: 16px;
    border-radius: 12px;
    background: rgba(255, 183, 3, 0.08);
    border: 1px solid rgba(255, 183, 3, 0.25);
    text-align: center;
}

.verification-help p {
    margin: 0 0 12px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
}

.resend-btn {
    width: 100%;
    height: 50px;
    border: 1px solid #19c996;
    border-radius: 10px;
    background: transparent;
    color: #19c996;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.resend-btn:hover {
    background: #19c996;
    color: #ffffff;
}

.resend-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.resend-message {
    min-height: 20px;
    margin-top: 10px !important;
    margin-bottom: 0 !important;
    font-size: 13px !important;
}

.resend-message.success {
    color: #19c996 !important;
}

.resend-message.error {
    color: #ff6b6b !important;
}


/* LOGIN WARNING */

.message.warning {
    display: block !important;
    color: #ffb703;
    border-color: rgba(255, 183, 3, 0.3);
    background: rgba(255, 183, 3, 0.08);
}

.mtaabuddy-support-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.mtaabuddy-button-avatar {
    width: 42px;
    height: 42px;
    object-fit: contain;
    border-radius: 14px;
    background: transparent !important;
    transition:
        transform 0.25s ease,
        filter 0.25s ease;
}

.mtaabuddy-support-button:hover .mtaabuddy-button-avatar {
    transform: translateY(-3px) scale(1.12) rotate(-4deg);
    filter: brightness(1.12) saturate(1.15);
}