/* ============================================================
   HUT 5 — AUTH PAGE
   Vibrant green · Youthful energy · Modern depth
   All .pulse-* class names retained for main.js contract
   ============================================================ */

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

:root {
    /* HUT 5 — youthful green palette */
    --hut-green:      #00C853;
    --hut-green-deep: #009624;
    --hut-green-dark: #00701A;
    --hut-green-soft: #C8F7D8;
    --hut-green-glow: rgba(0, 200, 83, 0.35);
    --hut-lime:       #B2FF59;
    --hut-mint:       #69F0AE;
    --hut-teal:       #00BFA5;
    --hut-blue:       #00B0FF;
    --hut-white:      #FFFFFF;
    --hut-bg:         #0B3D1E;
    --hut-bg-2:       #0E4A26;
    --hut-surface:    #F2FBF5;
    --hut-border:     #D4EDDC;
    --hut-text:       #0A2E14;
    --hut-text-2:     #3D6B4D;
    --hut-muted:      #8AAF97;

    --hut-success:    #00C853;
    --hut-error:      #FF3B4E;

    --hut-font:       'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    --hut-r:          20px;
    --hut-r-sm:       14px;
    --hut-r-pill:     999px;

    --hut-shadow:     0 24px 60px -12px rgba(0, 0, 0, 0.35),
                      0 12px 30px -10px rgba(0, 200, 83, 0.25);
    --hut-shadow-sm:  0 6px 18px -4px rgba(0, 200, 83, 0.3);
}

html, body {
    background: var(--hut-bg);
    color: var(--hut-white);
    font-family: var(--hut-font);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
}

body {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    position: relative;
    overflow-x: hidden;
    /* Lively green layered background */
    background:
        radial-gradient(circle at 15% 20%, rgba(178, 255, 89, 0.25) 0%, transparent 40%),
        radial-gradient(circle at 85% 15%, rgba(105, 240, 174, 0.22) 0%, transparent 42%),
        radial-gradient(circle at 80% 85%, rgba(0, 191, 165, 0.25) 0%, transparent 45%),
        radial-gradient(circle at 10% 90%, rgba(0, 200, 83, 0.30) 0%, transparent 42%),
        linear-gradient(160deg, #0B3D1E 0%, #0E4A26 40%, #12522B 70%, #0B3D1E 100%);
    background-attachment: fixed;
}

/* Animated floating orbs */
body::before,
body::after {
    content: '';
    position: fixed;
    border-radius: 50%;
    filter: blur(60px);
    pointer-events: none;
    z-index: 0;
    animation: float-orb 18s ease-in-out infinite;
}

body::before {
    width: 340px;
    height: 340px;
    top: -100px;
    left: -100px;
    background: radial-gradient(circle, rgba(178, 255, 89, 0.45) 0%, transparent 70%);
    animation-delay: 0s;
}

body::after {
    width: 420px;
    height: 420px;
    bottom: -150px;
    right: -120px;
    background: radial-gradient(circle, rgba(0, 191, 165, 0.4) 0%, transparent 70%);
    animation-delay: -9s;
}

@keyframes float-orb {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50%      { transform: translate(40px, -30px) scale(1.12); }
}

/* ------------------------------------------------------------
   WRAPPER
   ------------------------------------------------------------ */
.pulse-auth {
    width: 100%;
    max-width: 420px;
    position: relative;
    z-index: 1;
}

/* ------------------------------------------------------------
   BRAND
   ------------------------------------------------------------ */
.pulse-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 12px;
}

.pulse-brand-mark {
    width: 52px;
    height: 52px;
    flex-shrink: 0;
    border-radius: 16px;
    background: var(--hut-white);
    padding: 5px;
    box-shadow: 0 8px 24px -6px rgba(178, 255, 89, 0.5),
                0 0 0 3px rgba(255, 255, 255, 0.15);
    object-fit: contain;
    animation: brand-pulse 3s ease-in-out infinite;
}

@keyframes brand-pulse {
    0%, 100% { box-shadow: 0 8px 24px -6px rgba(178, 255, 89, 0.5), 0 0 0 3px rgba(255, 255, 255, 0.15); }
    50%      { box-shadow: 0 8px 30px -4px rgba(178, 255, 89, 0.8), 0 0 0 5px rgba(178, 255, 89, 0.2); }
}

.pulse-brand-name {
    font-size: 28px;
    font-weight: 900;
    letter-spacing: -0.8px;
    line-height: 1;
    color: var(--hut-white);
    text-shadow: 0 2px 12px rgba(0, 200, 83, 0.5);
    background: linear-gradient(120deg, #B2FF59 0%, #69F0AE 50%, #00E676 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 8px rgba(105, 240, 174, 0.4));
}

/* ------------------------------------------------------------
   TAGLINE
   ------------------------------------------------------------ */
.pulse-tagline {
    text-align: center;
    font-size: 13.5px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.75);
    letter-spacing: 0.3px;
    line-height: 1.5;
    margin: 0 auto 22px;
    max-width: 300px;
    position: relative;
    padding-bottom: 16px;
}

