:root {
    --bg-black: #030508;
    --cyan-glow: #00f2fe;
    --blue-glow: #4facfe;
    --purple-glow: #7000ff;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

body {
    background-color: var(--bg-black);
    color: var(--text-main);
    min-height: 100vh;
    min-height: 100dvh; /* Mobile dimension auto-pickup */
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow-x: hidden;
    padding: 20px;
}

.ambient-glow {
    position: fixed;
    border-radius: 50%;
    filter: blur(140px);
    z-index: -1;
    pointer-events: none;
}

.glow-1 { width: 450px; height: 450px; background: rgba(0, 242, 254, 0.15); top: -100px; left: -100px; }
.glow-2 { width: 500px; height: 500px; background: rgba(112, 0, 255, 0.18); bottom: -150px; right: -150px; }

.auth-wrapper {
    width: 100%;
    max-width: 420px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.brand-logo {
    font-size: 1.8rem;
    font-weight: 900;
    text-decoration: none;
    background: linear-gradient(135deg, var(--cyan-glow), var(--purple-glow));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Glassmorphism Legend Login Form Style */
.form-container {
    width: 100%;
    position: relative;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 30px;
    padding: 60px 30px 30px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.8), inset 0 0 15px rgba(255, 255, 255, 0.05);
}

.user-avatar-badge {
    position: absolute;
    top: -42px;
    left: 50%;
    transform: translateX(-50%);
    width: 85px;
    height: 85px;
    border-radius: 50%;
    background: #ffffff;
    border: 2px solid rgba(0, 242, 254, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 40px;
    color: #000000;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    z-index: 10;
}

.tab-switch {
    display: flex;
    position: relative;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    padding: 3px;
    margin-bottom: 15px;
}

.tab-btn {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 10px;
    font-weight: 800;
    font-size: 0.85rem;
    letter-spacing: 1px;
    cursor: pointer;
    z-index: 2;
    transition: color 0.3s;
}

.tab-btn.active {
    color: #000;
}

.tab-slider {
    position: absolute;
    top: 3px;
    bottom: 3px;
    left: 3px;
    width: calc(50% - 3px);
    background: linear-gradient(135deg, var(--cyan-glow), var(--blue-glow));
    border-radius: 9px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
}

.tab-slider.signup-active {
    transform: translateX(100%);
}

.form-subheading {
    color: #ef4444;
    font-size: 0.8rem;
    text-align: center;
    margin-bottom: 20px;
    font-weight: 600;
}

.form-group {
    margin-bottom: 18px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper input {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
    padding: 12px 35px 12px 5px;
    color: #ffffff;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.3s;
}

.input-wrapper input:focus {
    border-bottom-color: var(--cyan-glow);
}

.input-icon {
    position: absolute;
    right: 5px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    pointer-events: none;
}

.eye-btn {
    position: absolute;
    right: 5px;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
}

.eye-btn .input-icon {
    pointer-events: auto;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 25px;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.forgot-pass {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s;
}

.forgot-pass:hover {
    color: var(--cyan-glow);
}

.btn-legend {
    background: #ffffff;
    color: #000000;
    padding: 12px;
    border-radius: 25px;
    font-weight: 800;
    font-size: 0.95rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 5px 15px rgba(255, 255, 255, 0.2);
}

.btn-legend:hover {
    background: var(--cyan-glow);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 242, 254, 0.4);
}

.full-width { width: 100%; }

.alert-box {
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.alert-box.error { background: rgba(239, 68, 68, 0.2); border: 1px solid rgba(239, 68, 68, 0.4); color: #f87171; }
.alert-box.success { background: rgba(34, 197, 94, 0.2); border: 1px solid rgba(34, 197, 94, 0.4); color: #4ade80; }
.hidden { display: none !important; }

.auth-footer-text {
    text-align: center;
    margin-top: 20px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.auth-footer-text a {
    color: #ffffff;
    font-weight: 700;
    text-decoration: none;
    margin-left: 5px;
}

.auth-footer-text a:hover {
    color: var(--cyan-glow);
}
