:root {
    --accent: #7c3aed;
    --accent-dark: #6d28d9;
    --accent-light: #a78bfa;

    --bg-main: #f5f2ff;
    --bg-card: #ffffff;
    --bg-input: #faf9fd;

    --text-primary: #211a35;
    --text-secondary: #77718a;
    --text-muted: #918ba0;

    --border-color: #e7e2f0;
    --border-focus: #9b72ed;

    --shadow-card:
        0 20px 60px rgba(55, 35, 95, 0.09),
        0 4px 14px rgba(55, 35, 95, 0.04);
}

*{
  margin:0;
  padding:0;
  box-sizing:border-box;
  font-family:'Inter', sans-serif;
}

body {
    background: #f5f2ff;
    color: var(--text-primary);
    overflow-x: hidden;
    overflow-y: auto;
}


.auth-buttons a{
  color:#aaa;
  text-decoration:none;
}

.signup{
  padding:8px 18px;
  border-radius:50px;
  border:1px solid rgba(201,168,79,0.35);
}

/* BACK BUTTON */
.back-btn {
    position: fixed;

    top: 22px;
    left: 22px;

    width: 42px;
    height: 42px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: #ffffff;

    border: 1px solid var(--border-color);

    color: var(--text-primary);

    text-decoration: none;
    font-size: 14px;

    box-shadow:
        0 4px 14px rgba(55, 35, 95, 0.07);

    transition:
        color 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease;

    z-index: 1000;
}

.back-btn:hover {
    color: var(--accent);

    border-color: rgba(124, 58, 237, 0.3);

    transform: translateY(-2px);
}

.back-btn:hover{
  transform: translateY(-2px);
  border-color: rgba(201,168,79,0.4);
  box-shadow: 0 0 15px rgba(201,168,79,0.25);
}

/* LOGIN SECTION  */
.login-section {
    position: relative;
    isolation: isolate;

    min-height: 100vh;
    min-height: 100dvh;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 48px 20px;

    background:
        radial-gradient(
            circle at 15% 15%,
            rgba(167, 139, 250, 0.13),
            transparent 35%
        ),
        radial-gradient(
            circle at 85% 85%,
            rgba(124, 58, 237, 0.08),
            transparent 35%
        ),
        #f5f2ff;

    overflow: hidden;
}

.login-section::before {
    content: "";
    position: absolute;
    inset: 0;
    background: url("world-map.svg") center / cover no-repeat;
    opacity: 0.035;
    pointer-events: none;
    z-index: 0;
}

.login-section::after {
    content: "";

    position: absolute;
    inset: 0;

    z-index: 1;

    background-image:
        linear-gradient(
            rgba(124, 58, 237, 0.035) 1px,
            transparent 1px
        ),
        linear-gradient(
            90deg,
            rgba(124, 58, 237, 0.035) 1px,
            transparent 1px
        );

    background-size: 42px 42px;

    mask-image:
        radial-gradient(
            ellipse at center,
            black 0%,
            transparent 75%
        );

    -webkit-mask-image:
        radial-gradient(
            ellipse at center,
            black 0%,
            transparent 75%
        );

    pointer-events: none;
}

.world-svg {
  width: 100%;
  max-width: 900px;
  opacity: 1;
}


.login-card {
    width: min(100%, 440px);

    position: relative;
    overflow: hidden;

    padding: 38px 36px;

    background: #ffffff;

    border: 1px solid rgba(124, 58, 237, 0.10);
    border-radius: 24px;

    box-shadow: var(--shadow-card);

    z-index: 5;
    margin: auto;

    transition:
        box-shadow 0.3s ease,
        border-color 0.3s ease;
}

.login-card:hover {
    border-color: rgba(124, 58, 237, 0.18);

    box-shadow:
        0 24px 65px rgba(55, 35, 95, 0.12),
        0 5px 16px rgba(55, 35, 95, 0.05);

    transform: none;
}

.login-card::before {
    content: "";

    position: absolute;
    top: 0;
    left: 0;

    width: 100%;
    height: 3px;

    background: linear-gradient(
        90deg,
        transparent,
        #a78bfa,
        #7c3aed,
        #a78bfa,
        transparent
    );

    opacity: 0.85;
}

