/*
 * Neural Glass theme for auth (registration/login) page
 * Based on TemplateMo 597 Neural Glass
 */

/* Color palettes: blue (default), purple, green. Light/dark via data-theme. */
:root,
html[data-color-theme="blue"] {
    --accent: #93c5fd;
    --accent-2: #38bdf8;
    --accent-3: #60a5fa;
    --accent-link: #bfdbfe;
    --accent-hover: #7dd3fc;
    --accent-text: #93c5fd;
    --accent-rgb: 147, 197, 253;
    --accent-2-rgb: 56, 189, 248;
    --accent-3-rgb: 96, 165, 250;
    --neural-page-bg: #060a12;
    --neural-bg-1: rgba(30, 58, 138, 0.7);
    --neural-bg-2: rgba(8, 47, 73, 0.8);
    --neural-bg-3: rgba(29, 78, 216, 0.55);
    --neural-bg-mid: #0f1b2d;
    --neural-bg-end: #f0f6fc;
    --text-strong: #e8e8e8;
    --text-muted: #b8c8d9;
    --swatch-purple: #c084fc;
    --swatch-blue: #60a5fa;
    --swatch-green: #4ade80;
}

html[data-color-theme="purple"] {
    --accent: #e0a3ff;
    --accent-2: #ff69b4;
    --accent-3: #9370db;
    --accent-link: #c4a8ff;
    --accent-hover: #ffb3e0;
    --accent-text: #e0a3ff;
    --accent-rgb: 224, 163, 255;
    --accent-2-rgb: 255, 105, 180;
    --accent-3-rgb: 147, 112, 219;
    --neural-page-bg: #0a0612;
    --neural-bg-1: rgba(75, 0, 130, 0.7);
    --neural-bg-2: rgba(139, 37, 99, 0.8);
    --neural-bg-3: rgba(128, 0, 128, 0.6);
    --neural-bg-mid: #2d1b3d;
    --neural-bg-end: #f5f0fc;
    --text-strong: #e8e8e8;
    --text-muted: #c4b8d9;
}

html[data-color-theme="green"] {
    --accent: #86efac;
    --accent-2: #34d399;
    --accent-3: #4ade80;
    --accent-link: #bbf7d0;
    --accent-hover: #6ee7b7;
    --accent-text: #86efac;
    --accent-rgb: 134, 239, 172;
    --accent-2-rgb: 52, 211, 153;
    --accent-3-rgb: 74, 222, 128;
    --neural-page-bg: #06120a;
    --neural-bg-1: rgba(6, 78, 59, 0.7);
    --neural-bg-2: rgba(20, 83, 45, 0.8);
    --neural-bg-3: rgba(22, 163, 74, 0.55);
    --neural-bg-mid: #0f1f14;
    --neural-bg-end: #f2faf5;
    --text-strong: #e8e8e8;
    --text-muted: #b8d9c4;
}

html[data-theme="light"],
html[data-theme="light"][data-color-theme="blue"] {
    --accent: #2563eb;
    --accent-2: #0284c7;
    --accent-3: #1d4ed8;
    --accent-link: #1e40af;
    --accent-hover: #2563eb;
    --accent-text: #1e40af;
    --accent-rgb: 37, 99, 235;
    --accent-2-rgb: 2, 132, 199;
    --accent-3-rgb: 29, 78, 216;
    --neural-page-bg: #eef4fb;
    --neural-bg-1: #eef4fb;
    --neural-bg-2: #dce8f7;
    --neural-bg-3: #f0f6fc;
    --neural-bg-mid: #dce8f7;
    --neural-bg-end: #f0f6fc;
    --text-strong: #0c1929;
    --text-muted: #3d4f66;
}

html[data-theme="light"][data-color-theme="purple"] {
    --accent: #7c3aed;
    --accent-2: #c026d3;
    --accent-3: #6d28d9;
    --accent-link: #5b21b6;
    --accent-hover: #7c3aed;
    --accent-text: #5b21b6;
    --accent-rgb: 124, 58, 237;
    --accent-2-rgb: 192, 38, 211;
    --accent-3-rgb: 109, 40, 217;
    --neural-page-bg: #f0ebf8;
    --neural-bg-1: #f0ebf8;
    --neural-bg-2: #e8e0f5;
    --neural-bg-3: #f5f0fc;
    --neural-bg-mid: #e8e0f5;
    --neural-bg-end: #f5f0fc;
    --text-strong: #1f0d36;
    --text-muted: #4c3d6b;
}

html[data-theme="light"][data-color-theme="green"] {
    --accent: #16a34a;
    --accent-2: #059669;
    --accent-3: #15803d;
    --accent-link: #166534;
    --accent-hover: #16a34a;
    --accent-text: #166534;
    --accent-rgb: 22, 163, 74;
    --accent-2-rgb: 5, 150, 105;
    --accent-3-rgb: 21, 128, 61;
    --neural-page-bg: #eef8f1;
    --neural-bg-1: #eef8f1;
    --neural-bg-2: #d8f0e0;
    --neural-bg-3: #f2faf5;
    --neural-bg-mid: #d8f0e0;
    --neural-bg-end: #f2faf5;
    --text-strong: #0c1f12;
    --text-muted: #3d5c47;
}


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

