
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

:root {
    --bg: #030817;
    --panel: rgba(7, 17, 40, 0.90);
    --cyan: #00d9ff;
    --blue: #176bff;
    --gold: #ffca48;
    --green: #27f5a2;
    --text: #f5f8ff;
    --muted: #9caecb;
}

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

html {
    min-height: 100%;
    background: var(--bg);
}

body {
    min-height: 100vh;
    font-family: 'Inter', sans-serif;
    color: var(--text);
    background:
        radial-gradient(ellipse at 50% 0%, #10285b 0%, transparent 45%),
        radial-gradient(ellipse at 0% 70%, #071d3d 0%, transparent 40%),
        radial-gradient(ellipse at 100% 70%, #10103e 0%, transparent 40%),
        var(--bg);
    overflow-x: hidden;
    -webkit-tap-highlight-color: transparent;
}

/* Animated background */

.background {
    position: fixed;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.grid-overlay {
    position: absolute;
    inset: 0;
    opacity: 0.15;
    background-image:
        linear-gradient(rgba(0, 217, 255, 0.14) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 217, 255, 0.14) 1px, transparent 1px);
    background-size: 40px 40px;
    mask-image: linear-gradient(to bottom, black, transparent 85%);
}

.orb {
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.25;
    animation: orbMove 9s ease-in-out infinite alternate;
}

.orb-one {
    top: 5%;
    left: -150px;
    background: #0066ff;
}

.orb-two {
    right: -160px;
    bottom: 10%;
    background: #00e5ff;
    animation-delay: -4s;
}

@keyframes orbMove {
    from { transform: translate(0, 0) scale(0.9); }
    to { transform: translate(40px, -30px) scale(1.2); }
}

.floating-coin {
    position: absolute;
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    color: #fff0a4;
    font-size: 22px;
    border: 2px solid #ffd76a;
    border-radius: 50%;
    background: linear-gradient(145deg, #9d5c00, #ffda59, #ad6500);
    box-shadow: 0 0 22px rgba(255, 194, 51, 0.3),
                inset 0 0 10px rgba(255, 255, 255, 0.6);
    animation: coinFloat 5s ease-in-out infinite;
}

.coin-one {
    top: 15%;
    left: 7%;
}

.coin-two {
    right: 8%;
    top: 45%;
    animation-delay: -2s;
}

.coin-three {
    bottom: 10%;
    left: 12%;
    animation-delay: -3s;
}

@keyframes coinFloat {
    0%, 100% { transform: translateY(0) rotate(-12deg); }
    50% { transform: translateY(-18px) rotate(12deg); }
}

.spark {
    position: absolute;
    width: 5px;
    height: 5px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 0 12px 3px var(--cyan);
    animation: twinkle 2s ease-in-out infinite alternate;
}

.spark-one { top: 17%; left: 72%; }
.spark-two { top: 65%; left: 15%; animation-delay: 0.7s; }
.spark-three { top: 35%; right: 13%; animation-delay: 1.2s; }

@keyframes twinkle {
    from { opacity: 0.25; transform: scale(0.6); }
    to { opacity: 1; transform: scale(1.5); }
}

/* Page layout */

.page-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 480px;
    min-height: 100vh;
    margin: 0 auto;
    padding: 32px 22px 24px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* HeroCash brand */

.brand-section {
    text-align: center;
    margin-bottom: 28px;
}

.logo-symbol {
    position: relative;
    display: grid;
    place-items: center;
    width: 66px;
    height: 66px;
    margin: 0 auto 10px;
    font-size: 37px;
    color: var(--cyan);
    background: linear-gradient(145deg, #102f61, #071326);
    border: 1px solid rgba(0, 217, 255, 0.6);
    border-radius: 20px;
    box-shadow: 0 0 30px rgba(0, 217, 255, 0.15);
    transform: rotate(-4deg);
}

.logo-symbol > i {
    filter: drop-shadow(0 0 10px var(--cyan));
}

.logo-crown {
    position: absolute;
    top: -11px;
    right: -9px;
    font-size: 17px;
    color: var(--gold);
    transform: rotate(4deg);
    filter: drop-shadow(0 0 8px rgba(255, 202, 72, 0.6));
}

.brand-name {
    font-size: clamp(2rem, 9vw, 2.9rem);
    font-weight: 900;
    letter-spacing: -1.8px;
    line-height: 1.1;
    color: #fff;
    text-shadow: 0 0 25px rgba(0, 217, 255, 0.15);
}

.brand-name span {
    color: var(--gold);
    text-shadow: 0 0 18px rgba(255, 202, 72, 0.2);
}

.brand-tagline {
    margin-top: 10px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 2.1px;
    color: #d4e6ff;
}

.brand-tagline span {
    color: var(--gold);
    padding: 0 5px;
}

.brand-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-top: 17px;
    padding: 9px 13px;
    border: 1px solid rgba(0, 217, 255, 0.2);
    border-radius: 50px;
    background: rgba(0, 217, 255, 0.05);
    color: #a8c9e8;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.6px;
}

.brand-badge i {
    color: var(--green);
}

/* Login glass card */

.login-card {
    position: relative;
    overflow: hidden;
    padding: 28px 23px 23px;
    border: 1px solid rgba(0, 217, 255, 0.42);
    border-radius: 27px;
    background: var(--panel);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.025),
        0 20px 70px rgba(0, 0, 0, 0.42),
        0 0 40px rgba(0, 133, 255, 0.10);
}

.login-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 12%;
    width: 76%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--cyan), transparent);
}