.login-logo {
    text-align: center;
    margin-bottom: 12px;
}

.login-logo img {
    height: 44px;
    max-width: 180px;
    object-fit: contain;
}

.login-title {
    display: block;

    text-align: center;

    font-family: 'Inter', sans-serif;
    font-size: clamp(25px, 4vw, 30px);
    font-weight: 700;

    line-height: 1.25;
    letter-spacing: -1px;

    color: #211a35;

    margin-top: 22px;
    margin-bottom: 10px;

    overflow: visible;
}

.login-sub {
    color: var(--text-secondary);

    font-size: 14px;
    font-weight: 400;

    line-height: 1.6;
    text-align: center;

    margin-bottom: 28px;
}

/* ================================
   INPUTS
================================ */

.input-group{
  margin-bottom:20px;
}

.input-group label {
    display: block;

    margin-bottom: 9px;

    font-size: 13px;
    font-weight: 600;

    color: #342d45;
}

.input-group input {
    width: 100%;
    min-height: 54px;

    padding: 15px 16px;

    font-family: 'Inter', sans-serif;
    font-size: 15px;
    font-weight: 400;

    color: #211a35;
    background: var(--bg-input);

    border: 1px solid var(--border-color);
    border-radius: 12px;

    outline: none;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}

.input-group input:focus {
    background: #ffffff;

    border-color: var(--border-focus);

    box-shadow:
        0 0 0 3px rgba(124, 58, 237, 0.10);

    outline: none;
}

.input-group input::placeholder {
    color: #aaa4b8;
}

/* PASSWORD TOGGLE */

.password-wrapper{
  position:relative;
}

.toggle-pass {
    position: absolute;

    right: 14px;
    top: 50%;

    transform: translateY(-50%);

    cursor: pointer;

    font-size: 14px;
    color: #918ba0;

    pointer-events: auto;

    transition: color 0.2s ease;
}

.toggle-pass:hover {
    color: var(--accent);
}

/* OPTIONS */

.options {
    display: flex;

    justify-content: space-between;
    align-items: center;

    gap: 12px;

    font-size: 13px;

    margin-top: 4px;
    margin-bottom: 25px;
}

.options a {
    color: var(--accent-dark);

    font-weight: 600;

    text-decoration: none;

    transition: color 0.2s ease;
}

.options a:hover {
    color: #4c1d95;
    text-decoration: underline;
}

.remember-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;

    color: var(--text-secondary);

    font-size: 13px;
    cursor: pointer;
}

.remember-label input {
    width: 15px;
    height: 15px;

    accent-color: var(--accent);

    cursor: pointer;
}

.login-btn {
    width: 100%;
    min-height: 54px;

    padding: 15px 24px;

    border: none;
    border-radius: 14px;

    background: linear-gradient(
        135deg,
        #7c3aed,
        #6d28d9
    );

    color: #ffffff;

    font-family: 'Inter', sans-serif;
    font-size: 15px;
    font-weight: 600;

    letter-spacing: 0.2px;

    cursor: pointer;

    position: relative;
    overflow: hidden;

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        filter 0.2s ease;
}

.login-btn:hover:not(:disabled) {
    transform: translateY(-2px);

    box-shadow:
        0 8px 22px rgba(124, 58, 237, 0.25);

    filter: brightness(1.05);
}

.login-btn:active:not(:disabled) {
    transform: translateY(0);
}

.login-btn:focus-visible {
    outline: 3px solid rgba(124, 58, 237, 0.25);
    outline-offset: 3px;
}

.login-btn::before{
  content:"";
  position:absolute;
  inset:0;
  border-radius:inherit;

  background: linear-gradient(
    120deg,
    transparent 30%,
    rgba(255,255,255,0.35),
    transparent 70%
  );

  transform: translateX(-120%);
  transition: 0.6s ease;
}


/* loading state */
.login-btn.loading{
  pointer-events:none;
  color:transparent;
}

