/* ==========================================
   SENKU PAY
   REGISTER PAGE
========================================== */

:root {
    --background: #070916;
    --surface: rgba(18, 23, 43, .92);
    --surface-solid: #171d34;
    --text: #ffffff;
    --muted: #9ca3b9;
    --muted-dark: #7d88aa;
    --primary: #7b2cff;
    --primary-light: #8b5cf6;
    --accent: #00d5ff;
    --success: #2ed573;
    --warning: #f7b731;
    --danger: #ff647c;
    --border: rgba(255, 255, 255, .08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    font-family: "Inter", sans-serif;
    background: var(--background);
    color: var(--text);
    overflow-x: hidden;
    position: relative;
}

body::selection {
    background: rgba(123, 44, 255, .45);
    color: #fff;
}

button,
input,
select {
    font: inherit;
}

button {
    border: 0;
}

a {
    color: inherit;
}

/* Background */

.bg-grid {
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px);
    background-size: 55px 55px;
    z-index: -5;
    pointer-events: none;
}

.glow {
    position: fixed;
    border-radius: 50%;
    filter: blur(120px);
    opacity: .20;
    z-index: -4;
    pointer-events: none;
}

.glow1 {
    width: 420px;
    height: 420px;
    background: var(--primary);
    top: -180px;
    left: -120px;
}

.glow2 {
    width: 520px;
    height: 520px;
    background: var(--accent);
    right: -180px;
    bottom: -180px;
}

.glow3 {
    width: 300px;
    height: 300px;
    background: var(--primary-light);
    left: 50%;
    top: 40%;
}

/* Header */

header {
    width: 100%;
    padding: 30px 7%;
}

.logo {
    width: fit-content;
    display: flex;
    align-items: center;
    gap: 15px;
    color: #fff;
    text-decoration: none;
}

.logo-box {
    width: 58px;
    height: 58px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-light), var(--accent));
    box-shadow: 0 15px 35px rgba(123,44,255,.35);
}

.logo h2 {
    font-size: 24px;
}

.logo small {
    color: var(--muted);
}

/* Main */

main {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 20px 80px;
}

/* Register card */

.register-card {
    width: 100%;
    max-width: 760px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 28px;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    padding: 45px;
    box-shadow: 0 25px 60px rgba(0,0,0,.45);
    animation: cardEnter .7s ease both;
}

@keyframes cardEnter {
    from {
        opacity: 0;
        transform: translateY(28px) scale(.985);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.card-top {
    text-align: center;
    margin-bottom: 35px;
}

.register-icon {
    width: 90px;
    height: 90px;
    margin: 0 auto 22px;
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-light), var(--accent));
    font-size: 34px;
    box-shadow: 0 18px 40px rgba(123,44,255,.26);
    animation: iconFloat 4s ease-in-out infinite;
}

@keyframes iconFloat {
    50% {
        transform: translateY(-7px);
    }
}

.card-top h1 {
    font-size: 42px;
    margin-bottom: 10px;
    letter-spacing: -.03em;
}

.card-top p {
    max-width: 560px;
    margin: auto;
    color: var(--muted);
    line-height: 1.8;
}

/* General message */

.form-message {
    margin-bottom: 22px;
    padding: 15px 17px;
    border-radius: 14px;
    border: 1px solid transparent;
    font-size: 14px;
    line-height: 1.6;
}

.form-message.error {
    color: #ffb3bf;
    background: rgba(255, 100, 124, .11);
    border-color: rgba(255, 100, 124, .28);
}

.form-message.success {
    color: #a8f0c5;
    background: rgba(46, 213, 115, .11);
    border-color: rgba(46, 213, 115, .28);
}

.form-message.info {
    color: #bdefff;
    background: rgba(0, 213, 255, .09);
    border-color: rgba(0, 213, 255, .24);
}

/* Form */

