/**
 * StableNet 3D Glassmorphism Auth System
 * High-End Cyber/Web3 Transparent Aesthetic (Proportional Viewport Fit)
 */

:root {
    --auth-glass-bg: rgba(12, 18, 38, 0.7);
    --auth-glass-border: rgba(255, 255, 255, 0.13);
    --auth-glass-border-sheen: rgba(255, 255, 255, 0.35);
    --auth-accent-glow: rgba(99, 102, 241, 0.35);
    --auth-neon-purple: #8b5cf6;
    --auth-neon-indigo: #6366f1;
    --auth-neon-cyan: #06b6d4;
    --auth-neon-pink: #d946ef;
    --auth-text-main: #f8fafc;
    --auth-text-muted: #94a3b8;
}

/* Background Atmosphere */
.auth-video-bg {
    position: fixed;
    right: 0;
    bottom: 0;
    min-width: 100%;
    min-height: 100%;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -2;
    filter: brightness(0.65) contrast(1.15) saturate(1.2);
}

.auth-ambient-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
    background: radial-gradient(circle at 50% 15%, rgba(99, 102, 241, 0.16) 0%, rgba(10, 15, 30, 0.55) 50%, rgba(2, 6, 23, 0.88) 100%);
}

/* 3D Glowing Ambient Orbs */
.ambient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(85px);
    opacity: 0.6;
    animation: orbFloat 14s ease-in-out infinite alternate;
}

.ambient-orb-1 {
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.52) 0%, rgba(99, 102, 241, 0) 70%);
    top: -120px;
    left: 15%;
    animation-duration: 12s;
}

.ambient-orb-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(217, 70, 239, 0.42) 0%, rgba(217, 70, 239, 0) 70%);
    bottom: -120px;
    right: 15%;
    animation-duration: 16s;
    animation-delay: -3s;
}

.ambient-orb-3 {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.38) 0%, rgba(6, 182, 212, 0) 70%);
    top: 35%;
    right: 5%;
    animation-duration: 18s;
    animation-delay: -6s;
}

@keyframes orbFloat {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(35px, -25px) scale(1.1); }
    100% { transform: translate(-30px, 30px) scale(0.95); }
}

/* Auth Page Wrapper */
.auth-page-container {
    min-height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 1.25rem;
    position: relative;
    z-index: 1;
    box-sizing: border-box;
}

/* The 3D Glass Card */
.auth-3d-card-wrapper {
    perspective: 1200px;
    width: 100%;
    max-width: 460px;
    margin: auto;
}

.auth-3d-card-wrapper.wide-card {
    max-width: 550px;
}

.auth-3d-card {
    position: relative;
    background: var(--auth-glass-bg);
    backdrop-filter: blur(28px) saturate(190%);
    -webkit-backdrop-filter: blur(28px) saturate(190%);
    border-radius: 24px;
    border: 1px solid var(--auth-glass-border);
    border-top: 1px solid var(--auth-glass-border-sheen);
    border-left: 1px solid rgba(255, 255, 255, 0.22);
    box-shadow: 
        0 25px 60px -12px rgba(0, 0, 0, 0.8),
        0 0 45px -8px rgba(99, 102, 241, 0.28),
        inset 0 1px 1px rgba(255, 255, 255, 0.35),
        inset 0 -1px 2px rgba(0, 0, 0, 0.4);
    padding: 2.2rem 2.25rem;
    transition: transform 0.15s ease-out, box-shadow 0.3s ease;
    transform-style: preserve-3d;
    overflow: hidden;
}

@media (max-width: 576px) {
    .auth-page-container {
        padding: 1.25rem 0.75rem;
    }
    .auth-3d-card {
        padding: 1.75rem 1.4rem;
        border-radius: 20px;
    }
}

/* Dynamic Sheen Overlay */
.auth-3d-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 24px;
    background: radial-gradient(
        700px circle at var(--mouse-x, 50%) var(--mouse-y, 30%),
        rgba(255, 255, 255, 0.12),
        transparent 50%
    );
    pointer-events: none;
    z-index: 1;
    transition: opacity 0.3s ease;
}

/* Subtle Animated Border Glow */
.auth-3d-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 24px;
    padding: 1px;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.35) 0%,
        rgba(99, 102, 241, 0.4) 40%,
        rgba(217, 70, 239, 0.3) 70%,
        transparent 100%
    );
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    z-index: 2;
}

/* Card Header & Brand */
.auth-header {
    text-align: center;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 3;
}

.auth-logo-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 20px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 20px -4px rgba(0, 0, 0, 0.4), inset 0 1px 1px rgba(255, 255, 255, 0.2);
    margin-bottom: 0.85rem;
    position: relative;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.auth-logo-badge:hover {
    transform: translateY(-2px) scale(1.02);
}