.login-btn.loading::after {
    content: "";

    position: absolute;

    width: 18px;
    height: 18px;

    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #ffffff;

    border-radius: 50%;

    top: 50%;
    left: 50%;

    transform: translate(-50%, -50%);

    animation: spin 0.6s linear infinite;
}

@keyframes spin{
  to{ transform:translate(-50%,-50%) rotate(360deg); }
}

.login-btn:disabled{
  opacity:0.5;
  cursor:not-allowed;
}

/* ERROR / STATUS  */
.message {
    margin-top: 15px;

    font-size: 13px;
    line-height: 1.5;

    color: #dc2626;
}

.success {
    color: #15803d;
}

.bottom-text {
    margin-top: 24px;

    text-align: center;

    font-size: 13px;
    line-height: 1.6;

    color: var(--text-secondary);
}

.bottom-text a {
    color: var(--accent-dark);

    font-weight: 600;

    text-decoration: none;

    transition: color 0.2s ease;
}

.bottom-text a:hover {
    color: #4c1d95;
    text-decoration: underline;
}

.input-wrapper{
  position:relative;
}

.input-wrapper i {
    position: absolute;

    top: 50%;
    transform: translateY(-50%);

    font-size: 14px;
    color: #918ba0;

    pointer-events: none;
}

/* LEFT ICON */
.input-wrapper i:first-child{
  left:14px;
}


/* Allow interaction with password visibility icon */
.input-wrapper .toggle-pass {
    pointer-events: auto;
    z-index: 2;
    cursor: pointer;
}

/* INPUT PADDING */
.input-wrapper input{
  padding-left:clamp(36px, 5vw, 44px);
  padding-right:clamp(36px, 5vw, 44px);
}

/* RIGHT ICON (EYE) */
.toggle-pass{
  right:14px;
  cursor:pointer;
}

.clouds{
  position:fixed;
  inset:0;
  overflow:hidden;
  z-index:-1;
}

/* base cloud style */
.cloud{
  position:absolute;
  fill:white;
  opacity:0.08;
}

/* different layers */
.cloud1{
  width:300px;
  top:20%;
  animation:moveClouds 60s linear infinite;
}

.cloud2{
  width:400px;
  top:50%;
  animation:moveClouds 90s linear infinite;
}

.cloud3{
  width:250px;
  top:70%;
  animation:moveClouds 120s linear infinite;
}

/* animation */
@keyframes moveClouds{
  from{
    transform:translateX(-200px);
  }
  to{
    transform:translateX(120vw);
  }
}

/* =====================================
   RESPONSIVE LOGIN PAGE
===================================== */

@media (max-width: 768px) {

    .login-section {
        padding: 40px 20px;
    }

    .login-card {
        width: 100%;
        max-width: 440px;

        padding: 32px 26px;
    }

    .login-title {
        font-size: 26px;
    }

    .input-group label {
        font-size: 13px;
    }

    .input-group input {
        min-height: 52px;
        font-size: 16px;
    }

    .login-btn {
        min-height: 54px;
        font-size: 15px;
    }
}

@media (max-width: 480px) {

    .login-section {
        padding: 76px 18px 28px;
    }

    .login-card {
        padding: 28px 22px;
        border-radius: 21px;
    }

    .login-logo img {
        height: 40px;
    }

    .login-title {
        font-size: 25px;
        margin-top: 18px;
    }

    .login-sub {
        font-size: 13px;
        margin-bottom: 24px;
    }

    .input-group {
        margin-bottom: 18px;
    }

    .options {
        font-size: 12px;
        gap: 8px;
    }

    .remember-label {
        font-size: 12px;
    }

    .options a {
        font-size: 12px;
    }

    .bottom-text {
        font-size: 12px;
    }

    .back-btn {
        top: 16px;
        left: 16px;

        width: 38px;
        height: 38px;
    }
}

@media (max-width: 360px) {

    .login-section {
        padding-left: 12px;
        padding-right: 12px;
    }

    .login-card {
        padding: 25px 18px;
    }

    .options {
        align-items: flex-start;
        flex-wrap: wrap;
    }
}