form {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.double {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.input-group {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: transform .3s ease;
}

.input-group:focus-within {
    transform: translateY(-2px);
}

.input-group label {
    font-size: 15px;
    font-weight: 600;
    color: #d7dcef;
}

.input-group input,
.input-group select {
    width: 100%;
    height: 58px;
    padding: 0 18px;
    border-radius: 16px;
    border: 1px solid var(--border);
    outline: none;
    background: var(--surface-solid);
    color: #fff;
    font-size: 15px;
    transition:
        border-color .3s ease,
        box-shadow .3s ease,
        background .3s ease;
}

.input-group input:hover,
.input-group select:hover {
    border-color: rgba(123,44,255,.48);
}

.input-group input::placeholder {
    color: var(--muted-dark);
}

.input-group input:focus,
.input-group select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(123,44,255,.15);
    background: #1a2039;
}

.input-group input.invalid,
.input-group select.invalid {
    border-color: var(--danger);
    box-shadow: 0 0 0 4px rgba(255,100,124,.10);
}

.input-group select {
    cursor: pointer;
}

.input-group select option {
    color: #fff;
    background: #171d34;
}

.field-help {
    color: #7f89a7;
    font-size: 12px;
    line-height: 1.5;
}

.field-error {
    min-height: 17px;
    color: #ff8fa1;
    font-size: 12px;
    line-height: 1.4;
}

.password-field {
    position: relative;
}

.password-field input {
    padding-right: 54px;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 11px;
    width: 42px;
    height: 42px;
    transform: translateY(-50%);
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: transparent;
    color: #8f98b5;
    cursor: pointer;
    transition: .25s ease;
}

.password-toggle:hover,
.password-toggle:focus-visible {
    color: #fff;
    background: rgba(255,255,255,.06);
    outline: none;
}

.password-strength {
    height: 5px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255,255,255,.07);
}

.password-strength span {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: var(--danger);
    transition: width .3s ease, background .3s ease;
}

/* Checkbox */

.checkbox {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-top: 5px;
}

.checkbox input {
    width: 18px;
    height: 18px;
    margin-top: 3px;
    flex-shrink: 0;
    accent-color: var(--primary);
}

.checkbox label {
    color: var(--muted);
    line-height: 1.8;
    font-size: 15px;
}

.checkbox a {
    color: var(--primary-light);
    text-decoration: none;
}

.checkbox a:hover {
    color: var(--accent);
}

.terms-error {
    margin-top: -14px;
}

/* Register button */

.register-btn {
    position: relative;
    width: 100%;
    height: 60px;
    overflow: hidden;
    border-radius: 18px;
    cursor: pointer;
    font-size: 17px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: .35s ease;
    box-shadow: 0 18px 40px rgba(123,44,255,.30);
}

.register-btn::before {
    content: "";
    position: absolute;
    top: 0;
    left: -80%;
    width: 55%;
    height: 100%;
    transform: skewX(-18deg);
    background: linear-gradient(
        120deg,
        transparent,
        rgba(255,255,255,.32),
        transparent
    );
    transition: left .65s ease;
}

.register-btn:hover:not(:disabled) {
    transform: translateY(-4px);
    box-shadow: 0 25px 50px rgba(123,44,255,.45);
}

.register-btn:hover:not(:disabled)::before {
    left: 130%;
}

.register-btn:disabled {
    cursor: wait;
    opacity: .72;
}

/* Security note */

.security-note {
    margin-top: 24px;
    padding: 16px 18px;
    border-radius: 16px;
    display: flex;
    align-items: flex-start;
    gap: 13px;
    color: #9aa6c6;
    background: rgba(255,255,255,.035);
    border: 1px solid rgba(255,255,255,.06);
}

.security-note i {
    color: var(--accent);
    margin-top: 3px;
}

.security-note p {
    font-size: 13px;
    line-height: 1.65;
}

/* Login link */

.bottom-text {
    text-align: center;
    margin-top: 30px;
    color: var(--muted);
    font-size: 15px;
}

.bottom-text a {
    color: var(--primary-light);
    text-decoration: none;
    font-weight: 700;
    margin-left: 6px;
}

.bottom-text a:hover {
    color: var(--accent);
}

/* Scrollbar */

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #08101d;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--primary), var(--accent));
    border-radius: 20px;
}

/* Responsive */

@media (max-width: 768px) {
    .register-card {
        padding: 35px 25px;
    }

    .card-top h1 {
        font-size: 34px;
    }

    .double {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    header {
        padding: 20px;
    }

    .logo-box {
        width: 50px;
        height: 50px;
    }

    .logo h2 {
        font-size: 20px;
    }

    .logo small {
        font-size: 11px;
    }

    main {
        padding: 25px 14px 60px;
    }

    .register-card {
        padding: 25px 20px;
        border-radius: 22px;
    }

    .register-icon {
        width: 75px;
        height: 75px;
        font-size: 28px;
    }

    .card-top h1 {
        font-size: 28px;
    }

    .card-top p {
        font-size: 14px;
    }

    .register-btn {
        height: 56px;
        font-size: 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}
