/**
 * Market Experts Social Auth Styles
 * Ultra-modern dark design with animated effects
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    --meauth-primary: #3b82f6;
    --meauth-primary-glow: rgba(59, 130, 246, 0.5);
    --meauth-secondary: #8b5cf6;
    --meauth-accent: #06b6d4;
    --meauth-accent-glow: rgba(6, 182, 212, 0.5);
    --meauth-gradient: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 50%, #06b6d4 100%);
    --meauth-gradient-fast: linear-gradient(90deg, #3b82f6, #8b5cf6, #06b6d4, #8b5cf6, #3b82f6);
    --meauth-text-white: #ffffff;
    --meauth-text-gray: #94a3b8;
    --meauth-text-dim: #64748b;
    --meauth-bg-dark: #030712;
    --meauth-bg-card: rgba(15, 23, 42, 0.8);
    --meauth-border: rgba(255, 255, 255, 0.1);
    --meauth-border-glow: rgba(59, 130, 246, 0.5);
    --meauth-error: #ef4444;
    --meauth-success: #22c55e;
    --meauth-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Reset */
html, body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

.meauth-page,
.meauth-page * {
    box-sizing: border-box;
}

.meauth-page * {
    margin: 0;
    padding: 0;
}

/* ========================================
   ANIMATED BACKGROUND
   ======================================== */
.meauth-page {
    font-family: var(--meauth-font);
    min-height: 100vh;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    line-height: 1.6;
    position: relative;
    overflow-x: hidden;
    overflow-y: auto;
    background: var(--meauth-bg-dark);
}

.meauth-page-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 40px 20px;
}

.meauth-logo-wrapper {
    position: relative;
    z-index: 10;
    margin-bottom: 40px;
    text-align: center;
}

.meauth-logo-link {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

/* Animated gradient orbs */
.meauth-page::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.3) 0%, transparent 70%);
    top: -200px;
    left: -200px;
    animation: meauth-orb-float 15s ease-in-out infinite;
    filter: blur(60px);
}

.meauth-page::after {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.25) 0%, transparent 70%);
    bottom: -150px;
    right: -150px;
    animation: meauth-orb-float 18s ease-in-out infinite reverse;
    filter: blur(60px);
}

@keyframes meauth-orb-float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(50px, 30px) scale(1.1); }
    50% { transform: translate(20px, -40px) scale(0.95); }
    75% { transform: translate(-30px, 20px) scale(1.05); }
}

/* Particle stars background */
.meauth-particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.meauth-particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    animation: meauth-float-around 20s ease-in-out infinite;
}

/* Different animation variants for variety */
.meauth-particle:nth-child(3n) {
    animation-name: meauth-float-diagonal;
    animation-duration: 25s;
}

.meauth-particle:nth-child(5n) {
    animation-name: meauth-float-circular;
    animation-duration: 30s;
}

.meauth-particle:nth-child(7n) {
    animation-name: meauth-float-wave;
    animation-duration: 18s;
}

@keyframes meauth-float-around {
    0%, 100% {
        opacity: 0.3;
        transform: translate(0, 0) scale(1);
    }
    25% {
        opacity: 1;
        transform: translate(30px, -50px) scale(1.5);
    }
    50% {
        opacity: 0.5;
        transform: translate(-20px, -100px) scale(1.2);
    }
    75% {
        opacity: 0.8;
        transform: translate(40px, -30px) scale(1.3);
    }
}

@keyframes meauth-float-diagonal {
    0%, 100% {
        opacity: 0.2;
        transform: translate(0, 0) scale(1);
    }
    33% {
        opacity: 1;
        transform: translate(80px, -80px) scale(1.8);
    }
    66% {
        opacity: 0.4;
        transform: translate(-40px, -160px) scale(1);
    }
}

@keyframes meauth-float-circular {
    0% {
        opacity: 0.3;
        transform: translate(0, 0) rotate(0deg) scale(1);
    }
    25% {
        opacity: 1;
        transform: translate(50px, -30px) rotate(90deg) scale(1.5);
    }
    50% {
        opacity: 0.5;
        transform: translate(0, -60px) rotate(180deg) scale(1.2);
    }
    75% {
        opacity: 0.8;
        transform: translate(-50px, -30px) rotate(270deg) scale(1.4);
    }
    100% {
        opacity: 0.3;
        transform: translate(0, 0) rotate(360deg) scale(1);
    }
}

