/* --- Auth Modal Styles --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    z-index: 9999;
    display: none;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.2s ease-out;
}

.auth-card {
    width: 100%;
    max-width: 400px;
    padding: 2.5rem;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    background: rgba(17, 24, 39, 0.95);
    /* Solid dark for readability */
}

.auth-card h2 {
    font-size: 1.75rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

.auth-input-group {
    margin-bottom: 1.25rem;
}

.auth-input-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.auth-input {
    width: 100%;
    padding: 0.85rem 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: 'Plus Jakarta Sans', sans-serif;
    transition: all 0.2s;
}

.auth-input:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.08);
}

.auth-footer {
    text-align: center;
    margin-top: 2rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.auth-link {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
    margin-left: 0.25rem;
}

.auth-link:hover {
    text-decoration: underline;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* --- Profile Dropdown --- */
.user-profile-wrapper {
    position: relative;
}

.profile-dropdown {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: 260px;
    background: rgba(17, 24, 39, 0.98);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    padding: 1rem;
    display: none;
    flex-direction: column;
    gap: 0.5rem;
    animation: slideDown 0.2s ease-out;
}

.profile-dropdown.active {
    display: flex;
}

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

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

.profile-header {
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: 0.5rem;
}

.profile-name {
    font-weight: 700;
    color: white;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.profile-tier {
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    background: var(--accent-violet);
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    display: inline-block;
    margin-top: 4px;
}

.profile-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.profile-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white;
}

.profile-item.logout {
    color: #f87171;
}

.profile-item.logout:hover {
    background: rgba(248, 113, 113, 0.1);
}

.profile-item i {
    width: 18px;
    height: 18px;
}

/* --- Global Navbar Avatar --- */
.avatar {
    width: 32px;
    height: 32px;
    background: var(--gradient-primary);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 0.8rem;
    border: 2px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.2s;
}

.avatar:hover {
    transform: scale(1.05);
}

/* --- Notifications --- */
.nexus-toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: rgba(17, 24, 39, 0.9);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    z-index: 10000;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.19, 1, 0.22, 1);
}

.nexus-toast.active {
    opacity: 1;
    transform: translateY(0);
}

.nexus-toast.success {
    border-left: 4px solid var(--accent-lime);
}

.nexus-toast.error {
    border-left: 4px solid #ef4444;
}

.nexus-toast.info {
    border-left: 4px solid var(--accent-cyan);
}