body {
    font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
    background: #000;
    color: #e0e0e0;
    overflow-x: hidden;
    min-height: 100vh;
    font-weight: 400;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Neural background */
.neural-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    background: radial-gradient(circle at 15% 85%, var(--neural-bg-1) 0%, transparent 50%),
        radial-gradient(circle at 85% 15%, var(--neural-bg-2) 0%, transparent 50%),
        radial-gradient(circle at 45% 60%, var(--neural-bg-3) 0%, transparent 50%),
        radial-gradient(circle at 70% 40%, rgba(34, 139, 34, 0.4) 0%, transparent 50%),
        linear-gradient(135deg, #0a0a0a 0%, var(--neural-bg-mid) 50%, #000000 100%);
    animation: backgroundPulse 14s ease-in-out infinite;
}

@keyframes backgroundPulse {
    0%, 100% { filter: brightness(0.9) saturate(1.4) hue-rotate(0deg); }
    33% { filter: brightness(1.1) saturate(1.7) hue-rotate(15deg); }
    66% { filter: brightness(1.0) saturate(1.5) hue-rotate(-10deg); }
}

.geometric-shapes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.geometric-shapes .shape {
    position: absolute;
    border: 1px solid rgba(0, 255, 255, 0.3);
    animation: floatShape 20s linear infinite;
}

.geometric-shapes .shape:nth-child(1) {
    width: 100px;
    height: 100px;
    left: 10%;
    animation-delay: 0s;
    border-color: rgba(var(--accent-2-rgb), 0.4);
}

.geometric-shapes .shape:nth-child(2) {
    width: 60px;
    height: 60px;
    left: 70%;
    animation-delay: -5s;
    border-radius: 50%;
    border-color: rgba(var(--accent-3-rgb), 0.4);
}

.geometric-shapes .shape:nth-child(3) {
    width: 80px;
    height: 80px;
    left: 30%;
    animation-delay: -10s;
    transform: rotate(45deg);
    border-color: rgba(var(--accent-rgb), 0.4);
}

.geometric-shapes .shape:nth-child(4) {
    width: 120px;
    height: 120px;
    left: 50%;
    animation-delay: -15s;
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
    background: linear-gradient(45deg, rgba(var(--accent-2-rgb), 0.1), transparent);
}

@keyframes floatShape {
    from { transform: translateY(100vh) rotate(0deg); opacity: 0; }
    10%, 90% { opacity: 1; }
    to { transform: translateY(-100px) rotate(360deg); opacity: 0; }
}

.neural-lines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

.neural-line {
    position: absolute;
    height: 1px;
    animation: neuralPulse 3s ease-in-out infinite;
}

.neural-line:nth-child(1) {
    top: 20%;
    left: 0;
    width: 100%;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    animation-delay: 0s;
}

.neural-line:nth-child(2) {
    top: 60%;
    left: 0;
    width: 100%;
    background: linear-gradient(90deg, transparent, var(--accent-2), transparent);
    animation-delay: -1s;
}

.neural-line:nth-child(3) {
    top: 40%;
    left: 0;
    width: 100%;
    background: linear-gradient(90deg, transparent, var(--accent-3), transparent);
    animation-delay: -2s;
}

@keyframes neuralPulse {
    0%, 100% { opacity: 0.2; transform: scaleX(0.5); }
    50% { opacity: 1; transform: scaleX(1); }
}

/* Glass card */
.glass {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* Auth page layout */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    padding: 32px 28px;
}

.auth-logo {
    display: block;
    margin: 0 auto 16px;
    object-fit: contain;
    border-radius: 12px;
    mix-blend-mode: lighten;
}

.auth-card .auth-title {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 24px;
    letter-spacing: 0.05em;
}

.auth-subtitle {
    text-align: center;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.65);
    margin: -12px 0 24px;
}

.otp-input {
    text-align: center;
    letter-spacing: 0.4em;
    font-size: 1.25rem;
    font-variant-numeric: tabular-nums;
}

.auth-form-secondary {
    margin-top: 12px;
}

button.submit-btn-outline {
    -webkit-appearance: none;
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 14px 24px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    font-family: inherit;
    transition: border-color 0.25s ease, color 0.25s ease, background 0.25s ease;
}

button.submit-btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(var(--accent-rgb), 0.08);
}

/* Tabs */
.auth-tabs {
    display: flex;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    margin-bottom: 24px;
    gap: 0;
}

.auth-tab {
    flex: 1;
    padding: 12px 16px;
    font-size: 0.95rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.6);
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    cursor: pointer;
    font-family: inherit;
    transition: color 0.25s ease, border-color 0.25s ease;
}

.auth-tab:hover {
    color: rgba(255, 255, 255, 0.9);
}

.auth-tab[aria-selected="true"],
.auth-tab.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

/* Alerts */
.auth-alert {
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.auth-alert-error {
    background: rgba(255, 80, 80, 0.15);
    border: 1px solid rgba(255, 80, 80, 0.4);
    color: #ff9999;
}

.auth-alert-success {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #e0e0e0;
}

.auth-alert ul {
    list-style: disc;
    padding-left: 20px;
}

/* Form */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label,
.form-group .form-label {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    color: #fff;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.form-group input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.2);
}

.form-group input.field-error,
.form-group input.border-\[\#f53003\] {
    border-color: #ff6b6b;
    box-shadow: 0 0 0 1px rgba(255, 107, 107, 0.3);
}

.form-hint {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
}

.input-wrap {
    position: relative;
}

.input-wrap .toggle-password {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    padding: 0;
}

.input-wrap .toggle-password:hover {
    color: var(--accent);
}

.input-wrap input {
    padding-right: 48px;
}

input[type="password"]::-ms-reveal,
input[type="password"]::-ms-clear {
    display: none;
}

/* Submit button */
.submit-btn {
    width: 100%;
    padding: 14px 24px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    border: none;
    border-radius: 10px;
    color: #000;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    font-family: inherit;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    margin-top: 4px;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(var(--accent-rgb), 0.4);
}

/* Panel visibility */
.auth-panel {
    display: block;
}

.auth-panel[hidden] {
    display: none !important;
}

/* JustValidate error label */
.form-group .error-label {
    font-size: 12px;
    color: #ff6b6b;
}

input::-ms-reveal {
    display: none;
}