@keyframes meauth-float-wave {
    0%, 100% {
        opacity: 0.4;
        transform: translate(0, 0) scale(1);
    }
    20% {
        opacity: 1;
        transform: translate(20px, -40px) scale(1.6);
    }
    40% {
        opacity: 0.6;
        transform: translate(-10px, -80px) scale(1.1);
    }
    60% {
        opacity: 0.9;
        transform: translate(30px, -120px) scale(1.4);
    }
    80% {
        opacity: 0.5;
        transform: translate(-20px, -60px) scale(1.2);
    }
}

/* Shooting stars */
.meauth-shooting-star {
    position: absolute;
    width: 100px;
    height: 2px;
    background: linear-gradient(90deg, rgba(255,255,255,0.8), transparent);
    border-radius: 50%;
    animation: meauth-shoot 8s linear infinite;
    opacity: 0;
}

.meauth-shooting-star:nth-child(1) { top: 10%; left: 10%; animation-delay: 0s; }
.meauth-shooting-star:nth-child(2) { top: 30%; left: 50%; animation-delay: 3s; }
.meauth-shooting-star:nth-child(3) { top: 60%; left: 20%; animation-delay: 6s; }

@keyframes meauth-shoot {
    0% { transform: translateX(0) translateY(0) rotate(-45deg); opacity: 0; }
    5% { opacity: 1; }
    15% { transform: translateX(300px) translateY(300px) rotate(-45deg); opacity: 0; }
    100% { opacity: 0; }
}

/* Grid pattern overlay */
.meauth-grid-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        linear-gradient(rgba(59, 130, 246, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(59, 130, 246, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
    -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
}

/* Trading glow lines container */
.meauth-grid-lines {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}

/* Vertical glow lines (going up/down) */
.meauth-glow-line-v {
    position: absolute;
    width: 2px;
    height: 150px;
    border-radius: 2px;
    filter: blur(1px);
    opacity: 0;
    animation: meauth-glow-vertical 8s ease-in-out infinite;
}

/* Green (bullish) lines going up */
.meauth-glow-line-v.green {
    background: linear-gradient(to top, transparent, #22c55e 30%, #4ade80 50%, #22c55e 70%, transparent);
    box-shadow: 0 0 20px #22c55e, 0 0 40px #22c55e;
    animation-name: meauth-glow-up;
}

/* Red (bearish) lines going down */
.meauth-glow-line-v.red {
    background: linear-gradient(to bottom, transparent, #ef4444 30%, #f87171 50%, #ef4444 70%, transparent);
    box-shadow: 0 0 20px #ef4444, 0 0 40px #ef4444;
    animation-name: meauth-glow-down;
}

/* Horizontal glow lines */
.meauth-glow-line-h {
    position: absolute;
    width: 150px;
    height: 2px;
    border-radius: 2px;
    filter: blur(1px);
    opacity: 0;
    animation: meauth-glow-horizontal 10s ease-in-out infinite;
}

.meauth-glow-line-h.green {
    background: linear-gradient(to right, transparent, #22c55e 30%, #4ade80 50%, #22c55e 70%, transparent);
    box-shadow: 0 0 20px #22c55e, 0 0 40px #22c55e;
    animation-name: meauth-glow-right;
}

.meauth-glow-line-h.red {
    background: linear-gradient(to left, transparent, #ef4444 30%, #f87171 50%, #ef4444 70%, transparent);
    box-shadow: 0 0 20px #ef4444, 0 0 40px #ef4444;
    animation-name: meauth-glow-left;
}

@keyframes meauth-glow-up {
    0% {
        transform: translateY(100vh);
        opacity: 0;
    }
    5% {
        opacity: 0.8;
    }
    45% {
        opacity: 0.8;
    }
    50% {
        transform: translateY(-200px);
        opacity: 0;
    }
    100% {
        transform: translateY(-200px);
        opacity: 0;
    }
}

@keyframes meauth-glow-down {
    0% {
        transform: translateY(-200px);
        opacity: 0;
    }
    5% {
        opacity: 0.8;
    }
    45% {
        opacity: 0.8;
    }
    50% {
        transform: translateY(100vh);
        opacity: 0;
    }
    100% {
        transform: translateY(100vh);
        opacity: 0;
    }
}

@keyframes meauth-glow-right {
    0% {
        transform: translateX(-200px);
        opacity: 0;
    }
    5% {
        opacity: 0.6;
    }
    45% {
        opacity: 0.6;
    }
    50% {
        transform: translateX(100vw);
        opacity: 0;
    }
    100% {
        transform: translateX(100vw);
        opacity: 0;
    }
}

@keyframes meauth-glow-left {
    0% {
        transform: translateX(100vw);
        opacity: 0;
    }
    5% {
        opacity: 0.6;
    }
    45% {
        opacity: 0.6;
    }
    50% {
        transform: translateX(-200px);
        opacity: 0;
    }
    100% {
        transform: translateX(-200px);
        opacity: 0;
    }
}

/* Additional floating orbs */
.meauth-orb {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    filter: blur(80px);
}

.meauth-orb-1 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.2) 0%, transparent 70%);
    top: 50%;
    left: -100px;
    animation: meauth-orb-float 20s ease-in-out infinite;
}

.meauth-orb-2 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.2) 0%, transparent 70%);
    top: 10%;
    right: 10%;
    animation: meauth-orb-float 25s ease-in-out infinite reverse;
    animation-delay: -5s;
}