.auth-logo-badge img {
    height: 46px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.5));
}

.auth-title {
    font-size: 1.55rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    margin-bottom: 0.3rem;
    background: linear-gradient(135deg, #ffffff 30%, #c7d2fe 80%, #a5b4fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

.auth-subtitle {
    font-size: 0.84rem;
    color: var(--auth-text-muted);
    font-weight: 400;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin-bottom: 0;
}

.auth-subtitle .pulse-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background-color: #10b981;
    box-shadow: 0 0 10px #10b981;
    display: inline-block;
    animation: pulseGlow 2s infinite;
}

@keyframes pulseGlow {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.85); }
}

/* Glass Form Fields */
.auth-form {
    position: relative;
    z-index: 3;
}

.glass-form-group {
    margin-bottom: 1.15rem;
}

.glass-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #e2e8f0;
    margin-bottom: 0.4rem;
}

.glass-label-link {
    font-size: 0.785rem;
    font-weight: 500;
    text-transform: none;
    letter-spacing: normal;
    color: #f43f5e;
    text-decoration: none;
    transition: color 0.2s, text-shadow 0.2s;
}

.glass-label-link:hover {
    color: #fb7185;
    text-shadow: 0 0 8px rgba(244, 63, 94, 0.5);
}

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

.glass-input-icon {
    position: absolute;
    left: 16px;
    font-size: 1.18rem;
    color: #64748b;
    pointer-events: none;
    transition: color 0.3s ease, transform 0.3s ease;
    z-index: 2;
}

.glass-input {
    width: 100%;
    height: 48px;
    background: rgba(255, 255, 255, 0.055);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 13px;
    padding: 0 46px 0 46px;
    color: #ffffff !important;
    font-size: 0.925rem;
    font-weight: 400;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.25);
}

.glass-input::placeholder {
    color: rgba(255, 255, 255, 0.32);
    font-weight: 300;
}

.glass-input:focus {
    background: rgba(255, 255, 255, 0.085);
    border-color: var(--auth-neon-indigo);
    outline: none;
    box-shadow: 
        0 0 0 3px rgba(99, 102, 241, 0.25),
        0 0 22px rgba(99, 102, 241, 0.32),
        inset 0 1px 2px rgba(255, 255, 255, 0.1);
}

.glass-input:focus ~ .glass-input-icon {
    color: #a5b4fc;
    transform: scale(1.1);
}

/* Glass Select Control */
.glass-select {
    width: 100%;
    height: 48px;
    background: rgba(255, 255, 255, 0.055);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 13px;
    padding: 0 42px 0 46px;
    color: #ffffff;
    font-size: 0.925rem;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.25);
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394a3b8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 15px;
    cursor: pointer;
}

.glass-select option {
    background-color: #0f172a;
    color: #ffffff;
}

.glass-select:focus {
    background-color: rgba(255, 255, 255, 0.085);
    border-color: var(--auth-neon-indigo);
    outline: none;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25), 0 0 22px rgba(99, 102, 241, 0.32);
}

/* Password Eye Toggle */
.glass-pw-toggle {
    position: absolute;
    right: 10px;
    width: 32px;
    height: 32px;
    border-radius: 9px;
    border: none;
    background: rgba(255, 255, 255, 0.08);
    color: #94a3b8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 2;
    padding: 0;
}

.glass-pw-toggle:hover {
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
    transform: scale(1.05);
}

/* Custom Checkbox */
.glass-checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-top: 0.35rem;
    cursor: pointer;
}

.glass-checkbox {
    width: 17px;
    height: 17px;
    border-radius: 5px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.06);
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    display: grid;
    place-content: center;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-checkbox::before {
    content: "\ea5e";
    font-family: 'remixicon';
    font-size: 12px;
    color: #ffffff;
    transform: scale(0);
    transition: transform 0.15s ease-in-out;
}

.glass-checkbox:checked {
    background: var(--auth-neon-indigo);
    border-color: var(--auth-neon-indigo);
    box-shadow: 0 0 9px rgba(99, 102, 241, 0.5);
}

.glass-checkbox:checked::before {
    transform: scale(1);
}

.glass-checkbox-label {
    font-size: 0.835rem;
    color: var(--auth-text-muted);
    user-select: none;
    margin-bottom: 0;
}

/* 3D Action Button */
.btn-3d-glass {
    position: relative;
    width: 100%;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #d946ef 100%);
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 13px;
    color: #ffffff;
    font-size: 0.975rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    cursor: pointer;
    box-shadow: 
        0 9px 24px -3px rgba(99, 102, 241, 0.52),
        inset 0 1px 1px rgba(255, 255, 255, 0.45),
        inset 0 -2px 3px rgba(0, 0, 0, 0.25);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
    margin-top: 1.15rem;
    text-decoration: none;
}

