/* AGAIN WISE Premium Authentication Styles */
/* AI-Cosmic Theme with Glassmorphism */

:root {
    --cosmic-black: #050507;
    --space-dark: #0a0a0e;
    --neon-blue: #00f3ff;
    --neon-purple: #bc13fe;
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-muted: rgba(255, 255, 255, 0.4);
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.05);
    --success-green: #00ff88;
    --warning-orange: #ffa500;
    --error-red: #ff4d4d;
}

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

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, var(--cosmic-black) 0%, var(--space-dark) 100%);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Animated Particle Background */
#particles-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    opacity: 0.6;
}

/* Auth Wrapper */
.auth-wrapper {
    position: relative;
    z-index: 10;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

/* Back to Home Button */
.back-home {
    position: absolute;
    top: 30px;
    left: 30px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 8px;
}

.back-home:hover {
    color: var(--neon-blue);
    transform: translateX(-5px);
}

/* Glassmorphism Card */
.glass-auth-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 28px;
    padding: 50px;
    width: 100%;
    max-width: 520px;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
}

.glass-auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--neon-blue), var(--neon-purple));
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Auth Header */
.auth-header {
    text-align: center;
    margin-bottom: 35px;
}

.logo-cosmic {
    font-family: 'Orbitron', sans-serif;
    font-size: 2rem;
    font-weight: 900;
    background: linear-gradient(90deg, var(--neon-blue), var(--neon-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 15px;
    letter-spacing: 2px;
}

.auth-header h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.8rem;
    margin-bottom: 10px;
    color: var(--text-primary);
    line-height: 1.3;
}

.auth-header p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Toggle Switch */
.auth-toggle {
    display: flex;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 50px;
    padding: 5px;
    margin-bottom: 30px;
    position: relative;
}

.toggle-btn {
    flex: 1;
    padding: 12px 20px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-family: 'Orbitron', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
    letter-spacing: 0.5px;
}

.toggle-btn.active {
    color: var(--cosmic-black);
}

.toggle-indicator {
    position: absolute;
    top: 5px;
    left: 5px;
    width: calc(50% - 5px);
    height: calc(100% - 10px);
    background: linear-gradient(45deg, var(--neon-blue), var(--neon-purple));
    border-radius: 50px;
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 4px 15px rgba(0, 243, 255, 0.4);
}

.toggle-indicator.right {
    transform: translateX(calc(100% + 5px));
}

/* Alert Messages */
.alert-container {
    margin-bottom: 20px;
    min-height: 0;
}

.alert {
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 15px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-success {
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid rgba(0, 255, 136, 0.3);
    color: var(--success-green);
}

.alert-error {
    background: rgba(255, 77, 77, 0.1);
    border: 1px solid rgba(255, 77, 77, 0.3);
    color: var(--error-red);
}

.alert-warning {
    background: rgba(255, 165, 0, 0.1);
    border: 1px solid rgba(255, 165, 0, 0.3);
    color: var(--warning-orange);
}

/* Auth Forms */
.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Cosmic Input Fields */
.input-cosmic {
    position: relative;
    margin-bottom: 25px;
}

.input-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1rem;
    z-index: 2;
    transition: all 0.3s ease;
}

.input-cosmic input {
    width: 100%;
    padding: 16px 20px 16px 50px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.input-cosmic input:focus {
    outline: none;
    border-color: var(--neon-blue);
    background: rgba(255, 255, 255, 0.05);
}

.input-cosmic input:focus~.input-icon {
    color: var(--neon-blue);
}

.input-cosmic label {
    position: absolute;
    left: 50px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.input-cosmic input:focus~label,
.input-cosmic input:not(:placeholder-shown)~label {
    top: -10px;
    left: 15px;
    font-size: 0.75rem;
    padding: 0 8px;
    background: var(--cosmic-black);
    color: var(--neon-blue);
}

/* Input Glow Effect */
.input-glow {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--neon-blue), var(--neon-purple));
    transform: scaleX(0);
    transition: transform 0.4s ease;
    border-radius: 2px;
}

.input-cosmic input:focus~.input-glow {
    transform: scaleX(1);
}

/* Password Toggle */
.password-toggle {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1rem;
    transition: color 0.3s ease;
    z-index: 3;
}

.password-toggle:hover {
    color: var(--neon-blue);
}

/* Password Strength Meter */
.password-strength {
    margin: -15px 0 20px 0;
}

.strength-bar {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 8px;
}

.strength-fill {
    height: 100%;
    width: 0%;
    background: var(--error-red);
    transition: all 0.4s ease;
    border-radius: 2px;
}

.strength-text {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0;
}

/* Forgot Link */
.forgot-link {
    display: block;
    text-align: right;
    margin: -10px 0 20px 0;
    font-size: 0.85rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s ease;
}

.forgot-link:hover {
    color: var(--neon-blue);
}

/* Cosmic Button */
.btn-cosmic {
    width: 100%;
    padding: 16px 30px;
    background: linear-gradient(45deg, var(--neon-blue), var(--neon-purple));
    border: none;
    border-radius: 50px;
    color: var(--cosmic-black);
    font-family: 'Orbitron', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 1px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-cosmic:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 243, 255, 0.4);
}

.btn-cosmic:active {
    transform: translateY(-1px);
}

.btn-cosmic:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-glow {
    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;
}

.btn-cosmic:hover .btn-glow {
    left: 100%;
}