.meauth-orb-3 {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.2) 0%, transparent 70%);
    bottom: 5%;
    left: 30%;
    animation: meauth-orb-float 18s ease-in-out infinite;
    animation-delay: -10s;
}

.meauth-orb-4 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.18) 0%, transparent 70%);
    bottom: 10%;
    right: 15%;
    animation: meauth-orb-float 22s ease-in-out infinite reverse;
    animation-delay: -8s;
}

.meauth-orb-5 {
    width: 500px;
    height: 300px;
    background: radial-gradient(ellipse, rgba(6, 182, 212, 0.15) 0%, rgba(139, 92, 246, 0.1) 40%, transparent 70%);
    bottom: -50px;
    left: 50%;
    margin-left: -250px;
    animation: meauth-orb-pulse 15s ease-in-out infinite;
}

@keyframes meauth-orb-pulse {
    0%, 100% { opacity: 0.6; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.1); }
}

/* Cursor glow that follows mouse */
.meauth-cursor-glow {
    position: fixed;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.15) 0%, rgba(139, 92, 246, 0.1) 30%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    transform: translate(-50%, -50%);
    z-index: 1;
    filter: blur(40px);
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

@media (max-width: 768px) {
    .meauth-cursor-glow {
        display: none;
    }
}

/* ========================================
   LOGO
   ======================================== */
.meauth-logo-wrapper {
    position: relative;
    z-index: 10;
    margin-bottom: 40px;
    text-align: center;
    animation: meauth-fade-down 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes meauth-fade-down {
    from { opacity: 0; transform: translateY(-30px); }
    to { opacity: 1; transform: translateY(0); }
}

.meauth-logo-wrapper img {
    max-height: 50px;
    width: auto;
    filter: drop-shadow(0 0 30px rgba(59, 130, 246, 0.5));
}

.meauth-logo-text {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6, #06b6d4, #8b5cf6, #3b82f6);
    background-size: 300% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
    animation: meauth-logo-gradient 5s ease infinite;
    filter: drop-shadow(0 0 30px rgba(59, 130, 246, 0.4));
}

@keyframes meauth-logo-gradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ========================================
   MAIN CONTAINER & CARD
   ======================================== */
.meauth-container {
    width: 100%;
    max-width: 440px;
    position: relative;
    z-index: 10;
    animation: meauth-fade-up 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both;
}

@keyframes meauth-fade-up {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Card with animated glow border */
.meauth-card {
    position: relative;
    background: var(--meauth-bg-card);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border-radius: 24px;
    overflow: hidden;
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.1),
        0 25px 50px -12px rgba(0, 0, 0, 0.8),
        0 0 100px -20px rgba(59, 130, 246, 0.3);
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.meauth-card:hover {
    transform: translateY(-5px);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.15),
        0 35px 70px -15px rgba(0, 0, 0, 0.9),
        0 0 120px -10px rgba(59, 130, 246, 0.4),
        0 0 80px -20px rgba(139, 92, 246, 0.3);
}

/* Animated gradient border */
.meauth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 24px;
    padding: 1px;
    background: var(--meauth-gradient-fast);
    background-size: 400% 100%;
    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: meauth-border-glow 4s linear infinite;
    opacity: 0.6;
}

@keyframes meauth-border-glow {
    0% { background-position: 0% 50%; }
    100% { background-position: 400% 50%; }
}

/* Top glow line */
.meauth-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 20%;
    right: 20%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.8), transparent);
    opacity: 0.5;
}

/* ========================================
   HEADER
   ======================================== */
.meauth-header {
    text-align: center;
    padding: 48px 48px 0;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Smaller header for register form */
#meauth-signup-content .meauth-header {
    padding: 36px 48px 0;
}

#meauth-signup-content .meauth-title {
    font-size: 2rem;
    margin-bottom: 8px;
}