.btn-3d-glass::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.28),
        transparent
    );
    transform: skewX(-20deg);
    transition: left 0.7s ease;
}

.btn-3d-glass:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 14px 30px -3px rgba(139, 92, 246, 0.68),
        0 0 22px rgba(217, 70, 239, 0.38),
        inset 0 1px 2px rgba(255, 255, 255, 0.6);
    color: #ffffff;
}

.btn-3d-glass:hover::after {
    left: 150%;
}

.btn-3d-glass:active {
    transform: translateY(1px);
    box-shadow: 
        0 4px 14px -2px rgba(99, 102, 241, 0.5),
        inset 0 2px 3px rgba(0, 0, 0, 0.3);
}

/* Secondary Button */
.btn-3d-glass-secondary {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: 0 7px 18px -3px rgba(0, 0, 0, 0.4), inset 0 1px 1px rgba(255, 255, 255, 0.2);
}

.btn-3d-glass-secondary:hover {
    background: rgba(255, 255, 255, 0.14);
    box-shadow: 0 12px 24px -3px rgba(0, 0, 0, 0.5), inset 0 1px 2px rgba(255, 255, 255, 0.3);
}

/* Card Footer & Links */
.auth-footer {
    text-align: center;
    margin-top: 1.15rem;
    position: relative;
    z-index: 3;
}

.auth-footer p {
    font-size: 0.865rem;
    color: var(--auth-text-muted);
    margin-bottom: 0;
}

.auth-footer-link {
    color: #a5b4fc;
    font-weight: 600;
    text-decoration: none;
    position: relative;
    transition: color 0.2s ease;
}

.auth-footer-link::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 0%;
    height: 1.5px;
    background: linear-gradient(90deg, #6366f1, #d946ef);
    transition: width 0.3s ease;
    border-radius: 2px;
}

.auth-footer-link:hover {
    color: #ffffff;
}

.auth-footer-link:hover::after {
    width: 100%;
}

/* Divider with Glowing Tag */
.auth-divider {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 1.15rem 0;
    z-index: 3;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.16), transparent);
}

.auth-divider span {
    padding: 0 14px;
    font-size: 0.725rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #64748b;
}

/* Social Buttons */
.auth-social-list {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    z-index: 3;
    position: relative;
}

.auth-social-btn {
    width: 40px;
    height: 40px;
    border-radius: 11px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(8px);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #cbd5e1;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3), inset 0 1px 1px rgba(255, 255, 255, 0.15);
}

.auth-social-btn:hover {
    transform: translateY(-2px) scale(1.05);
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.auth-social-btn.facebook:hover {
    border-color: #1877f2;
    box-shadow: 0 4px 16px -2px rgba(24, 119, 242, 0.5);
    color: #1877f2;
}

.auth-social-btn.google:hover {
    border-color: #ea4335;
    box-shadow: 0 4px 16px -2px rgba(234, 67, 53, 0.5);
    color: #ea4335;
}

.auth-social-btn.twitter:hover {
    border-color: #38bdf8;
    box-shadow: 0 4px 16px -2px rgba(56, 189, 248, 0.5);
    color: #38bdf8;
}

/* Glass Alerts */
.glass-alert {
    position: relative;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.84rem;
    backdrop-filter: blur(12px);
    z-index: 3;
}

.glass-alert-danger {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #fca5a5;
    box-shadow: 0 3px 12px rgba(239, 68, 68, 0.2);
}

.glass-alert-success {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.35);
    color: #6ee7b7;
    box-shadow: 0 3px 12px rgba(16, 185, 129, 0.2);
}

.glass-alert-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}

/* Summary Table for Account Created */
.glass-summary-table {
    width: 100%;
    margin-top: 1rem;
    border-collapse: separate;
    border-spacing: 0 7px;
}

.glass-summary-table tr {
    background: rgba(255, 255, 255, 0.04);
    border-radius: 9px;
    transition: background 0.2s;
}

.glass-summary-table tr:hover {
    background: rgba(255, 255, 255, 0.08);
}

.glass-summary-table th {
    padding: 9px 13px;
    color: #94a3b8;
    font-weight: 500;
    font-size: 0.825rem;
    border-top-left-radius: 9px;
    border-bottom-left-radius: 9px;
    border: none;
}

.glass-summary-table td {
    padding: 9px 13px;
    color: #f8fafc;
    font-weight: 600;
    font-size: 0.85rem;
    text-align: right;
    border-top-right-radius: 9px;
    border-bottom-right-radius: 9px;
    border: none;
}