.card-glow {
    position: absolute;
    top: -100px;
    left: 50%;
    width: 200px;
    height: 120px;
    transform: translateX(-50%);
    background: rgba(0, 217, 255, 0.12);
    filter: blur(55px);
    pointer-events: none;
}

.welcome-icon {
    position: relative;
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    margin: 0 auto 14px;
    border: 1px solid rgba(0, 217, 255, 0.45);
    border-radius: 17px;
    color: var(--cyan);
    font-size: 23px;
    background: rgba(0, 217, 255, 0.07);
}

.login-card h1 {
    text-align: center;
    font-size: 27px;
    font-weight: 800;
    letter-spacing: -0.8px;
}

.login-card h1 span {
    color: var(--cyan);
}

.subtitle {
    margin: 9px 0 28px;
    color: var(--muted);
    text-align: center;
    font-size: 12px;
}

/* Input fields */

#loginForm label {
    display: block;
    margin: 0 0 9px 3px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.5px;
    color: #b5c9e5;
}

.input-box {
    position: relative;
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    border: 1px solid #203b61;
    border-radius: 14px;
    background: rgba(3, 10, 26, 0.7);
    transition: border-color 0.25s, box-shadow 0.25s;
}

.input-box:focus-within {
    border-color: var(--cyan);
    box-shadow: 0 0 0 3px rgba(0, 217, 255, 0.09),
                0 0 20px rgba(0, 217, 255, 0.07);
}

.input-icon {
    width: 45px;
    text-align: center;
    color: #6b91bf;
    font-size: 15px;
}

.input-box input {
    min-width: 0;
    width: 100%;
    height: 53px;
    padding: 0 8px 0 0;
    border: none;
    outline: none;
    color: #fff;
    background: transparent;
    font-family: inherit;
    font-size: 13px;
}

.input-box input::placeholder {
    color: #71829f;
    opacity: 1;
}

.eye-button {
    flex-shrink: 0;
    width: 45px;
    height: 50px;
    border: none;
    color: #86a7d3;
    background: transparent;
    cursor: pointer;
    font-size: 15px;
}

.forgot {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 7px;
    margin: -5px 0 24px;
    color: var(--cyan);
    text-decoration: none;
    font-size: 11px;
    font-weight: 600;
}

.forgot:hover {
    color: #fff;
}

/* Login button */

.login-button {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 54px;
    padding: 14px;
    overflow: hidden;
    border: none;
    border-radius: 14px;
    color: #031020;
    background: linear-gradient(110deg, #00e5ff, #397bff 52%, #6c55ff);
    box-shadow: 0 8px 25px rgba(0, 125, 255, 0.25);
    font-family: inherit;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.login-button::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.35), transparent);
    transform: skewX(-20deg);
    animation: buttonShine 4s infinite;
}

@keyframes buttonShine {
    0%, 65% { left: -100%; }
    100% { left: 150%; }
}

.login-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(0, 125, 255, 0.35);
}

.login-button:active {
    transform: scale(0.985);
}