/* Secondary Button */
.btn-secondary {
    padding: 12px 25px;
    background: transparent;
    border: 2px solid var(--neon-blue);
    border-radius: 50px;
    color: var(--neon-blue);
    font-family: 'Orbitron', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-secondary:hover {
    background: rgba(0, 243, 255, 0.1);
    transform: translateY(-2px);
}

/* Google Sign-In Button */
.google-btn {
    width: 100%;
    padding: 14px 30px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    color: #1f1f1f;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.google-btn:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(255, 255, 255, 0.2);
}

.google-btn:active {
    transform: translateY(-1px);
}

.google-btn svg {
    flex-shrink: 0;
}

/* Signup Steps */
.signup-step {
    display: none;
}

.signup-step.active {
    display: block;
    animation: fadeIn 0.4s ease;
}

/* Progress Indicator */
.progress-container {
    text-align: center;
    margin-bottom: 30px;
}

.progress-ring {
    position: relative;
    display: inline-block;
    margin-bottom: 10px;
}

.progress-ring svg {
    transform: rotate(-90deg);
}

.progress-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.1);
    stroke-width: 3;
}

.progress-bar {
    fill: none;
    stroke: url(#gradient);
    stroke-width: 3;
    stroke-dasharray: 163.36;
    stroke-dashoffset: 163.36;
    transition: stroke-dashoffset 0.6s ease;
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'Orbitron', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: var(--neon-blue);
}

.progress-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Step Buttons */
.step-buttons {
    display: flex;
    gap: 15px;
    margin-top: 25px;
}

.step-buttons .btn-secondary {
    flex: 0 0 auto;
}

.step-buttons .btn-cosmic {
    flex: 1;
}

/* Role Selection Grid */
.role-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 25px;
}

.role-card {
    background: rgba(255, 255, 255, 0.03);
    border: 2px solid var(--glass-border);
    border-radius: 16px;
    padding: 25px 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.role-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 243, 255, 0.1), transparent);
    transition: left 0.6s ease;
}

.role-card:hover::before {
    left: 100%;
}

.role-card:hover {
    border-color: var(--neon-blue);
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 243, 255, 0.2);
}

.role-card.selected {
    border-color: var(--neon-blue);
    background: rgba(0, 243, 255, 0.1);
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.3);
}

.role-card i {
    font-size: 2.5rem;
    margin-bottom: 12px;
    color: var(--neon-blue);
    display: block;
}

.role-card h4 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.1rem;
    margin-bottom: 5px;
    color: var(--text-primary);
}

.role-card p {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin: 0;
}

/* Future Auth Placeholder */
.future-auth-placeholder {
    margin-top: 30px;
    padding: 15px;
    background: rgba(188, 19, 254, 0.05);
    border: 1px dashed rgba(188, 19, 254, 0.3);
    border-radius: 12px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.future-auth-placeholder i {
    color: var(--neon-purple);
    font-size: 1.2rem;
}

/* Floating Orbs */
.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.3;
    pointer-events: none;
    z-index: 2;
}

.orb-1 {
    width: 300px;
    height: 300px;
    background: var(--neon-blue);
    top: -100px;
    left: -100px;
    animation: float 15s infinite ease-in-out;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: var(--neon-purple);
    bottom: -150px;
    right: -150px;
    animation: float 18s infinite ease-in-out reverse;
}

.orb-3 {
    width: 250px;
    height: 250px;
    background: var(--neon-blue);
    top: 50%;
    right: -100px;
    animation: float 12s infinite ease-in-out;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0);
    }

    33% {
        transform: translate(30px, -30px);
    }

    66% {
        transform: translate(-20px, 20px);
    }
}

/* Loading Spinner */
.loading-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(0, 0, 0, 0.2);
    border-top-color: var(--cosmic-black);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Enhanced Google Sign-In Button with Premium Glassmorphism */
.google-btn {
    width: 100%;
    padding: 16px 24px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50px;
    /* Kept 50px for consistency with other auth buttons */
    color: #fff;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    font-family: 'Inter', sans-serif;
    letter-spacing: 0.3px;
    margin-top: 20px;
}

.google-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(0, 243, 255, 0.1), rgba(188, 19, 254, 0.1));
    opacity: 0;
    transition: opacity 0.4s ease;
}

.google-btn:hover::before {
    opacity: 1;
}

.google-btn::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, var(--neon-blue), var(--neon-purple), var(--neon-blue));
    border-radius: 50px;
    z-index: -1;
    opacity: 0;
    filter: blur(8px);
    transition: opacity 0.4s ease;
    background-size: 200% 200%;
    animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

.google-btn:hover::after {
    opacity: 0.6;
}

.google-btn:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(0, 243, 255, 0.3);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3), 0 0 20px rgba(0, 243, 255, 0.2);
}

.google-btn:active {
    transform: translateY(0);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2), 0 0 10px rgba(0, 243, 255, 0.1);
}

.google-btn img,
.google-btn svg {
    position: relative;
    z-index: 1;
    transition: transform 0.3s ease;
    margin-right: 12px;
    width: 20px;
    height: 20px;
}

.google-btn:hover img,
.google-btn:hover svg {
    transform: scale(1.1) rotate(5deg);
}

/* Auth Divider */
.auth-divider {
    display: flex;
    align-items: center;
    margin: 30px 0;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-family: 'Orbitron', sans-serif;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--glass-border);
}

.auth-divider span {
    padding: 0 15px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .glass-auth-card {
        padding: 35px 25px;
        max-width: 100%;
    }

    .auth-header h1 {
        font-size: 1.5rem;
    }

    .logo-cosmic {
        font-size: 1.6rem;
    }

    .role-grid {
        grid-template-columns: 1fr;
    }

    .back-home {
        top: 20px;
        left: 20px;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .glass-auth-card {
        padding: 30px 20px;
        border-radius: 20px;
    }

    .auth-header h1 {
        font-size: 1.3rem;
    }

    .step-buttons {
        flex-direction: column;
    }

    .step-buttons .btn-secondary {
        flex: 1;
    }
}