.meauth-title {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--meauth-text-white);
    margin-bottom: 12px;
    letter-spacing: -0.02em;
    position: relative;
    display: inline-block;
}

.meauth-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--meauth-gradient);
    border-radius: 2px;
    animation: meauth-title-bar 3s ease-in-out infinite;
}

@keyframes meauth-title-bar {
    0%, 100% { width: 60px; opacity: 1; }
    50% { width: 100px; opacity: 0.8; }
}

.meauth-subtitle {
    color: var(--meauth-text-gray);
    font-size: 0.9375rem;
}

.meauth-subtitle a {
    color: var(--meauth-primary);
    text-decoration: none;
    font-weight: 600;
    position: relative;
    transition: all 0.3s ease;
}

.meauth-subtitle a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--meauth-gradient);
    transition: width 0.3s ease;
}

.meauth-subtitle a:hover {
    color: var(--meauth-accent);
}

.meauth-subtitle a:hover::after {
    width: 100%;
}

/* ========================================
   BODY & FORM
   ======================================== */
.meauth-body {
    padding: 36px 48px 48px;
    position: relative;
}

/* Tighter body padding for register form */
#meauth-signup-content .meauth-body {
    padding: 28px 48px 40px;
}

.meauth-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Tighter spacing for register form with more fields */
#meauth-signup-content .meauth-form {
    gap: 14px;
}

.meauth-form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* Smaller input padding for register form */
#meauth-signup-content .meauth-input {
    padding: 14px 45px 14px 48px;
}

.meauth-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--meauth-text-white);
    margin-left: 4px;
}

/* ========================================
   INPUTS WITH GLOW EFFECTS
   ======================================== */
.meauth-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.meauth-input-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--meauth-text-dim);
    pointer-events: none;
    transition: all 0.3s ease;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.meauth-input-icon svg {
    width: 18px;
    height: 18px;
}

.meauth-input {
    width: 100%;
    padding: 18px 50px 18px 52px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    font-size: 1rem;
    font-family: var(--meauth-font);
    color: var(--meauth-text-white);
    transition: all 0.3s ease;
    outline: none;
}

.meauth-input::placeholder {
    color: var(--meauth-text-dim);
    opacity: 1;
}

.meauth-input:hover {
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(15, 23, 42, 0.8);
}

.meauth-input:focus {
    border-color: var(--meauth-primary);
    background: rgba(15, 23, 42, 0.9);
    box-shadow:
        0 0 0 4px rgba(59, 130, 246, 0.15),
        0 0 30px -5px rgba(59, 130, 246, 0.5),
        0 0 60px -10px rgba(139, 92, 246, 0.3),
        inset 0 0 20px -10px rgba(59, 130, 246, 0.2);
    animation: meauth-input-glow 2s ease-in-out infinite;
}

@keyframes meauth-input-glow {
    0%, 100% { box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15), 0 0 30px -5px rgba(59, 130, 246, 0.5), 0 0 60px -10px rgba(139, 92, 246, 0.3); }
    50% { box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.15), 0 0 40px -5px rgba(139, 92, 246, 0.5), 0 0 80px -10px rgba(59, 130, 246, 0.3); }
}

.meauth-input:focus ~ .meauth-input-icon,
.meauth-input-wrapper:focus-within .meauth-input-icon {
    color: var(--meauth-primary);
    filter: drop-shadow(0 0 8px var(--meauth-primary-glow));
}

.meauth-input.error {
    border-color: var(--meauth-error);
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.15);
}

.meauth-input-error {
    font-size: 0.75rem;
    color: var(--meauth-error);
    margin-left: 16px;
}

/* Password toggle */
.meauth-password-toggle {
    position: absolute;
    right: 18px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--meauth-text-dim);
    padding: 4px;
    transition: all 0.3s ease;
    z-index: 1;
}

.meauth-password-toggle:hover {
    color: var(--meauth-primary);
    transform: scale(1.15);
    filter: drop-shadow(0 0 8px var(--meauth-primary-glow));
}

/* ========================================
   SUBMIT BUTTON - ANIMATED GRADIENT
   ======================================== */
.meauth-submit {
    width: 100%;
    padding: 18px 24px;
    background: var(--meauth-gradient);
    background-size: 200% 100%;
    color: var(--meauth-text-white);
    border: none;
    border-radius: 16px;
    font-size: 1rem;
    font-weight: 600;
    font-family: var(--meauth-font);
    cursor: pointer;
    transition: all 0.4s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 8px;
    position: relative;
    overflow: hidden;
    box-shadow:
        0 4px 20px -4px rgba(59, 130, 246, 0.5),
        0 0 40px -10px rgba(139, 92, 246, 0.4);
    animation: meauth-gradient-shift 3s ease infinite;
}