.login-button:disabled {
    cursor: wait;
    opacity: 0.75;
}

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

.loader {
    display: none;
    width: 19px;
    height: 19px;
    border: 2px solid rgba(3, 16, 32, 0.25);
    border-top-color: #031020;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

.login-button.loading .button-label {
    display: none;
}

.login-button.loading .loader {
    display: block;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Register section */

.separator {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 27px 0 20px;
    color: #8194b2;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1.2px;
    white-space: nowrap;
}

.separator::before,
.separator::after {
    content: "";
    height: 1px;
    flex: 1;
    background: linear-gradient(90deg, transparent, #284362);
}

.separator::after {
    background: linear-gradient(90deg, #284362, transparent);
}

.register-button {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 51px;
    padding: 12px 38px;
    border: 1px solid rgba(39, 245, 162, 0.55);
    border-radius: 14px;
    color: var(--green);
    background: linear-gradient(100deg, rgba(39, 245, 162, 0.10), rgba(0, 217, 255, 0.04));
    text-decoration: none;
    font-size: 12px;
    font-weight: 800;
    transition: 0.25s;
}

.register-button:hover {
    background: rgba(39, 245, 162, 0.15);
    box-shadow: 0 0 22px rgba(39, 245, 162, 0.10);
}

.arrow-right {
    position: absolute;
    right: 15px;
    font-size: 11px;
}

/* Security footer inside card */

.security-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 25px;
    color: #a3b5cf;
    font-size: 10px;
    font-weight: 600;
}

.security-row div {
    display: flex;
    align-items: center;
    gap: 5px;
}

.security-row i {
    color: var(--green);
}

.security-row > span {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--gold);
}

/* Features */

.features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin: 28px 0 25px;
}

.feature {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 6px;
}

.feature-icon {
    display: grid;
    place-items: center;
    width: 43px;
    height: 43px;
    margin-bottom: 3px;
    border: 1px solid rgba(0, 217, 255, 0.4);
    border-radius: 15px;
    color: var(--cyan);
    background: rgba(0, 217, 255, 0.06);
    font-size: 17px;
}

.feature strong {
    color: #e8f2ff;
    font-size: 11px;
}

.feature small {
    color: #8296b6;
    font-size: 9px;
    line-height: 1.5;
}

/* Bottom footer */

footer {
    text-align: center;
}

.footer-line {
    width: 70px;
    height: 2px;
    margin: 0 auto 13px;
    border-radius: 10px;
    background: linear-gradient(90deg, var(--cyan), var(--gold));
}

footer p {
    color: var(--gold);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.6px;
}

footer small {
    display: block;
    margin-top: 9px;
    color: #627591;
    font-size: 9px;
}

/* Notification */

.notification {
    position: fixed;
    top: -100px;
    left: 50%;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 10px;
    width: max-content;
    max-width: calc(100% - 30px);
    padding: 14px 18px;
    border: 1px solid rgba(39, 245, 162, 0.5);
    border-radius: 15px;
    color: #fff;
    background: rgba(5, 40, 37, 0.97);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
    font-size: 12px;
    font-weight: 600;
    opacity: 0;
    transition: top 0.4s ease, opacity 0.4s ease;
}

.notification > i {
    color: var(--green);
    font-size: 17px;
}

.notification.show {
    top: 18px;
    opacity: 1;
}

.notification.error {
    border-color: rgba(255, 77, 100, 0.6);
    background: rgba(60, 13, 25, 0.97);
}

.notification.error > i {
    color: #ff657c;
}

/* Mobile adjustments */

@media (max-width: 380px) {
    .page-container {
        padding: 24px 15px 20px;
    }

    .brand-section {
        margin-bottom: 22px;
    }

    .login-card {
        padding: 24px 17px 20px;
        border-radius: 23px;
    }

    .brand-name {
        font-size: 2.2rem;
    }

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

    .features {
        gap: 4px;
    }

    .security-row {
        gap: 8px;
        font-size: 9px;
    }
}

@media (min-height: 850px) and (min-width: 381px) {
    .page-container {
        padding-top: 40px;
        padding-bottom: 30px;
    }

    .brand-section {
        margin-bottom: 34px;
    }

    .login-card {
        padding: 32px 26px 26px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}