.pulse-tagline::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 44px;
    height: 3px;
    border-radius: var(--hut-r-pill);
    background: linear-gradient(90deg, var(--hut-lime) 0%, var(--hut-mint) 100%);
    box-shadow: 0 0 12px var(--hut-green-glow);
}

.pulse-tagline strong {
    color: var(--hut-lime);
    font-weight: 700;
    text-shadow: 0 0 10px rgba(178, 255, 89, 0.5);
}

/* ------------------------------------------------------------
   CARD
   ------------------------------------------------------------ */
.pulse-card {
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: var(--hut-r);
    padding: 26px 22px;
    position: relative;
    box-shadow: var(--hut-shadow);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    overflow: hidden;
}

/* Animated gradient top accent */
.pulse-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #B2FF59 0%, #69F0AE 33%, #00C853 66%, #00BFA5 100%);
    background-size: 200% 100%;
    animation: gradient-shift 4s linear infinite;
    border-radius: var(--hut-r) var(--hut-r) 0 0;
}

@keyframes gradient-shift {
    0%   { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

/* ------------------------------------------------------------
   SWITCH — pill with vibrant gradient active
   ------------------------------------------------------------ */
.pulse-switch {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: #E8F5ED;
    border: 1px solid var(--hut-border);
    border-radius: var(--hut-r-pill);
    padding: 4px;
    margin-bottom: 24px;
}

.pulse-switch-thumb {
    position: absolute;
    top: 4px;
    left: 4px;
    width: calc(50% - 4px);
    height: calc(100% - 8px);
    background: linear-gradient(120deg, #00C853 0%, #00BFA5 100%);
    border-radius: var(--hut-r-pill);
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 0;
    box-shadow: 0 6px 18px -4px rgba(0, 200, 83, 0.55);
}

.pulse-switch[data-active="register"] .pulse-switch-thumb {
    transform: translateX(100%);
}

.pulse-switch-btn {
    position: relative;
    z-index: 1;
    padding: 11px 8px;
    background: transparent;
    border: none;
    border-radius: var(--hut-r-pill);
    font-family: var(--hut-font);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.2px;
    cursor: pointer;
    color: var(--hut-text-2);
    transition: color 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pulse-switch-btn.active {
    color: var(--hut-white);
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

.pulse-switch-btn:not(.active):hover {
    color: var(--hut-green-dark);
}

/* ------------------------------------------------------------
   FORM
   ------------------------------------------------------------ */
.pulse-form {
    display: none;
}

.pulse-form.active {
    display: block;
    animation: pulse-fade 0.3s ease;
}

@keyframes pulse-fade {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.pulse-field {
    margin-bottom: 16px;
}

.pulse-label {
    display: block;
    font-size: 11px;
    font-weight: 800;
    color: var(--hut-text-2);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 7px;
}

.pulse-optional {
    color: var(--hut-muted);
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0;
    margin-left: 4px;
}

/* Input — soft green surface, vibrant focus */
.pulse-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
    background: #F2FBF5;
    border: 1.5px solid var(--hut-border);
    border-radius: var(--hut-r-sm);
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.pulse-input-wrap:focus-within {
    border-color: var(--hut-green);
    background: var(--hut-white);
    box-shadow: 0 0 0 4px rgba(0, 200, 83, 0.15);
}

.pulse-input {
    flex: 1;
    min-width: 0;
    padding: 14px 14px;
    background: transparent;
    border: none;
    outline: none;
    color: var(--hut-text);
    font-family: var(--hut-font);
    font-size: 15px;
    font-weight: 500;
}

.pulse-input::placeholder {
    color: var(--hut-muted);
    font-weight: 400;
}

/* Eye toggle */
.pulse-eye {
    padding: 0 14px;
    background: transparent;
    border: none;
    color: var(--hut-muted);
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    flex-shrink: 0;
    transition: color 0.2s;
}

.pulse-eye:hover {
    color: var(--hut-green-deep);
}

/* ------------------------------------------------------------
   SUBMIT — bold vibrant gradient, bouncy hover
   ------------------------------------------------------------ */
.pulse-submit {
    width: 100%;
    padding: 15px;
    min-height: 52px;
    margin-top: 6px;
    border: none;
    border-radius: var(--hut-r-sm);
    background: linear-gradient(120deg, #00C853 0%, #00BFA5 100%);
    color: var(--hut-white);
    font-family: var(--hut-font);
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.4px;
    cursor: pointer;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 0.2s ease,
                filter 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 12px 28px -8px rgba(0, 200, 83, 0.6);
    position: relative;
    overflow: hidden;
}

.pulse-submit::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.pulse-submit:hover:not(:disabled)::after {
    left: 100%;
}

.pulse-submit:hover:not(:disabled) {
    transform: translateY(-2px) scale(1.01);
    box-shadow: 0 18px 36px -8px rgba(0, 200, 83, 0.75);
    filter: brightness(1.06);
}

.pulse-submit:active:not(:disabled) {
    transform: translateY(0) scale(0.99);
    filter: brightness(0.98);
}

.pulse-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: none;
}

/* ------------------------------------------------------------
   FOOT
   ------------------------------------------------------------ */
.pulse-foot {
    text-align: center;
    font-size: 12.5px;
    color: var(--hut-text-2);
    margin-top: 16px;
    font-weight: 500;
}

.pulse-foot a {
    color: var(--hut-green-deep);
    font-weight: 800;
    text-decoration: none;
    margin-left: 4px;
    border-bottom: 2px solid var(--hut-green);
    padding-bottom: 1px;
    transition: color 0.2s, border-color 0.2s;
}

.pulse-foot a:hover {
    color: var(--hut-teal);
    border-bottom-color: var(--hut-teal);
}

/* ------------------------------------------------------------
   OR DIVIDER
   ------------------------------------------------------------ */
.pulse-or {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 24px 0 12px;
    color: var(--hut-muted);
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.pulse-or::before,
.pulse-or::after {
    content: '';
    flex: 1;
    height: 1.5px;
    background: linear-gradient(90deg, transparent, var(--hut-border));
    border-radius: 2px;
}

.pulse-or::after {
    background: linear-gradient(90deg, var(--hut-border), transparent);
}

/* ------------------------------------------------------------
   SOCIAL — playful card rows
   ------------------------------------------------------------ */
.pulse-social {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    margin-bottom: 10px;
    color: var(--hut-text);
    font-family: var(--hut-font);
    font-size: 13.5px;
    font-weight: 700;
    text-decoration: none;
    background: #F2FBF5;
    border: 1.5px solid var(--hut-border);
    border-radius: var(--hut-r-sm);
    transition: border-color 0.22s ease,
                background 0.22s ease,
                color 0.22s ease,
                transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 0.22s ease;
}

.pulse-social:last-of-type {
    margin-bottom: 0;
}

.pulse-social:hover {
    color: var(--hut-white);
    background: linear-gradient(120deg, #00C853 0%, #00BFA5 100%);
    border-color: transparent;
    transform: translateX(3px) scale(1.01);
    box-shadow: 0 8px 20px -6px rgba(0, 200, 83, 0.5);
}

.pulse-social i {
    font-size: 10px;
    color: var(--hut-muted);
    transition: transform 0.22s ease, color 0.22s ease;
}

.pulse-social:hover i {
    color: var(--hut-white);
    transform: translateX(5px);
}

/* ------------------------------------------------------------
   LEGAL
   ------------------------------------------------------------ */
.pulse-legal {
    text-align: center;
    font-size: 10.5px;
    color: rgba(255, 255, 255, 0.55);
    font-weight: 500;
    margin-top: 20px;
    padding: 0 8px;
    letter-spacing: 0.3px;
}

/* ------------------------------------------------------------
   TOAST — vibrant pill with gradient accent
   ------------------------------------------------------------ */
.pulse-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: var(--hut-r-sm);
    padding: 14px 22px;
    font-family: var(--hut-font);
    font-size: 13px;
    font-weight: 700;
    color: var(--hut-text);
    box-shadow: 0 20px 50px -10px rgba(0, 0, 0, 0.35),
                0 10px 24px -8px rgba(0, 200, 83, 0.3);
    z-index: 9999;
    opacity: 0;
    max-width: 90vw;
    text-align: center;
    pointer-events: none;
    animation: pulse-toast-up 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    border-left: 4px solid var(--hut-green);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.pulse-toast.success { border-left-color: var(--hut-success); }
.pulse-toast.error   { border-left-color: var(--hut-error); }
.pulse-toast.warning { border-left-color: #FFB300; }
.pulse-toast.info    { border-left-color: var(--hut-blue); }

@keyframes pulse-toast-up {
    from { opacity: 0; transform: translateX(-50%) translateY(20px); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

@keyframes pulse-toast-down {
    from { opacity: 1; transform: translateX(-50%) translateY(0); }
    to   { opacity: 0; transform: translateX(-50%) translateY(20px); }
}

/* ------------------------------------------------------------
   RESPONSIVE
   ------------------------------------------------------------ */
@media (min-width: 600px) {
    .pulse-auth { max-width: 440px; }
    .pulse-card { padding: 32px 30px; }
    .pulse-brand-mark { width: 58px; height: 58px; }
    .pulse-brand-name { font-size: 32px; }
    body::before { width: 460px; height: 460px; }
    body::after  { width: 560px; height: 560px; }
}

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