@keyframes meauth-gradient-shift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Shine effect */
.meauth-submit::before {
    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.6s ease;
}

.meauth-submit:hover {
    transform: translateY(-3px);
    box-shadow:
        0 8px 30px -4px rgba(59, 130, 246, 0.6),
        0 0 60px -10px rgba(139, 92, 246, 0.5);
}

.meauth-submit:hover::before {
    left: 100%;
}

.meauth-submit:active {
    transform: translateY(-1px);
}

.meauth-submit:disabled {
    background: linear-gradient(135deg, #334155, #1e293b);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    animation: none;
}

/* Smaller submit button for register form */
#meauth-signup-content .meauth-submit {
    padding: 14px 24px;
    margin-top: 4px;
}

/* Spinner */
.meauth-spinner {
    width: 22px;
    height: 22px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: meauth-spin 0.8s linear infinite;
}

@keyframes meauth-spin {
    to { transform: rotate(360deg); }
}

/* ========================================
   FORGOT LINK
   ======================================== */
.meauth-forgot-row {
    text-align: right;
    margin-top: -8px;
}

.meauth-forgot-link {
    color: var(--meauth-text-gray);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.meauth-forgot-link:hover {
    color: var(--meauth-primary);
}

/* ========================================
   DIVIDER
   ======================================== */
.meauth-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 28px 0;
    color: var(--meauth-text-dim);
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Smaller divider for register form */
#meauth-signup-content .meauth-divider {
    margin: 20px 0;
}

.meauth-divider::before,
.meauth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
}

/* ========================================
   SOCIAL BUTTONS - GLOWING HOVER
   ======================================== */
.meauth-social-buttons {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

.meauth-social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    padding: 0;
    border-radius: 14px;
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    text-decoration: none;
    background: rgba(255, 255, 255, 0.03);
    color: var(--meauth-text-white);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

/* Animated shine effect on hover */
.meauth-social-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

/* Background glow */
.meauth-social-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 0;
}

.meauth-social-btn:hover {
    transform: translateY(-3px) scale(1.08);
    border-color: transparent;
}

.meauth-social-btn:hover::before {
    left: 100%;
}

.meauth-social-btn:hover::after {
    opacity: 1;
}

.meauth-btn-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    position: relative;
    z-index: 1;
}

.meauth-btn-icon svg {
    width: 24px;
    height: 24px;
}

.meauth-social-btn .meauth-btn-text {
    display: none; /* Hide text for icon-only social buttons */
}

/* Provider specific glow effects */
.meauth-btn-google::after {
    background: linear-gradient(135deg, rgba(234, 67, 53, 0.15), rgba(251, 188, 5, 0.15));
}
.meauth-btn-google:hover {
    box-shadow:
        0 0 30px -5px rgba(234, 67, 53, 0.5),
        0 0 60px -10px rgba(251, 188, 5, 0.3);
    border-color: rgba(234, 67, 53, 0.5);
}

.meauth-btn-apple::after {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.03));
}
.meauth-btn-apple:hover {
    box-shadow:
        0 0 30px -5px rgba(255, 255, 255, 0.3),
        0 0 60px -10px rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.meauth-btn-twitter::after {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.03));
}
.meauth-btn-twitter:hover {
    box-shadow:
        0 0 30px -5px rgba(255, 255, 255, 0.3),
        0 0 60px -10px rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.meauth-btn-discord::after {
    background: linear-gradient(135deg, rgba(88, 101, 242, 0.2), rgba(88, 101, 242, 0.08));
}
.meauth-btn-discord:hover {
    box-shadow:
        0 0 30px -5px rgba(88, 101, 242, 0.6),
        0 0 60px -10px rgba(88, 101, 242, 0.4);
    border-color: rgba(88, 101, 242, 0.5);
}

/* MetaMask - Orange Fox */
.meauth-btn-metamask::after {
    background: linear-gradient(135deg, rgba(246, 133, 27, 0.2), rgba(205, 99, 21, 0.08));
}
.meauth-btn-metamask:hover {
    box-shadow:
        0 0 30px -5px rgba(246, 133, 27, 0.6),
        0 0 60px -10px rgba(246, 133, 27, 0.4);
    border-color: rgba(246, 133, 27, 0.5);
}

/* Telegram - Blue */
.meauth-btn-telegram::after {
    background: linear-gradient(135deg, rgba(41, 182, 246, 0.2), rgba(0, 136, 204, 0.08));
}
.meauth-btn-telegram:hover {
    box-shadow:
        0 0 30px -5px rgba(41, 182, 246, 0.6),
        0 0 60px -10px rgba(41, 182, 246, 0.4);
    border-color: rgba(41, 182, 246, 0.5);
}

/* Reddit - Orange Red */
.meauth-btn-reddit::after {
    background: linear-gradient(135deg, rgba(255, 69, 0, 0.2), rgba(255, 69, 0, 0.08));
}
.meauth-btn-reddit:hover {
    box-shadow:
        0 0 30px -5px rgba(255, 69, 0, 0.6),
        0 0 60px -10px rgba(255, 69, 0, 0.4);
    border-color: rgba(255, 69, 0, 0.5);
}

/* ========================================
   CHECKBOX
   ======================================== */
.meauth-checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 4px;
}

.meauth-checkbox {
    width: 18px;
    height: 18px;
    accent-color: var(--meauth-primary);
    cursor: pointer;
    margin-top: 1px;
    flex-shrink: 0;
}

.meauth-checkbox-label {
    font-size: 0.8125rem;
    color: var(--meauth-text-gray);
    cursor: pointer;
    line-height: 1.4;
}

.meauth-checkbox-label a {
    color: var(--meauth-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.meauth-checkbox-label a:hover {
    color: var(--meauth-accent);
}

/* ========================================
   TERMS TEXT
   ======================================== */
.meauth-terms {
    text-align: center;
    margin-top: 28px;
    font-size: 0.8125rem;
    color: var(--meauth-text-dim);
    line-height: 1.6;
}

.meauth-terms a {
    color: var(--meauth-text-gray);
    text-decoration: none;
    transition: color 0.2s ease;
}

.meauth-terms a:hover {
    color: var(--meauth-primary);
}

/* ========================================
   MESSAGES - ANIMATED
   ======================================== */
.meauth-message {
    padding: 16px 20px;
    border-radius: 14px;
    margin-bottom: 24px;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: meauth-message-appear 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes meauth-message-appear {
    from { opacity: 0; transform: translateY(-10px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.meauth-message-error {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.3);
    box-shadow: 0 0 30px -10px rgba(239, 68, 68, 0.4);
}

.meauth-message-success {
    background: rgba(34, 197, 94, 0.15);
    color: #86efac;
    border: 1px solid rgba(34, 197, 94, 0.3);
    box-shadow: 0 0 30px -10px rgba(34, 197, 94, 0.4);
}

.meauth-message-info {
    background: rgba(59, 130, 246, 0.15);
    color: #93c5fd;
    border: 1px solid rgba(59, 130, 246, 0.3);
    box-shadow: 0 0 30px -10px rgba(59, 130, 246, 0.4);
}

.meauth-message-icon {
    flex-shrink: 0;
}

/* ========================================
   TAB SWITCHING
   ======================================== */
.meauth-switch-text {
    text-align: center;
    margin-top: 28px;
    padding-top: 28px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--meauth-text-gray);
    font-size: 0.9375rem;
}

.meauth-switch-text a {
    color: var(--meauth-primary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.meauth-switch-text a:hover {
    color: var(--meauth-accent);
}

.meauth-tab-content {
    display: none;
}

.meauth-tab-content.active {
    display: block;
    animation: meauth-tab-appear 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes meauth-tab-appear {
    from { opacity: 0; transform: scale(0.98) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.meauth-tabs {
    display: none;
}

/* ========================================
   PASSWORD STRENGTH
   ======================================== */
.meauth-password-strength {
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    margin-top: 10px;
    margin-left: 4px;
    margin-right: 4px;
    overflow: hidden;
}

.meauth-password-strength-bar {
    height: 100%;
    transition: all 0.4s ease;
    border-radius: 2px;
    box-shadow: 0 0 10px currentColor;
}

.meauth-password-strength-bar.weak {
    width: 25%;
    background: linear-gradient(90deg, #ef4444, #f87171);
}

.meauth-password-strength-bar.fair {
    width: 50%;
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

.meauth-password-strength-bar.good {
    width: 75%;
    background: linear-gradient(90deg, #06b6d4, #22d3ee);
}

.meauth-password-strength-bar.strong {
    width: 100%;
    background: linear-gradient(90deg, #22c55e, #4ade80);
}

.meauth-password-strength-text {
    font-size: 0.75rem;
    margin-top: 6px;
    margin-left: 4px;
    font-weight: 500;
}

/* ========================================
   VERIFICATION SUCCESS
   ======================================== */
.meauth-verification-sent {
    text-align: center;
    padding: 20px 0;
}

.meauth-verification-sent svg {
    margin-bottom: 24px;
    filter: drop-shadow(0 0 20px rgba(34, 197, 94, 0.5));
    animation: meauth-success-pop 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes meauth-success-pop {
    0% { transform: scale(0) rotate(-180deg); opacity: 0; }
    60% { transform: scale(1.2) rotate(10deg); }
    100% { transform: scale(1) rotate(0); opacity: 1; }
}

.meauth-verification-sent h3 {
    margin-bottom: 12px;
    color: var(--meauth-text-white);
    font-size: 1.5rem;
    font-weight: 600;
}

.meauth-verification-sent p {
    color: var(--meauth-text-gray);
    margin-bottom: 20px;
    line-height: 1.6;
}

/* ========================================
   LINK ICON (Account Linking)
   ======================================== */
.meauth-link-icon {
    width: 80px;
    height: 80px;
    background: var(--meauth-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 28px;
    animation: meauth-pulse-glow 2s ease-in-out infinite;
    box-shadow: 0 0 40px -10px rgba(59, 130, 246, 0.6);
}

@keyframes meauth-pulse-glow {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 40px -10px rgba(59, 130, 246, 0.6);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 60px -10px rgba(139, 92, 246, 0.8);
    }
}

.meauth-link-icon svg {
    width: 40px;
    height: 40px;
    color: white;
}

/* ========================================
   LINKED ACCOUNTS (Profile)
   ======================================== */
.meauth-linked-accounts {
    margin-top: 24px;
    padding: 28px;
    background: rgba(15, 23, 42, 0.6);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.meauth-linked-accounts h3 {
    font-size: 1.125rem;
    margin-bottom: 20px;
    color: var(--meauth-text-white);
}

.meauth-linked-account {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: rgba(30, 41, 59, 0.5);
    border-radius: 14px;
    margin-bottom: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.3s ease;
}

.meauth-linked-account:hover {
    border-color: rgba(59, 130, 246, 0.3);
    background: rgba(30, 41, 59, 0.8);
    box-shadow: 0 0 20px -5px rgba(59, 130, 246, 0.3);
}

.meauth-linked-account-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.meauth-linked-account-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--meauth-text-white);
}

.meauth-linked-account-name {
    font-weight: 600;
    color: var(--meauth-text-white);
}

.meauth-linked-account-email {
    font-size: 0.8125rem;
    color: var(--meauth-text-gray);
    margin-top: 2px;
}

.meauth-unlink-btn {
    padding: 10px 16px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--meauth-error);
    background: transparent;
    border: 1px solid rgba(239, 68, 68, 0.5);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.meauth-unlink-btn:hover {
    background: var(--meauth-error);
    color: white;
    border-color: var(--meauth-error);
    box-shadow: 0 0 20px -5px rgba(239, 68, 68, 0.5);
}

.meauth-primary-badge {
    font-size: 0.6875rem;
    background: var(--meauth-gradient);
    color: white;
    padding: 4px 10px;
    border-radius: 6px;
    margin-left: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 480px) {
    .meauth-page {
        padding: 0;
        justify-content: flex-start;
    }

    .meauth-page-wrapper {
        padding: 20px 16px;
        padding-top: 40px;
        justify-content: flex-start;
    }

    .meauth-logo-wrapper {
        margin-bottom: 24px;
    }

    .meauth-logo-wrapper .me-brand-text .me-name {
        font-size: 1.5rem;
    }

    .meauth-logo-wrapper .me-brand-text .me-trading {
        font-size: 1rem;
        letter-spacing: 0.25em;
    }

    .meauth-container {
        max-width: none;
    }

    .meauth-card {
        border-radius: 20px;
    }

    .meauth-header {
        padding: 36px 28px 0;
    }

    .meauth-body {
        padding: 28px;
    }

    .meauth-title {
        font-size: 1.875rem;
    }

    .meauth-input {
        padding: 16px 45px 16px 52px;
    }

    .meauth-input-icon {
        left: 18px;
    }

    .meauth-submit {
        padding: 16px 20px;
    }

    .meauth-social-btn {
        width: 46px;
        height: 46px;
    }

    /* Register form mobile adjustments */
    #meauth-signup-content .meauth-header {
        padding: 28px 24px 0;
    }

    #meauth-signup-content .meauth-body {
        padding: 20px 24px 28px;
    }

    #meauth-signup-content .meauth-title {
        font-size: 1.625rem;
    }

    #meauth-signup-content .meauth-input {
        padding: 12px 40px 12px 44px;
    }

    #meauth-signup-content .meauth-form {
        gap: 12px;
    }

    #meauth-signup-content .meauth-divider {
        margin: 16px 0;
    }

    .meauth-checkbox-label {
        font-size: 0.75rem;
    }
}

/* ========================================
   ACCESSIBILITY
   ======================================== */
.meauth-social-btn:focus-visible,
.meauth-submit:focus-visible,
.meauth-input:focus-visible {
    outline: 2px solid var(--meauth-primary);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ========================================
   LOGIN / LOGOUT SPLASH OVERLAY
   ======================================== */
.meauth-login-splash {
    position: fixed;
    inset: 0;
    z-index: 100001;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.4s;
}

.meauth-login-splash.active {
    opacity: 1;
    visibility: visible;
}

.meauth-splash-backdrop {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, rgba(3,7,18,0.95) 0%, rgba(3,7,18,0.99) 100%);
    animation: meauth-splash-fadein 0.4s ease;
}

@keyframes meauth-splash-fadein {
    from { opacity: 0; }
    to { opacity: 1; }
}

.meauth-splash-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 28px;
    animation: meauth-splash-slideup 0.5s ease 0.1s both;
}

@keyframes meauth-splash-slideup {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Glow behind logo */
.meauth-splash-glow {
    position: absolute;
    top: -60px;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(59,130,246,0.15) 0%, rgba(139,92,246,0.08) 40%, transparent 70%);
    filter: blur(40px);
    animation: meauth-splash-glow-pulse 3s ease-in-out infinite;
}

@keyframes meauth-splash-glow-pulse {
    0%, 100% { opacity: 0.6; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.15); }
}

/* Logo wrapper with spinning rings */
.meauth-splash-logo-wrap {
    position: relative;
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.meauth-splash-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid transparent;
    border-top-color: #3b82f6;
    border-right-color: #8b5cf6;
    animation: meauth-splash-spin 1.8s linear infinite;
}

.meauth-splash-ring-2 {
    inset: 8px;
    border-top-color: #06b6d4;
    border-right-color: #3b82f6;
    animation-direction: reverse;
    animation-duration: 2.4s;
}

@keyframes meauth-splash-spin {
    to { transform: rotate(360deg); }
}

.meauth-splash-logo {
    width: 70px;
    height: auto;
    filter: drop-shadow(0 0 20px rgba(59,130,246,0.3)) drop-shadow(0 0 40px rgba(139,92,246,0.15));
    animation: meauth-splash-logo-float 3s ease-in-out infinite;
}

@keyframes meauth-splash-logo-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

/* Checkmark that replaces spinner on success */
.meauth-splash-check {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0);
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    background: rgba(3, 7, 18, 0.8);
    border-radius: 50%;
}

.meauth-splash-check.show {
    opacity: 1;
    transform: scale(1);
}

.meauth-splash-check svg {
    width: 44px;
    height: 44px;
    filter: drop-shadow(0 0 16px rgba(34, 197, 94, 0.6));
}

/* Title & subtitle */
.meauth-splash-text {
    text-align: center;
}

.meauth-splash-title {
    font-family: var(--meauth-font);
    font-size: 1.3rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 8px 0;
    letter-spacing: -0.01em;
}

.meauth-splash-subtitle {
    font-family: var(--meauth-font);
    font-size: 0.88rem;
    color: #94a3b8;
    margin: 0;
    transition: opacity 0.3s ease;
}

/* Progress dots */
.meauth-splash-dots {
    display: flex;
    gap: 8px;
}

.meauth-splash-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    animation: meauth-splash-dot-bounce 1.4s ease-in-out infinite;
}

.meauth-splash-dot:nth-child(1) { animation-delay: 0s; }
.meauth-splash-dot:nth-child(2) { animation-delay: 0.16s; }
.meauth-splash-dot:nth-child(3) { animation-delay: 0.32s; }

@keyframes meauth-splash-dot-bounce {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
    40% { transform: scale(1); opacity: 1; }
}

/* Security badge */
.meauth-splash-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: var(--meauth-font);
    font-size: 0.72rem;
    color: #64748b;
    opacity: 0.7;
}

.meauth-splash-badge svg {
    width: 12px;
    height: 12px;
}

/* ========================================
   HIDDEN ELEMENTS
   ======================================== */
.meauth-footer {
    display: none;
}
